Testing a daily loss limit EA: why "1 minute OHLC" gave me 105% and real ticks gave 90%

I was testing a daily loss lock in the Strategy Tester (100,000 account, 5% daily limit = 5,000, lock set at 90% of the limit).

With "1 minute OHLC" the lock fired late: the day closed at 105% of the limit. With "Every tick based on real ticks" it locked at 90.0% (−4,501), exactly as designed.

The reason: OHLC mode only knows 4 prices per minute. Inside a fast minute the equity can drop far below the level you check, and the tester never "sees" that drop until the next bar.

If you test anything that reacts to equity (loss limits, trailing equity stops, max drawdown guards), use real ticks or at least "Every tick". Otherwise the results look worse (or better) than reality.

Did anyone else see big differences between modelling modes for equity-based logic?
Youness Kanbaou:
Did anyone else see big differences between modelling modes for equity-based logic?

Of course we have seen that. Execution of SL's and TP's is estimated while testing on OHLC prices. This is not a bug. It's a feature.

Testing on OHLC prices is fine for EA's that trade on OHLC prices─in my Renko chart trading, for example.

Ryan L Johnson #:

Of course we have seen that. Execution of SL's and TP's is estimated while testing on OHLC prices. This is not a bug. It's a feature.

Testing on OHLC prices is fine for EA's that trade on OHLC prices─in my Renko chart trading, for example.

Agreed, for logic that decides on closed bars (Renko, bar-close entries) OHLC is fine and much faster.

The case where it bit me is the opposite one: a guard that has to react inside the bar. A daily loss lock watches equity tick by tick, and on OHLC it only gets 4 prices per minute, so on a fast candle it fires late. Entries can be tested on bars, but anything that protects the account from intra-bar moves needs ticks.

So my rule now: bars for the strategy, ticks for the risk layer.

Actual ticks can greatly affect strategies depending on the frequency and timeframes used.

Compare a mean reversion strategy on mean reversion (BB) with a time frame (TF) of 1 and the same strategy with a time frame (TF H1). Of course, in a market without a high spread like WIN$N, you'll see the utter chaos. Furthermore, depending on the historical data, it can even simulate synthetic ticks, and that's where the danger lies!

Samuel De Souza Ferreira #:

Actual ticks can greatly affect strategies depending on the frequency and timeframes used.

Compare a mean reversion strategy on mean reversion (BB) with a time frame (TF) of 1 and the same strategy with a time frame (TF H1). Of course, in a market without a high spread like WIN$N, you'll see the utter chaos. Furthermore, depending on the historical data, it can even simulate synthetic ticks, and that's where the danger lies!

Good point on synthetic ticks, that is the trap inside the "real ticks" option too. If the broker has no tick history for a period, the tester quietly fills it with generated ticks, and the result looks like a real-tick test when it is not.

What I check now before trusting any run: the "History Quality" line in the tester report. For a risk guard I want it close to 100% for the test days, otherwise the lock timing is again a guess.

And agreed on timeframes: the faster the strategy, the more the modelling mode matters. A risk layer is the extreme case, because it has to act within seconds whatever timeframe the strategy uses.