EA DualChannel SqrtMA
The Expert Advisor performs the opening of trades by the signals of the Dual-Channel indicator, as well as their maintenance. The root-mean-square moving average is used as an auxiliary indicator. The long trade is opened when the Dual-Channel indicator "draws" a blue arrow, the signal candlestick is located above the moving average, directed upwards. The short trade is opened when the Dual-Channel indicator "draws" a red arrow, the signal candlestick is located below the moving average, directed downwards. Examples of trades are shown in the screenshots.
The trade maintenance settings use the take profit (trade target level), stop loss (maximum loss level), breakeven level - the distance in points after passing which the stop loss is moved to the opening level + spread, profit step - the distance in points after passing which a part of the position is closed, profit factor - percentage of the partial position closure, trailing stop - the level to move the stop loss from the price ((activated after breakeven).
The EA cal also limit the time allowed for opening trades - start and end hours. Maintenance and closure of trades works without limitations
Settings of the Expert Advisor
- Lots - Volume of opened trades;
- stepProfit - profit step in points;
- stepProfit_factor - profit factor;
- stopLoss - stop loss in points (if 0, then the level of the Dual-Channel indicator is used);
- takeProfit - target profit (can be 0);
- trailStop - trailing stop level in points;
- trailStep - trailing step in points (the minimum distance to move the stop loss);
- noLoss - breakeven level in points;
- ChMin - the minimum length of the Dual-Channel indicator channel;
- ChMax - the maximum length of the Dual-Channel indicator channel;
- SignalLive - signal lifetime of the Dual-Channel indicator;
- MaPeriod - root-mean-square moving average period;
- MaPrice - root-mean-square moving average applied price;
- timeStart - trading start hour;
- timeEnd - trading end hour;
- Slippage - slippage in points;
- MAGIC - "magic number" to identify the EA orders.
Default parameters of the Expert Advisor are designed for 5-digit quotes. When using the EA with different quotes, it is necessary to change the parameter values specified in points accordingly.
Notes, comments and reasoned criticism is welcome.