darwinex / dwx-zeromq-connector

Wrapper library for algorithmic trading in Python 3, providing DMA/STP access to Darwinex liquidity via a ZeroMQ-enabled MetaTrader Bridge EA.
https://blog.darwinex.com/zeromq-interface-python-r-metatrader4/
BSD 3-Clause "New" or "Revised" License
342 stars 227 forks source link

[Bug] Incorrect Logic for Publishing Market Ticks #65

Closed octopyth closed 3 years ago

octopyth commented 4 years ago

The mechanism used for capturing ticks is based on the onTick method in MQL. This means that if the expert advisor is attached to EURUSD for example, the time stamp for capturing ticks will only be accurate for EURUSD. All the other symbols report the BID/ASK quotes at that particular time, so the number of ticks and the Timestamps for other symbols than EURUSD is completely inaccurate. Here is an example with USDCAD. As you can see It is registered as a tick, while the BID/ASK are the same: image

integracore2 commented 4 years ago

Hi @octopyth,

Thank you for raising this 👍

Yes we're aware of this issue and already working on a patch for release soon.

Many thanks for your interest in the project - much appreciated!

eabase commented 3 years ago

@integracore2 Any updates?

elvinex commented 3 years ago

Hi, To my knowledge there is no way to get the exact time of a tick for other symbols than the chart symbol. However, the current version uses the OnTimer() function to check prices regularly. Therefore, the delay should be relatively small. You can determine the update frequency with the parameter MILLISECOND_TIMER_PRICES.