ADX Channel EA for MT5
- Experts
- Alexander Nikolaev
- Version: 1.1
- Updated: 8 March 2021
- Activations: 10
This EA forms a channel based on the readings of the ADX indicator (Average Directional Movement Index), and trades from the boundaries of this channel when the price reversals. This channel is displayed on the chart of the currency pair. A sell trade is executed when the price touches and bounces off the upper channel line, a buy - from the lower one. At the same time, it can filter entries to trades depending on the readings of other indicators: Stochastic, ATR and RSI. The channel drawn by this indicator turns out to be a bit similar to Envelopes or Bollinger, and its lines depend on the market volatility, and additional dotted lines depend on the + DI and -DI readings of the ADX indicator. If necessary, drawing the channel can be disabled, but trading will still occur as if from the channel boundaries. You can set the trading time in the EA, it is recommended to do it at a time when the market is calmer, for example at night.
It is recommended to use timeframes from M5 to M30, any currency pairs when optimizing the settings.
Input parameters
- Lots - lot size (at 0, the lot will be calculated from the percentage of free funds on the account);
- Percentage of free money - percentage of free funds to open each new deal (works when Lots = 0);
- OrdersComments - a comment to deals;
- OrdersFilling - change the way of order execution (some brokers may not support all methods);
- Slippage - slippage (maximum permissible price deviation);
- OpenOrdersDelayBars - delay between opening the next deal;
- TradeEveryTick - define signals and trade every tick (true), or only at the close of the bar (false);
- MaxSpread - maximum spread for opening a trade (so that a trade is opened when the spread is not higher than this value);
- Magic - a unique identifier (you need to make it different if several Expert Advisors are running in the same terminal);
- StopLoss - order closing price when the loss level is reached;
- TakeProfit - order closing price when the profitability level is reached;
- EnableAutoClose - automatic closing of orders upon an opposite signal;
- TrailingStopValue - value of the trailing stop in points (0 - normal trailing stop off);
- StopToParabolicStep - parabolic trailing stop (0 - disabled);
- ADXChannelPeriod - period of the ADX indicator for channel formation;
- Strength - the strength for the formation of the channel (the greater this parameter, the more the channel will depend on the ADX readings);
- Strength2 - strength for the formation of an additional channel, indicated by dashed lines (they depend on the readings of + DI and -DI);
- SignalOf2Lines - open a trade only when two indicator lines intersect at once (if disabled, Strength2 is not used);
- DrawChannelBars - the number of bars for drawing lines of the ADX channel (slows down testing), 0 - do not display the channel;
- ChannelColor - color of ADX channel lines;
- StochasticFilterPeriod - enable filtering of signals by the Stochastic indicator (0 = disabled, more than 0 - setting the period);
- StochasticSlowing - slowing down of the Stochastic indicator;
- StochasticLevels - levels of the Stochastic indicator (for example, 30 means that the levels will be 30 and 70);
- PeriodRSI - period of the RSI indicator (0 - do not use RSI to filter trades);
- LevelsRSI - levels of the RSI indicator;
- AtrPeriod - period of the ATR indicator;
- MinAtrLevel - the minimum level of the ATR indicator allowed for trading;
- MaxAtrLevel - maximum allowable level of the ATR indicator;
- TradingStartHour - trading start hour;
- TradingEndHour - trading end hour;
- EnableInfo - show information from the advisor.