Downsampling of ticks

 

I am using the MT5 platform and noticed I never receive ticks closer together than 200 ms even during high volatility. Not via the OnTick() method, nor via CopyTicks() or CopyTicksRange(). However, my orders get filled at prices that do not correspond to any of these ticks. This suggests the MT5 server is somehow condensing the tick stream.

During backtesting the entries are always on an actual tick price (which makes sense, obviously), but this implies that backtesting will not reflect what happened in reality. In backtest I am getting filled at significantly different prices than my live account.

Where can I read more about this? Is the server just removing some ticks? Is the server averaging prices?

 
 
fxsaber #:
Snapshot.

Thanks. Yes, that is a way to measure the minimum time between two ticks. I did it differently by downloading millions of ticks using CopyTicks() and stored them in a CSV file.

However, what is the MT5 platform doing to reduce the amount of ticks? Which ticks does it drop, or how does it combine ticks into one if the volatility is too high?

 
yoriz: I am using the MT5 platform and noticed I never receive ticks closer together than 200 ms even during high volatility. Not via the OnTick() method, nor via CopyTicks() or CopyTicksRange(). However, my orders get filled at prices that do not correspond to any of these ticks. This suggests the MT5 server is somehow condensing the tick stream. During backtesting the entries are always on an actual tick price (which makes sense, obviously), but this implies that backtesting will not reflect what happened in reality. In backtest I am getting filled at significantly different prices than my live account. Where can I read more about this? Is the server just removing some ticks? Is the server averaging prices?

No, that is not the case. Depending on the broker and the symbol being traded, I have actually on occasions had multiple ticks within one millisecond.

When I first detected this, I had to alter my code because the MqlTick structure only has a millisecond timestamp. So in order to track and process data from CopyTicks, I had to implement a counter when it detected duplicate millisecond timestamps.

So, if you are having a different experience, then it is your broker and not the MT5 platform. It may also be that your account or broker is a dealing desk, and the ticks you receive do not correspond to the ones from the underlying liquidity provider.

 
Fernando Carreiro #:

No, that is not the case. Depending on the broker and the symbol being traded, I have actually on occasions had multiple ticks within one millisecond.

When I first detected this, I had to alter my code because the MqlTick structure only has a millisecond timestamp. So in order to track and process data from CopyTicks, I had to implement a counter when it detected duplicate millisecond timestamps.

So, if you are having a different experience, then it is your broker and not the MT5 platform. It may also be that your account or broker is a dealing desk, and the ticks you receive do not correspond to the ones from the underlying liquidity provider.

Thanks. I have checked millions of ticks and *NEVER* seen two ticks with less than 200 ms. Here is a random sample of a few hundred ticks:


There is clearly some limit at 0.200 seconds. These ticks were downloaded using CopyTicks(), not by sampling OnTick() so this can not be related to the execution speed of the code.

So, if you are having a different experience, then it is your broker and not the MT5 platform. It may also be that your account or broker is a dealing desk, and the ticks you receive do not correspond to the ones from the underlying liquidity provider.

Now I am worried. I was confused why I got filled at a price that does not correspond to any nearby tick, but thought it had to do with the high volatility (11 point jump between two ticks. I got filled somewhere in the middle between these two ticks). But you suggest it could be I am not seeing the actual ticks of the liquidity provider?

Time to ask my broker some questions, I guess :-(

 
yoriz #: Thanks. I have checked millions of ticks and *NEVER* seen two ticks with less than 200 ms. Here is a random sample of a few hundred ticks: There is clearly some limit at 0.200 seconds. These ticks were downloaded using CopyTicks(), not by sampling OnTick() so this can not be related to the execution speed of the code. So, if you are having a different experience, then it is your broker and not the MT5 platform. It may also be that your account or broker is a dealing desk, and the ticks you receive do not correspond to the ones from the underlying liquidity provider. Now I am worried. I was confused why I got filled at a price that does not correspond to any nearby tick, but thought it had to do with the high volatility (11 point jump between two ticks. I got filled somewhere in the middle between these two ticks). But you suggest it could be I am not seeing the actual ticks of the liquidity provider? Time to ask my broker some questions, I guess :-(

As I have stated, there is no such limit on the MT5 platform! Try a different symbol with higher tick count and/or a broker with ECN accounts that provide true direct connections with the liquidity provider.

 
Fernando Carreiro #:

As I have stated, there is no such limit on the MT5 platform! Try a different symbol with higher tick count and/or a broker with ECN accounts that provide true direct connections with the liquidity provider.

Thank you. This is EURUSD which usually has a high tick count. Even during strong breakouts due to news (jumps of 11 points between ticks!) there is still 200 ms between ticks. My broker claims to be an ECN broker, but clearly is not.

May I send you a private message for a personal question?

 
yoriz #: Thank you. This is EURUSD which usually has a high tick count. Even during strong breakouts due to news (jumps of 11 points between ticks!) there is still 200 ms between ticks. My broker claims to be an ECN broker, but clearly is not. May I send you a private message for a personal question?

You may if you wish!

 
yoriz #: My broker claims to be an ECN broker, but clearly is not.

It also depends on the account type. It can be an ECN broker but offer both types of accounts.

 
.
 

Here is a quick sample of ticks on one of my accounts, less then 200ms difference between them. This account is not even an ECN account, but it is a STP.