Reversal Patterns for MT5
- Experts
- Alexander Nikolaev
- Version: 1.0
- Activations: 10
This EA finds technical analysis patterns that often appear before a trend reversal: Double Bottom, Triple Bottom, Head and Shoulders and their opposite counterparts. The Expert Advisor is able to identify them on the chart of a currency pair and trade when the pattern has been formed and it has been broken through. Also, in order to trade excluding unnecessary signals (for example, with weak volatility), you can adjust and optimize the readings of some indicators (Stochastic, ADX) and the filter by candlesticks. In addition, it is possible to optimize the parameters for searching for patterns, for example, to set up finding patterns of a certain size or not very similar to ideal ones (then there will be more deals), or vice versa, by making more accurate patterns, to reduce the number of unnecessary deals.
Input parameters
- Lots - lot size (at 0, the lot will be calculated from the percentage of free funds on the account);
- Percent - percentage of free funds for opening 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 allowable price deviation);
- 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);
- TradeEveryTick - trade every tick (otherwise - only after the bar is closed);
- OpenOrdersDelayBars - delay between opening the next deal;
- 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 a reverse signal;
- TrailingStopValue - trailing stop value in points, (0 - not used);
- StopToParabolicStep - parabolic step for trailing stop (0 - do not use);
- ExtremCountBars - Number of bars to search for extremums when finding a pattern (5-40 is recommended);
- MinExtremDist - The minimum number of bars between 2 extremums of the pattern (rec. 2-12, the higher the value, the larger the size of the pattern);
- MaxExtremDist - The maximum number of bars between 2 extremums of the pattern (10-50 is recommended);
- MultipleVerticesFilter - Filtering to find "extra" highs or lows of a double bottom or top pattern (if enabled, there should be only 2 tops or bottoms);
- PeriodMAforEdgeFiltering - Filtering the edges of double bottom and top shapes by MA so that there is a smooth rise or fall (0 - off 0-10);
- PriceDeviationsParam - The maximum price deviation (depending on volatility) of a currency pair of two extremes (the larger this value, the more the figure may turn out to be a curve, but it will be found more often);
- PriceChangeBeforePattern - How much the value of the price change before the pattern should be less than the size of the pattern itself (1 - 2.5);
- MaxPriceStrengthAfterPattern - Parameter for increasing (and decreasing) the maximum price divergence from the pattern (for example, 1.5 = 1.5 times the size of the pattern);
- SelfTuningParametersCount - Number of attempts to auto-tuning parameters (recommended 0-10, 0 - off);
- PeriodMAforHeadS - period of the moving average for searching for the "Head and shoulders" pattern (and the inverted version), 0 - the pattern is off, 2-10 is recommended;
- MaxPatternShiftForSignal - Maximum distance of the figure from the current bar for a signal to open a deal;
- DrawHistory - The number of bars in the trading history from the current price to search for a reversal pattern;
- StochasticFilterPeriod - filtering signals based on the Stochastic indicator;
- StochasticSlowing - slowing down of the Stochastic indicator;
- StochasticLevels - levels of the Stochastic indicator;
- CandleFilterStrength - parameter for setting filtering by candles (0-off);
- MinLenForCandleFilter - minimum candlestick length for filtering;
- AdxPeriod - period of the ADX indicator;
- MinAdxLevel - minimum level of the ADX indicator;
- MaxAdxLevel - maximum level of the ADX indicator;
- TradingStartHour - trading start hour;
- TradingEndHour - trading end hour;
- ShowPatterns - show the appearance of the shape.