OPEN-SOURCE SCRIPT
Price vs Moving Average Cross (Golden & Death Signals)

This indicator detects price crossings against multiple moving averages, not crossings between moving averages themselves.
🔹 Core Concept
A Golden Signal occurs when the price (close) crosses above a selected moving average.
A Death Signal occurs when the price (close) crosses below a selected moving average.
⚠️ This is NOT a moving-average-to-moving-average crossover indicator.
It is a price-to-moving-average crossover indicator.
📈 Moving Average Settings
The indicator uses three independent moving averages, each configurable by the user:
1️⃣ Moving Average 1 (Golden Signal)
Default: 20-period
Type: EMA or SMA
Signal:
Price crossing above MA → Golden Signal
2️⃣ Moving Average 2 (Golden Signal)
Default: 50-period
Type: EMA or SMA
Signal:
Price crossing above MA → Golden Signal
3️⃣ Moving Average 3 (Death Signal)
Default: 100-period
Type: EMA or SMA
Signal:
Price crossing below MA → Death Signal
🔔 Signal Logic
Signal Type Condition
Golden Cross 1 Close price crosses above MA 1
Golden Cross 2 Close price crosses above MA 2
Death Cross Close price crosses below MA 3
Each signal is evaluated independently.
📊 Visual Representation
Green Up Arrow → Price crosses above MA 1
Purple Up Arrow → Price crosses above MA 2
Red Down Arrow → Price crosses below MA 3
All moving averages are plotted directly on the price chart.
🎯 Practical Use Cases
Identifying trend initiation points
Confirming pullback breakouts
Acting as an entry timing assistant
Using MA 3 as a trend filter / exit warning
⚠️ Important Notes
This indicator may generate false signals in sideways or ranging markets.
Best used in combination with:
Higher-timeframe trend confirmation
Volume indicators
Support & resistance levels
🧠 Summary
✔️ Price ↔ Moving Average crossover
❌ Moving Average ↔ Moving Average crossover
This indicator is designed for trend-following traders who want clear and simple price confirmation signals.
원하시면
“True MA Golden Cross version”
Scalping-optimized version (3m / 5m)
Trend + Momentum filtered version
🔹 Core Concept
A Golden Signal occurs when the price (close) crosses above a selected moving average.
A Death Signal occurs when the price (close) crosses below a selected moving average.
⚠️ This is NOT a moving-average-to-moving-average crossover indicator.
It is a price-to-moving-average crossover indicator.
📈 Moving Average Settings
The indicator uses three independent moving averages, each configurable by the user:
1️⃣ Moving Average 1 (Golden Signal)
Default: 20-period
Type: EMA or SMA
Signal:
Price crossing above MA → Golden Signal
2️⃣ Moving Average 2 (Golden Signal)
Default: 50-period
Type: EMA or SMA
Signal:
Price crossing above MA → Golden Signal
3️⃣ Moving Average 3 (Death Signal)
Default: 100-period
Type: EMA or SMA
Signal:
Price crossing below MA → Death Signal
🔔 Signal Logic
Signal Type Condition
Golden Cross 1 Close price crosses above MA 1
Golden Cross 2 Close price crosses above MA 2
Death Cross Close price crosses below MA 3
Each signal is evaluated independently.
📊 Visual Representation
Green Up Arrow → Price crosses above MA 1
Purple Up Arrow → Price crosses above MA 2
Red Down Arrow → Price crosses below MA 3
All moving averages are plotted directly on the price chart.
🎯 Practical Use Cases
Identifying trend initiation points
Confirming pullback breakouts
Acting as an entry timing assistant
Using MA 3 as a trend filter / exit warning
⚠️ Important Notes
This indicator may generate false signals in sideways or ranging markets.
Best used in combination with:
Higher-timeframe trend confirmation
Volume indicators
Support & resistance levels
🧠 Summary
✔️ Price ↔ Moving Average crossover
❌ Moving Average ↔ Moving Average crossover
This indicator is designed for trend-following traders who want clear and simple price confirmation signals.
원하시면
“True MA Golden Cross version”
Scalping-optimized version (3m / 5m)
Trend + Momentum filtered version
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.