This Expert Advisor trades when the trend line breaks, or the maximum (minimum) price. Trend lines and extremes are located according to the specified parameters.In addition to trading, it also displays line data on the chart.Trading occurs when the price goes over the line and the candle closes. Also, the EA may not trade if there is low volatility in the market, or other filters do not allow it to do so in order to cut off non-profitable trades. It can set a stop loss on a parabolic, or use a simple trailing stop.
The EA is easy to use, it can be optimized for various currency pairs and timeframes.
- Lots – lot size (at 0, the lot will be calculated from the percentage of available funds on the account);
- Percent – percentage of available funds to open each new transaction (works when Lots=0);
- OrdersComments – comment on transactions;
- OrdersFilling – changing the order execution method (some brokers may not support all methods);
- Slippage – slippage (maximum allowable deviation of the price);
- OpenOrdersDelayBars – delay between opening the next transaction;
- TradeEveryTick – detect signals and trade every tick (true), or only at the close of the bar (false);
- MaxSpread – maximum spread for opening a trade (so that the trade is opened when the spread is not higher than this value);
- Magic is a unique identifier (you need to make it different if several Expert Advisors are running in the same terminal);
- StopLoss – the closing price of the order when the loss level is reached;
- TakeProfit – order closing price when the profitability level is reached;
- EnableAutoClose – automatic closing of orders with a reverse signal;
- TrailingStopValue – the value of the trailing stop in points (0 – normal trailing stop off);
- StopToParabolicStep – trailing stop on parabolic (0 – off);
- TradingRange – the number of bars in the trading range where the highs and lows will be determined;
- MinTradingRange – the minimum number of bars of the trading range to find the trend line (0-do not use);
- StepTradingRange – the step of changing the trading range (active when the MinTradingRange parameter is greater than 0 and less than TradingRange);
- Distance – the minimum distance from one maximum (minimum) to another to build trend lines;
- Shift – shift to determine the breakout, relative to the trading range;
- Shift2 – shift to determine the breakout of an inclined trend line;
- StochasticFilterPeriod – enabling signal filtering by the Stochastic indicator (0 = off, more than 0 – setting the period);
- StochasticSlowing – deceleration of the Stochastic indicator;
- StochasticLevels – Stochastic indicator levels (for example, 30 means that the levels will be 30 and 70);
- StrongFilteringByStochastic – enhanced stochastic signal filtering;
- CandleFilterStrength – filtering the signal by candles (0 – off, 0.1-10 – the required candle strength for the signal);
- MinLenForCandleFilter – minimum candle length for signal filtering;
- MAFilterPeriod – the period of the moving average indicator for filtering the signal (0 – the filter is off);
- MAFilterPeriod2 – the period of the second moving average for filtering the signal;
- AdxPeriod – the period of the ADX indicator;
- MinAdxLevel – the minimum level of the ADX indicator (for example, 6.5);
- TradingStartHour – trading start hour;
- TradingEndHour – trading end hour;
- EnableInfo – show various information from this Expert Advisor on the chart;
- TrendLinesColor – line construction color;
[spoiler title=”Read More…”]
Created based on the indicator:
[/spoiler]