OPEN-SOURCE SCRIPT

MA cross X MAdiff<>atrfilter)

2 114
📈 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.

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。