OPEN-SOURCE SCRIPT

MA cross X MAdiff<>atrfilter)

1 337
📈 MA cross X MAdiff<>ATR filter
Smarter Trend Confirmation Using Adaptive Volatility Thresholds

🔍 What It Does
This indicator upgrades classic moving average crossovers by adding volatility awareness via ATR filtering. Instead of reacting to every small crossover, it waits for the distance between two moving averages to exceed a volatility-adjusted threshold, making signals more meaningful and less noisy.

⚙️ Core Logic
Calculates the difference between a Fast MA and a Slow MA.

Uses Average True Range (ATR) as a dynamic volatility filter.

Confirms trend only when MA difference exceeds:

diff > ATR × multiplier → Bullish
diff < -ATR × multiplier → Bearish
Otherwise: Neutral (gray zone)


The gray zone avoids false signals by detecting indecision or choppy markets.

🧠 Customizable Inputs
Choose any MA type independently for Fast and Slow:

SMA, EMA, WMA, VWMA, RMA, DEMA, TEMA, LSMA, Kijun

Control sensitivity via:

ATR Length

ATR Multiplier

✅ Why It Works
Reduces fake outs in ranging markets.

Adapts to volatility automatically.

Fully customizable for any asset or style.

Ideal for trend traders, momentum entries, or as a confluence layer.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
OSZAR »