OPEN-SOURCE SCRIPT
Telah dikemas kini

MA Distance (% and ATR) + Threshold Count

574
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.
Nota Keluaran
Updating Chart

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.