Smart Moving Average Dynamics [ChartNation]

What it does:
SMAD maps how far price deviates from a chosen moving average and normalizes that distance into a bounded oscillator (−100…+100). It detects extreme expansions and prints non-repainting dots when the move exits an extreme. Price-level rails are drawn from those events (with optional fade/expiry) to highlight likely reaction zones. The MA line is colored by bias. A slim gauge summarizes the current oscillator percentile; a compact info panel shows TF, Trend, Volume rank, and Volatility rank.
How it works (high-level, closed-source)
Core signal: diff = price – MA(type, length) where MA can be SMA/EMA/RMA/WMA/VWMA.
Normalization (choose one):
- Highest Abs (N): scales diff by the highest absolute excursion over N bars (fast, adaptive).
- Z-Score: scales by stdev(diff, N) and maps ±σ to ±100 via a user factor.
- ATR-Scaled: scales by ATR * k, relating deviation to current volatility.
Percent Rank: ranks the magnitude of |diff| over N bars and reapplies the original sign.
All methods clamp to −100…+100 to keep visuals consistent across assets/TFs.
Extremes & confirmation: Dots print only when an extreme exits ±100 (optionally on bar close) and can be filtered by linger bars and short-term slope flip, reducing one-bar spikes.
Rails: When an extreme confirms, a rail is anchored at the corresponding price swing and can soft-fade and/or expire after X bars.
Trend color: MA color = Up (green) when oscillator > threshold and MA slope > 0; Down (magenta) for the opposite; Neutral otherwise.
Context panels:
Slim Gauge: current oscillator bucket (0–20) with the exact normalized reading.
Info Panel: TF, Trend, and 0–100 percent-ranks of Volume and ATR-based volatility grouped as Low / Medium / High.
SMAD isn’t a collection of plots; it’s a single framework that integrates:
- a deviation-from-MA engine,
- four interchangeable normalization models (selected per market regime),
- a gated extreme detector (linger + slope + confirm-on-close), and
- time-aware rails with soft fade/expiry, presented with a minimal gauge and info panel so traders can compare regimes across TFs without recalibrating thresholds.
How to use (examples, not signals)
- Mean-revert plays: When price exits an extreme and prints a dot, look for reactions near the new rail. Combine with your S/R and risk model.
- Trend continuation: In strong trends the oscillator will spend more time above/below zero; the colored MA helps keep you aligned and avoid fading every push.
- Regime switching: Try Percent Rank or ATR-Scaled on choppy/alts; Z-Score on majors; Highest Abs (N) when you want fastest adaptation.
- Risk ideas: Rails can be used as partial-take or invalidate levels. Always backtest on your pair/TF.
Key settings
- Normalization: Highest Abs / Z-Score / ATR-Scaled / Percent Rank (with N & factors).
- Filters: Extreme threshold, linger bars, slope lookback, confirm on close.
- Rails: Expire after X bars; soft-fade step.
- Panels: Slim gauge (bottom-right), Info panel (middle-right).
Notes & limits
Prints confirm after the extreme exits ±100; nothing repaints retroactively.
Normalization can change sensitivity—choose the one matching your asset’s regime.
What it does:
SMAD maps how far price deviates from a chosen moving average and normalizes that distance into a bounded oscillator (−100…+100). It detects extreme expansions and prints non-repainting dots when the move exits an extreme. Price-level rails are drawn from those events (with optional fade/expiry) to highlight likely reaction zones. The MA line is colored by bias. A slim gauge summarizes the current oscillator percentile; a compact info panel shows TF, Trend, Volume rank, and Volatility rank.
How it works:
Core signal: diff = price – MA(type, length) where MA can be SMA/EMA/RMA/WMA/VWMA.
Normalization (choose one):
- Highest Abs (N): scales diff by the highest absolute excursion over N bars (fast, adaptive).
- Z-Score: scales by stdev(diff, N) and maps ±σ to ±100 via a user factor.
- ATR-Scaled: scales by ATR * k, relating deviation to current volatility.
- Percent Rank: ranks the magnitude of |diff| over N bars and reapplies the original sign. All methods clamp to −100…+100 to keep visuals consistent across assets/TFs.
Extremes & confirmation: Dots print only when an extreme exits ±100 (optionally on bar close) and can be filtered by linger bars and short-term slope flip, reducing one-bar spikes.
Rails: When an extreme confirms, a rail is anchored at the corresponding price swing and can soft-fade and/or expire after X bars.
Trend color: MA color = Up (green) when oscillator > threshold and MA slope > 0; Down (magenta) for the opposite; Neutral otherwise.
Context panels:
- Slim Gauge: current oscillator bucket (0–20) with the exact normalized reading.
- Info Panel: TF, Trend, and 0–100 percent-ranks of Volume and ATR-based volatility grouped as Low / Medium / High.
SMAD isn’t a collection of plots; it’s a single framework that integrates:
- a deviation-from-MA engine,
- four interchangeable normalization models (selected per market regime),
- a gated extreme detector (linger + slope + confirm-on-close), and
- time-aware rails with soft fade/expiry, presented with a minimal gauge and info panel so traders can compare regimes across TFs without recalibrating thresholds.
How to use (examples, not signals)
- Mean-revert plays: When price exits an extreme and prints a dot, look for reactions near the new rail. Combine with your S/R and risk model.
- Trend continuation: In strong trends the oscillator will spend more time above/below zero; the colored MA helps keep you aligned and avoid fading every push.
- Regime switching: Try Percent Rank or ATR-Scaled on choppy/alts; Z-Score on majors; Highest Abs (N) when you want fastest adaptation.
- Risk ideas: Rails can be used as partial-take or invalidate levels. Always backtest on your pair/TF.
Key settings
- Normalization: Highest Abs / Z-Score / ATR-Scaled / Percent Rank (with N & factors).
- Filters: Extreme threshold, linger bars, slope lookback, confirm on close.
- Rails: Expire after X bars; soft-fade step.
- Panels: Slim gauge (bottom-right), Info panel (middle-right).
Notes & limits
- Prints confirm after the extreme exits ±100; nothing repaints retroactively.
- Normalization can change sensitivity—choose the one matching your asset’s regime.
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả đồng ý mới có thể truy cập tập lệnh này. Bạn cần yêu cầu và xin phép sử dụng tập lệnh này. Quyền truy cập thường được cấp sau khi thanh toán. Để biết thêm chi tiết, hãy làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với chartnation.
TradingView KHÔNG khuyến khích trả tiền hoặc sử dụng tập lệnh trừ khi bạn hoàn toàn tin tưởng tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm thấy các giải pháp thay thế miễn phí, mã nguồn mở trong mục tập lệnh cộng đồng của chúng tôi.
Hướng dẫn của tác giả
Thông báo miễn trừ trách nhiệm
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả đồng ý mới có thể truy cập tập lệnh này. Bạn cần yêu cầu và xin phép sử dụng tập lệnh này. Quyền truy cập thường được cấp sau khi thanh toán. Để biết thêm chi tiết, hãy làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với chartnation.
TradingView KHÔNG khuyến khích trả tiền hoặc sử dụng tập lệnh trừ khi bạn hoàn toàn tin tưởng tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm thấy các giải pháp thay thế miễn phí, mã nguồn mở trong mục tập lệnh cộng đồng của chúng tôi.