OPEN-SOURCE SCRIPT

MACD Differential Crossover Alerts & Arrows

127
🔥 MACD Differential Crossover Alerts & Arrows
This lightweight yet powerful indicator tracks momentum shifts using the MACD Differential — the difference between the MACD Line and its Signal Line. When this differential crosses the zero line, it often signals the start of a new trend or an early momentum reversal.

✅ Core Logic:
MACD Line = EMA(Fast Length) − EMA(Slow Length)

Signal Line = EMA(MACD Line, Signal EMA Length)

MACD Differential = MACD Line − Signal Line

📈 Visual Cues:
White Up Arrow when the MACD Differential crosses above zero (bullish signal)

White Down Arrow when it crosses below zero (bearish signal)

Ideal for fast-paced setups on 1-min to 15-min charts

⚙️ Customizable Settings:
Setting Type Default Description
Fast EMA Length Integer 9 Sets the short-term EMA for the MACD Line
Slow EMA Length Integer 20 Sets the long-term EMA for the MACD Line
Signal EMA Length Integer 6 Smooths the MACD Line to form the Signal Line
Show Arrows Boolean true Toggles visibility of up/down arrows on chart
Enable Alerts Boolean true Enables alert conditions for crossover events

🔔 Built-in Alerts:
"MACD Diff crossed ABOVE zero" → Bullish momentum alert

"MACD Diff crossed BELOW zero" → Bearish momentum alert

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.