title: ZeroMQ Connector still sent data successfully but failed to get response from MT4 Server
body: <p>I was following the 7 video tutorials on how to interface python with a MetaTrader Terminal 4 and got no problem running them on iPython kernel just as instructed in this <a href="https://www.youtube.com/watch?v=U2VdXdm2qlM&amp;t=9s*" rel="nofollow noreferrer">video</a></p>
  <p>By no problem I mean a trade was sent to the server with ease and client (my laptop) received proper response after each action is executed. When I call <code>zmq._get_response_()</code> I can get access to server response.</p>
  <p>The problem starts to arise when I want to compile the <code>DWX_ZeroMQ_Connector</code> class within a program. So I start with a simple program just like this :</p>
  <pre><code>def main():  
      zmq = DWX_ZeroMQ_Connector()
      my_trade = { '_action':       'OPEN',
                   '_type':         0,
                   '_symbol':       'USOIL',
                   '_price':        0.0,
                   '_SL':           0,
                   '_TP':           0,
                   '_comment':      'dwx-zeromq',
                   '_lots':         0.01,
                   '_magic':   123456,
                   '_ticket':       0
                   }
      #
      zmq._DWX_MTX_NEW_TRADE_(_order=my_trade)
      #
      reply     = zmq._get_response_()  
      all_trade = zmq._DWX_MTX_GET_ALL_OPEN_TRADES_()
      #
      print( &quot;reply&quot; + str( reply ) )
      print( &quot;----------------------&quot; )
      print( &quot;alltrade&quot; + str( all_trade ) )
  
  main()
  </code></pre>
  <p>The weird part is this script STILL SENDS ORDERS SUCCESSFULLY, BUT DID NOT PROMPT ANY RESPONSE BACK as the reply turned out to be null. Was struggling with this for a week.</p>
  <p>Some additional information :</p>
  <ul>
  <li><p>I found the problem of not receiving response only when using
  Anaconda prompt to execute the compiled file, but I received proper
  response on iPython kernel so I presumed it could not be my
  dependencies. Both was running on local host</p>
  </li>
  <li><p>the github page I was cloning is the latest v2.0.1 RC8 <a href="https://github.com/darwinex/dwx-zeromq-connector/blob/master/v2.0.1/python/api/DWX_ZeroMQ_Connector_v2_0_1_RC8.py" rel="nofollow noreferrer">version</a></p>
  </li>
  <li><p>Here is the printed version of <code>zmq._get_response_()</code>
  <a href="https://i.stack.imgur.com/ML8Io.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ML8Io.png" alt="enter image description here" /></a></p>
  </li>
  <li><p>Here are my parameters for MQL4 code
  <a href="https://i.stack.imgur.com/cn7fL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cn7fL.png" alt="enter image description here" /></a></p>
  </li>
  <li><p>Here is a picture of MT4 actively pushing quote <a href="https://i.stack.imgur.com/R8j1t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R8j1t.png" alt="enter image description here" /></a></p>
  </li>
  <li><p>Here is a picture of Console when I tried to set <code>_monitor = True</code> in the initialization process of <code>DWX_ZeroMQ_Connector</code> object. Now it even failed to send trades to MetaTrader Terminal 4 ( <em>a Terminal-side DWX-code service-server</em> ) and of course still failed to get any response back.
  <a href="https://i.stack.imgur.com/Etp9u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Etp9u.png" alt="enter image description here" /></a></p>
  </li>
  <li><p>Here is the copy of both Terminal Log and Expert Log <a href="https://github.com/hoangson0409/Telegram-to-MT4" rel="nofollow noreferrer">examples</a> when I tried getting a response from MT4 Terminal (server). As it was weekend, I had to experiment with bitcoin trade.</p>
  </li>
  </ul>
  <hr />
  <p><strong>TERMINAL LOG</strong></p>
  <pre><code>0   16:33:17.600    MetaTrader build 1260 started (Exness Ltd.)
  0   16:33:17.600    Windows 10 Pro x64, IE 11, UAC, 4 x Intel Core i7-5500U  @ 2.40GHz, Memory: 4899 / 8103 Mb, Disk: 73 / 99 Gb, GMT+7
  0   16:33:17.600    Data Folder: C:\Users\Admin\AppData\Roaming\MetaQuotes\Terminal\F5C18A2156882613427FB4ACF0892997
  2   16:33:20.664    Expert DWX_ZeroMQ_Server_v2.0.1_RC8 USOIL,H1: loaded successfully
  2   16:33:20.767    Expert DWX_ZeroMQ_Server_v2.0.1_RC8 GBPJPY,H1: loaded successfully
  0   16:33:22.258    '36006969': login on Exness-Trial4 through DC00 (ping: 235.09 ms)
  0   16:33:24.299    '36006969': login datacenter on Exness-Trial4 through DC00 (ping: 235.09 ms)
  0   16:33:24.933    '36006969': previous successful authorization performed from 171.255.70.226
  2   16:33:31.235    Expert DWX_ZeroMQ_Server_v2.0.1_RC8 GBPJPY,H1: removed
  2   16:33:31.247    Expert DWX_ZeroMQ_Server_v2.0.1_RC8 GBPJPY,H1: loaded successfully
  0   16:33:42.019    '36006969': order buy market 0.01 BTCUSD sl: 0.00 tp: 0.00
  0   16:33:42.514    Trades: use hosting service to speed up the execution - 0.33 ms via 'MQL5 Amsterdam 01 (MQL5.community)' instead of 235.09 ms
  0   16:33:42.514    '36006969': order was opened : #2991084 buy 0.01 BTCUSD at 7110.21 sl: 0.00 tp: 0.00
  2   16:35:11.850    Expert DWX_ZeroMQ_Server_v2.0.1_RC8 USOIL,H1: removed
  2   16:35:11.866    Expert DWX_ZeroMQ_Server_v2.0.1_RC8 GBPJPY,H1: removed
  0   16:35:12.081    MetaTrader build 1260 stopped
  </code></pre>
  <hr />
  <p><strong>EXPERT LOG :</strong></p>
  <pre><code>0   16:33:20.269    Expert DWX_ZeroMQ_Server_v2.0.1_RC8 EURUSDm,H1: loaded successfully
  0   16:33:20.270    DWX_ZeroMQ_Server_v2.0.1_RC8 EURUSDm,H1 inputs: PROJECT_NAME=DWX_ZeroMQ_MT4_Server; ZEROMQ_PROTOCOL=tcp; HOSTNAME=*; PUSH_PORT=32768; PULL_PORT=32769; PUB_PORT=32770; MILLISECOND_TIMER=1; t0=--- Trading Parameters ---; MagicNumber=123456; MaximumOrders=1; MaximumLotSize=0.01; MaximumSlippage=3; DMA_MODE=true; t1=--- ZeroMQ Configuration ---; Publish_MarketData=false; 
  0   16:33:20.664    Expert DWX_ZeroMQ_Server_v2.0.1_RC8 USOIL,H1: loaded successfully
  0   16:33:20.664    DWX_ZeroMQ_Server_v2.0.1_RC8 USOIL,H1 inputs: PROJECT_NAME=DWX_ZeroMQ_MT4_Server; ZEROMQ_PROTOCOL=tcp; HOSTNAME=*; PUSH_PORT=32768; PULL_PORT=32769; PUB_PORT=32770; MILLISECOND_TIMER=1; t0=--- Trading Parameters ---; MagicNumber=123456; MaximumOrders=1; MaximumLotSize=0.01; MaximumSlippage=3; DMA_MODE=true; t1=--- ZeroMQ Configuration ---; Publish_MarketData=false; 
  00  16:33:20.767    Expert DWX_ZeroMQ_Server_v2.0.1_RC8 GBPJPY,H1: loaded successfully
  0   16:33:20.767    DWX_ZeroMQ_Server_v2.0.1_RC8 GBPJPY,H1 inputs: PROJECT_NAME=DWX_ZeroMQ_MT4_Server; ZEROMQ_PROTOCOL=tcp; HOSTNAME=*; PUSH_PORT=32768; PULL_PORT=32769; PUB_PORT=32770; MILLISECOND_TIMER=1; t0=--- Trading Parameters ---; MagicNumber=123456; MaximumOrders=1; MaximumLotSize=0.01; MaximumSlippage=3; DMA_MODE=true; t1=--- ZeroMQ Configuration ---; Publish_MarketData=true; 
  </code></pre>
  <hr />