OPEN-SOURCE SCRIPT
Multi-Timeframe Golden Cross_Raden (DCMS)

How the Script Works
The f_checkGoldenCross function:
Calculates the fast MA (50-day SMA) and slow MA (200-day SMA) for a given timeframe.
Returns true if a Golden Cross (fast MA crossing over slow MA upwards) occurs, false otherwise.
Detection per Timeframe:
Golden Crosses are checked for 8 timeframes: 1m, 5m, 15m, 1h, 4h, D, W, M.
If a crossover occurs, a green label with the text "GC" + the timeframe appears above the candle.
Visualization:
The fast MA (blue) and slow MA (red) are plotted on the current timeframe chart.
The Golden Cross label appears for each timeframe that detects a crossover.
Alerts:
Automatic alerts for Golden Crosses on the current timeframe chart (via maFastCurrent and maSlowCurrent).
Additional alerts for each timeframe (1m, 5m, etc.) so you can set notifications separately in TradingView.
___---Important Notes---___
Historical Data: Ensure the chart has enough bars (at least 200 for the 200-day MA) on the higher timeframes (W, M). If there's not enough data, the Golden Cross on those timeframes won't be detected.
Performance: Since we're explicitly checking 8 timeframes, this script should be lighter than an array loop, but still performs well on charts with long data sets.
Customization: If you'd like to add filters (for example, volume or RSI to confirm the Golden Cross), let me know, and I'll add them!
Debugging: If the error persists, copy and paste the error message from PineScript Editor or a screenshot, and I'll help you troubleshoot.
The f_checkGoldenCross function:
Calculates the fast MA (50-day SMA) and slow MA (200-day SMA) for a given timeframe.
Returns true if a Golden Cross (fast MA crossing over slow MA upwards) occurs, false otherwise.
Detection per Timeframe:
Golden Crosses are checked for 8 timeframes: 1m, 5m, 15m, 1h, 4h, D, W, M.
If a crossover occurs, a green label with the text "GC" + the timeframe appears above the candle.
Visualization:
The fast MA (blue) and slow MA (red) are plotted on the current timeframe chart.
The Golden Cross label appears for each timeframe that detects a crossover.
Alerts:
Automatic alerts for Golden Crosses on the current timeframe chart (via maFastCurrent and maSlowCurrent).
Additional alerts for each timeframe (1m, 5m, etc.) so you can set notifications separately in TradingView.
___---Important Notes---___
Historical Data: Ensure the chart has enough bars (at least 200 for the 200-day MA) on the higher timeframes (W, M). If there's not enough data, the Golden Cross on those timeframes won't be detected.
Performance: Since we're explicitly checking 8 timeframes, this script should be lighter than an array loop, but still performs well on charts with long data sets.
Customization: If you'd like to add filters (for example, volume or RSI to confirm the Golden Cross), let me know, and I'll add them!
Debugging: If the error persists, copy and paste the error message from PineScript Editor or a screenshot, and I'll help you troubleshoot.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.