OPEN-SOURCE SCRIPT

Percentage Distance from 200-Week SMA

41
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!

إخلاء المسؤولية

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.