PROTECTED SOURCE SCRIPT
indicator("Rotation Oscillator (Sectors / Metals / Crypto) + USD

This indicator builds a rotation/relative-strength oscillator for Sectors, Metals, or Crypto using a fixed analysis timeframe (Daily/Weekly) regardless of your chart.
It calculates Fast and Slow signals as the spread between a “bull basket” and a “bear/benchmark” basket using percent returns over TF-aware lookbacks (Daily: 11/22, Weekly: 5/10). In Crypto mode, Auto defaults to Weekly to avoid the 7-day crypto vs 5-day equities calendar mismatch.
Signal quality is improved with:
• Volatility normalization per leg (Off / Stdev-scaled / Z-score)
• Adaptive USD headwind using a rolling beta to UUP (optional trend-gated)
• A USD divergence/convergence module that can boost the score or gate alerts based on whether price action aligns with the expected USD relationship
• Debounced alerts using a deadband and multi-bar confirmation to reduce whipsaws
Outputs:
• Slow (histogram) and Fast (line) adjusted oscillator
• Optional UUP % reference and optional USD div/conv score
• Alerts when Fast/Slow move beyond the deadband and hold for the chosen confirmation bars (optionally filtered by USD div/conv gate)
It calculates Fast and Slow signals as the spread between a “bull basket” and a “bear/benchmark” basket using percent returns over TF-aware lookbacks (Daily: 11/22, Weekly: 5/10). In Crypto mode, Auto defaults to Weekly to avoid the 7-day crypto vs 5-day equities calendar mismatch.
Signal quality is improved with:
• Volatility normalization per leg (Off / Stdev-scaled / Z-score)
• Adaptive USD headwind using a rolling beta to UUP (optional trend-gated)
• A USD divergence/convergence module that can boost the score or gate alerts based on whether price action aligns with the expected USD relationship
• Debounced alerts using a deadband and multi-bar confirmation to reduce whipsaws
Outputs:
• Slow (histogram) and Fast (line) adjusted oscillator
• Optional UUP % reference and optional USD div/conv score
• Alerts when Fast/Slow move beyond the deadband and hold for the chosen confirmation bars (optionally filtered by USD div/conv gate)
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.