Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Expert Advisor | Rollback system

The author of the idea - Scriptor

mq5 code author - barabashkakvn

Defining the channel width (Channel Open Close) for a previous day. If the channel width is sufficient, then the amount of roll-back is determined (Rollback AND Channel Rollback). Drawing OBJ_RECTANGLE objects.

The EA works on PERIOD_H1 timeframe - this parameter is registered within the code and is not included into the inputs. Disabled work on Monday abd Friday. If there are no positions, and the last known time of the trading server is from 00:00 to 00:03 - then you can check the channel and the roll-back.  

The channel width is calculated as a difference between Open of bar #24 and Close of bar #1.

If the position opening condition is met, the channel is displayed as the OBJ_RECTANGLE object:

MetaTrader Experts, Indicators, Scripts and Libraries

MetaTrader Experts, Indicators, Scripts and Libraries

22142