OPEN-SOURCE SCRIPT
Aggiornato

MA Distance (% and ATR) + Threshold Count

605
MA Distance (% & ATR) + Threshold Count
This script visualizes how far price is extended from key moving averages using both percentage and ATR-based distance. It includes a dynamic threshold system that tracks how unusually extended price is, based on historical volatility.

🔍 Features:
Calculates distance from:

10 EMA, 20 SMA, 50 SMA, 100 SMA, 200 SMA

Measures both:

% distance from each MA

ATR-multiple distance from each MA

Automatically calculates dynamic upper/lower thresholds using a rolling standard deviation

Plots a colored dot when distance exceeds these thresholds

Dots appear above or below the bar depending on direction

Color-coded summary table displays:

% distance

ATR distance

Threshold extremes

Total number of threshold hits

🎯 Customization:
Toggle which MAs to display in the table

Set your own lookback window and threshold sensitivity (via stdev multiplier)

Show/hide dots based on how many thresholds are hit

Use this tool to identify when price is overextended from its moving averages and approaching historically significant levels of deviation. Great for spotting mean reversion setups, parabolic runs, or deep pullbacks.
Note di rilascio
Updating Chart

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.