New free code from MQL5: indicators, EAs, and scripts for traders.
extern int FrPeriod = 6; - 6 bars before and 6 bars after the current bar define the fractal
extern int MaxBars = 500; - maximum number of bars for caclucalion
Classic MACD strategy made fully automatic – the MACD Expert Advisor for MT4 handles it all. Check it out.

Thanks for reading. Discover premium MetaTrader solutions at RobotFX.
7157