Idea by: Iurii Tokman.
MQL5 code by: Vladimir Karputov.
The EA does not use any indicators – only the current price and the OHLC of zero bar (the rightmost bar in the chart).
Working algorithm: As soon as the price rolls down from the High at the Rollback rate distance and we are within the new bar – it is a signal to open a BUY position; if the price moves above the Low at the Rollback rate distance and we are within the new bar – it is a signal to open a SELL position.
In the parameters, you can enable trailing and reversing signals for opening positions.
Inputs
- Lots – position volume;
- Stop Loss – Stop Loss;
- Take Profit – Take Profit;
- Trailing Stop – trailing;
- Trailing Step – trailing step;
- Timeframe – timeframe, from which OHLC and bar opening time are taken;
- Rollback rate – rollback from the price;
- Reverse signal – reverse flag of signals for opening positions;
- magic number – unique identifier for the EA.
Test results (parameter “Balance max”) for all symbols on D1 in the “Every tick based on real ticks” from 2018.01.01 to 2018.05.10: