MACD signal EA: no-code builder for MT4 / MT5
TrendCrossovers of the MACD line and its signal line: crossing above is bullish, crossing below is bearish. It fires earlier than a zero-line cross. But it also gives more false signals in ranging markets.
Rules you can build with it
Works as an entry rule or an exit rule. Short rules are mirrored automatically.
- LongMACD line crosses above Signal lineShortMACD line crosses below Signal line
- LongMACD line crosses below Signal lineShortMACD line crosses above Signal line
- LongMACD line is above Signal lineShortMACD line is below Signal line
- LongMACD line is below Signal lineShortMACD line is above Signal line
Settings
| Settings | Default | Range |
|---|---|---|
| Fast period | 12 | 2 – 50 |
| Slow period | 26 | 5 – 100 |
| Signal period | 9 | 2 – 30 |
| Price | Close | Close / Opening price / High / Low / Median price / Typical price / Weighted close |
How the backtest and the EA calculate it
Following MT5, the signal line is a simple average of the MACD line, so crossovers can land on slightly different candles than in charting software that uses an exponential average.
Signals use only closed candles and are filled at the next candle's open. The exported EA checks conditions in the same order, so you get similar results in the MT5 Strategy Tester.
Example strategies
- Entry · MACD signal (12, 26, 9, Close): MACD line crosses above Signal line
- Stop-loss 300 points, take-profit 600 points
- Entry · MACD signal (12, 26, 9, Close): MACD line crosses above Signal line
- Entry · Moving Average (50, EMA, Close): MA rises
- Stop-loss 300 points, take-profit 600 points
Examples are just a starting point: open one to change settings or add filters, then check it with backtests and robustness tests. Backtest results don't indicate future returns.