It uses the knowledge about the M1 OHLC tick generation algorithm in Strategy Tester of MetaTrader 5: If the price began to decrease after the new bar opening, it is guaranteed that it will increase in the next price change and vice versa.
Attention: The “Open prices only” and “1 minute OHLC” modes of Strategy Tester can be used ONLY for rough and fast estimation of strategy performance.
The Expert Advisor is profitable only if the “Open prices” only or “1 minute OHLC” modes used in Strategy Tester.
With enabled Money Management (RISK parameter)
It uses the possibility to read the OHLC ticks (using onTimer event), generated by Startegy Tester in “Open prices only” and “1 minute OHLC”.