OPEN-SOURCE SCRIPT
Percentage Distance from 200-Week SMA

200-Week SMA % Distance Oscillator (Clean & Simple)
This lightweight, no-nonsense indicator shows how far the current price is from the classic 200-week Simple Moving Average, expressed as a percentage.
Key features:
• True percentage distance: (Price − 200w SMA) / 200w SMA × 100
• Auto-scaling oscillator (no forced ±100% range → the line actually moves and looks alive)
• Clean zero line
• +10% overbought and −10% oversold levels with subtle background shading
• Real-time table showing the exact current percentage
• Small label on the last bar for instant reading
• Alert conditions when price moves >10% above or below the 200-week SMA
Why 200-week SMA?
Many legendary investors and hedge funds (Stan Druckenmiller, Paul Tudor Jones, etc.) use the 200-week SMA as their ultimate long-term trend anchor. Being +10% or more above it has historically signaled extreme optimism, while −10% or lower has marked deep pessimism and generational buying opportunities.
Perfect for Bitcoin, SPX, gold, individual stocks – works on any timeframe (looks especially good on daily and weekly charts).
Open-source • No repainting • Minimalist & fast
Enjoy and trade well!
This lightweight, no-nonsense indicator shows how far the current price is from the classic 200-week Simple Moving Average, expressed as a percentage.
Key features:
• True percentage distance: (Price − 200w SMA) / 200w SMA × 100
• Auto-scaling oscillator (no forced ±100% range → the line actually moves and looks alive)
• Clean zero line
• +10% overbought and −10% oversold levels with subtle background shading
• Real-time table showing the exact current percentage
• Small label on the last bar for instant reading
• Alert conditions when price moves >10% above or below the 200-week SMA
Why 200-week SMA?
Many legendary investors and hedge funds (Stan Druckenmiller, Paul Tudor Jones, etc.) use the 200-week SMA as their ultimate long-term trend anchor. Being +10% or more above it has historically signaled extreme optimism, while −10% or lower has marked deep pessimism and generational buying opportunities.
Perfect for Bitcoin, SPX, gold, individual stocks – works on any timeframe (looks especially good on daily and weekly charts).
Open-source • No repainting • Minimalist & fast
Enjoy and trade well!
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。