title: Close position from MT5 Python API not working
body: <p>I'm trying to close an existing position in MT5 from Python but MT5 always claims an 'Unsupported Filling Mode'.<br />
  I tried all possible filling modes but always get the same result. Same, if I omit the filling mode in the request. I also tried to fetch the filling mode from the symbol info and used it in the request - without success.
  This happens on a live account.<br />
  Here is my function that takes an existing position and sends a close request for that position:</p>
  <pre><code>async def ClosePosition(position):
     if (position.type == mt5.POSITION_TYPE_BUY):
         order_type = mt5.ORDER_TYPE_SELL
         price = mt5.symbol_info_tick(position.symbol).bid
     else:
         order_type = mt5.ORDER_TYPE_BUY
         price = mt5.symbol_info_tick(position.symbol).ask
  
     request = {
             &quot;action&quot;: mt5.TRADE_ACTION_DEAL,
             &quot;symbol&quot;: position.symbol,
             &quot;volume&quot;: position.volume,
             &quot;type&quot;: order_type,
             &quot;position&quot;: position.ticket,
             &quot;price&quot;: price,
             &quot;deviation&quot;: 10,
             &quot;magic&quot;: 0,
             &quot;comment&quot;: &quot;Closed by Python&quot;,
             &quot;type_time&quot;: mt5.ORDER_TIME_GTC,
             &quot;type_filling&quot;: mt5.ORDER_FILLING_RETURN
         }
  
     result = mt5.order_send(request)
  
  </code></pre>
  <p>This is what the journal says:<br />
  <code>Trades '#######': failed market buy 0.01 CHFJPY, close #109459760 sell 0.01 CHFJPY 116.807 [Unsupported filling mode]</code></p>
  <p>Any help is greatly appreciated.</p>