OnTick() EA Function Skips Ticks - page 2

 
Hello Hello.
Please, I have the same problem of different ticks between live and backtest .
My EA code ex:
//
ontick()
{
Print(marketinfoBid)
}
///
I launch my EA live for a minute and I display all the prices per tick.
When I run my MT4 backtest over the same period, I get a different result.

Do you have an idea please, I'm lost

Thank you so much.
 
Amine Tazi #: Hello Hello. Please, I have the same problem of different ticks between live and backtest . My EA code ex: I launch my EA live for a minute and I display all the prices per tick. When I run my MT4 backtest over the same period, I get a different result. Do you have an idea please, I'm lost. Thank you so much.

That is expected behaviour when ticks arrive during the processing of the OnTick() events.

On MT4, there is nothing you can do about it as it does not have a Tick Data history like on MT5, where you would CopyTicks to access all the tick data.

Documentation on MQL5: Timeseries and Indicators Access / CopyTicks
Documentation on MQL5: Timeseries and Indicators Access / CopyTicks
  • www.mql5.com
CopyTicks - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5