Bollinger And TrendLines
The Expert Advisor is based on Bollinger bands and trend lines. When the price touches the lower line of the Bollinger bands and goes back or rolls back from one or several trend lines, a buy is performed. The same is true for selling. The EA can also use two Bollinger bands indicators, so that a trade is performed between the lines of the two indicators with different deviations. The EA features many other settings. For example, a trade can be moved to a breakeven only when touching the central Bollinger band and passing a certain number of points.
The EA can be used on any currency pairs and timeframes from M5 to D1. Do not forget to optimize parameters.
- Lots - lot size (if Lots=0, then the lot will be calculated based on the percentage of account free margin);
- Percentage of free money - the percentage of free margin to open each new trade (applicable when Lots=0);
- MaxSpread - maximum allowable spread to open trades (for floating-spread symbols, to avoid opening with a large spread);
- Magic - unique identifier (use different magic numbers if multiple Expert Advisors run in your terminal);
- StopLoss - Stop Loss order value;
- TakeProfit - order closing price at a certain profit target;
- Stop to breakeven after - move stop loss to a breakeven after a specified number of points;
- TrailingStopValue - trailing stop in points, 0 - not used;
- EnableAutoClose - automatic closure of orders in case of a reverse signal;
- HistorySearch - number of bars in history to search for the trend lines and channels (recommended range - from 30 to 200);
- MinFractalsDistance - minimum distance between the nearest fractals for plotting lines (recommended vales are from 1 to 20);
- MaxCountLines - maximum number of trend lines (recommended range - even numbers from 2 to 30);
- Number of lines relating to prices - minimum number of lines, that touch the price bar for opening a deal (recommended values are from 1 to 7);
- FastMethod - enable/disable the fast (but less reliable) method of plotting lines and channels;
- FindChannels - switch between channels and lines (LinesOnly - common lines, Channels - draw channels, OppositeLine - draw opposite lines);
- BollingerPeriod - Bollinger bands period;
- BollingerDeviations - Bollinger bands deviations;
- Bollinger2Enable - enable/disable the second Bollinger bands indicator;
- Bollinger2Period - second Bollinger bands indicator period;
- Bollinger2Deviations - second Bollinger bands indicator deviations (this parameter value should be less than the first indicator deviations and may even become negative);
- BreakevenAfterTouchCenter - enable/disable moving a trade to a breakeven when the price touches the central Bollinger band;
- AdxPeriod - ADX indicator period;
- MinAdxLevel - ADX indicator minimum level;
- MaxAdxLevel - ADX indicator maximum level;
- Trading start hour - trading start hour;
- Trading end hour - trading end hour;
- ShowLinesAndInfo - display lines and data.
The additional tests and settings for different currency pairs and timeframes can be found in the Comments section.
TrailingStopValue - trailing stop in points (distance from the current price of a currency pair), 0 - not used.