Sorry, I've put this suggestion in the general Forum instead of the EA one.
It would be nice to have a new backtest mode allowing to use OHLC with the current periodicity instead of 1 min "intra bar " model.
So if we select a backtest on 1H data, we only use the 1H bars to perform the backtest, not the 1 min intra-bars. It will dramatically accelerate the backtesting by up to 60 times for 1H data compare to 1min intra-bars.
This OHLC mode would assume 4 ticks per bar only, only the order of the ticks change regarding the candle type.
- OHLC for a black candle
- OLHC for a white candle
With this method, each deal has to be filled at the exact price, independently from the ticks values.
In addition, adding a slippage parameter for the backtest could help to make the system more resilient.
>> you may use the suggestion option in your profile to suggest directly to the interested right persons (metaqu otes staff)
>> This is a very great idea. Effectively if one want optimize a 4H EA using OHLC, the timeframe is still 4H but OHLC is based on 1 minute tick, but if one does not need 1 minute,
because his EA is constructed to function on 4H (or every other PERIOD), in effectly OLHC 4H would suit best.
>> Here i've not completely understood what you mean
>> This could also be another good idea, but i think this is left and reserved to be programmed directly into EA code
(i remember time ago, MQL staff when inquired for adding special functions to optimizer, they said that many
functions can be programmed directly, insted of be putted in the optimizer window)
Great suggestion of course.
It can be in example like this one (see third option):
Forexistence : the OHLC "tick" method I suggest is only related to the backtest engine.
If the MT5 backtest engine is only "tick based", they can assume OHLC prices as ticks. So a bar produce 4 ticks only but the trade execution must be done not on the tick triggering the order but on the exact price (to avoid execution on H or L prices only). The sequence of the ticks depends on the bar side : OHLC or OLHC.
This is especially usefull when you don't have the intra-bar datas and when an OCO order has its Stop Loss and Take Profit prices included into the same bar, so between H and L. The backtest engine has to evaluate what leg of the OCO have to be triggered first (so canceling the second leg) - do you have a chance to take your profit, or will you take your loss first ?
This is how TS engine works for instance.
Not using intrabar data is not only a question of speed but having the ability to select a "pessimistic" backtest mode.