Using the files available in this repo as it is, it seems that the functionality to check the _PublishMarketData to True in MT4 has been disable. Also, the list _PublishSymbols is empty.
Looking at the MQL code, I noticed that it is now possible to subscribe directly from the Python code (via the function DWX_SetSymbolList).
The function to subscribe to data from Python is _DWX_MTX_SUBSCRIBEMARKETDATA
It works great for getting to the datafeed via the appropriate port, however the function is not calling DWX_SetSymbolList, and not subscribing to any new symbol.
I added the remote_send command to add the new symbol. It may be usefull to get a local variable of subscribed symbols in the DWX_ZeroMQ_Connector class, because from what I see, adding a new symbol override all previous ones.
"""
Function to subscribe to given Symbol's BID/ASK feed from MetaTrader
"""
def _DWX_MTX_SUBSCRIBE_MARKETDATA_(self,
_symbol='EURUSD',
string_delimiter=';'):
# Send via PUSH Socket
_msg = "{};{}".format('TRACK_PRICES', _symbol)
self.remote_send(self._PUSH_SOCKET, _msg)
# Subscribe to SYMBOL first.
self._SUB_SOCKET.setsockopt_string(zmq.SUBSCRIBE, _symbol)
print("[KERNEL] Subscribed to {} BID/ASK updates. See self._Market_Data_DB.".format(_symbol))
Hi,
Using the files available in this repo as it is, it seems that the functionality to check the _PublishMarketData to True in MT4 has been disable. Also, the list _PublishSymbols is empty. Looking at the MQL code, I noticed that it is now possible to subscribe directly from the Python code (via the function DWX_SetSymbolList).
The function to subscribe to data from Python is _DWX_MTX_SUBSCRIBEMARKETDATA It works great for getting to the datafeed via the appropriate port, however the function is not calling DWX_SetSymbolList, and not subscribing to any new symbol.
I added the remote_send command to add the new symbol. It may be usefull to get a local variable of subscribed symbols in the DWX_ZeroMQ_Connector class, because from what I see, adding a new symbol override all previous ones.