OPEN-SOURCE SCRIPT

Golden & Death Cross

75
This indicator highlights Golden Cross and Death Cross signals based on customizable moving averages. It is ideal for swing traders and trend-following strategies across various timeframes.

🔍 Features:
Customizable moving average types: Choose between Simple Moving Average (SMA) and Exponential Moving Average (EMA)

Flexible MA lengths: Default 50/200, but can be adjusted to any short/long period (e.g., 9/21 for crypto)

Clear visual markers: Plots labels directly on the chart where crossovers occur

Alert support: Built-in alerts for Golden and Death Cross events

Overlay-enabled: MAs and signals display directly over price action

📈 Signal Logic:
Golden Cross = Short MA crosses above Long MA → bullish signal

Death Cross = Short MA crosses below Long MA → bearish signal

Common configurations:

50/200 EMA → Long-term trend shifts

9/21 EMA → Short-term momentum

🔔 Alerts:
You can create alerts using:

Golden Cross Alert: Triggers on bullish crossover

Death Cross Alert: Triggers on bearish crossover

✅ Use Cases:
Spot major trend shifts

Confirm entry/exit points with moving average dynamics

Combine with volume, RSI, or other filters for advanced strategies

Notes:
This is a basic yet powerful crossover tool. For more advanced filtering, trend confirmation, or backtesting logic, feel free to clone and expand it.

Questions or suggestions? Leave a comment or fork the script for your own use.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.