I came across a strange behavior where there were wrong results in non-visual backtest. Finally I realized that retrieving custom indicator values using CopyBuffer on every new tick(up in OnTick function) resolves the issue. Does anyone have a similar experience and can you make it clear why this is happening?
The tester works so by default, by design - MQ did so for the sake of efficiency.
You should read about #property tester_everytick_calculate and add it into your indicator source code, then you will no need to call CopyBuffer on every tick - the tester will recalculate indicator on every tick automatically, but this can negatively affect performance.
- www.mql5.com
The tester works so by default, by design - MQ did so for the sake of efficiency.
You should read about #property tester_everytick_calculate and add it into your indicator source code, then you will no need to call CopyBuffer on every tick - the tester will recalculate indicator on every tick automatically, but this can negatively affect performance.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone.
I came across a strange behavior where there were wrong results in non-visual backtest. Finally I realized that retrieving custom indicator values using CopyBuffer on every new tick(up in OnTick function) resolves the issue. Does anyone have a similar experience and can you make it clear why this is happening?