![]()
This Expert Advisor identifies trend reversals based on fractals and some other indicators. If the fractals were formed after a prolonged fall, and the last fractal did not update the minimum of the previous bar's lower fractal, then a trend reversal is determined (at the same time, there must be a fractal in the middle, which is higher than the others). In case other indicators allow trading, a trade is performed (their settings can be customized for optimization).
Input 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 - percentage of free margin to open each new trade (applicable when Lots=0);
- MaxSpread - the 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 in points;
- TakeProfit - take profit in points;
- Stop to breakeven after - move stop loss to breakeven after a specified number of points;
- TrailingStopValue - trailing stop value in points (distance from the current price of the currency pair), if set to 0, trailing stop is not used;
- OrderComments - comments of opened orders.
- FastMAPeriod - period of the fast moving average.
- SlowMAPeriod - period of the slow moving average.
- EnableMACD - enable/disable the MACD indicator.
- MACDPeriod1 - period of the first MACD line.
- MACDPeriod2 - period of the second MACD line.
- SignalMACD - period of the MACD signal line (0 - do not use the signal line).
- 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.
Some test results and settings are available in the Comments section.