PROTECTED SOURCE SCRIPT

NSR Dynamic Channel - HTF + Reversion

68
NSR Dynamic Channel – HTF Volatility + Reversion

(Beginner-friendly, pro-grade, non-repainting)

The NSR Dynamic Channel builds an adaptive volatility envelope that compares current price action to a statistically-derived “expected” range pulled from a user-selected higher timeframe (HTF).

Is this just another keltner variation?
In short: Keltner reacts. NSR anticipates.
Keltner says “price moved a lot.”
NSR says “this move is abnormal compared to the last 2 days on a higher timeframe — and here’s the probability it snaps back.”

The channel is not a simple multiple of recent ATR or standard deviation; instead it:
  • Samples HTF volatility over a rolling window (default: last 2 days on the chosen HTF).
    • Expected Range
    • HTF Volatility Spread = StDev of 1-bar ATR on the HTF


*Scales this HTF range to the current chart’s volatility using a compression ratio:
  • compRatio = SMA(High-Low over lookback) / Expected Range

This makes the channel tighten in low-vol regimes and widen in high-vol regimes.
*Centers the channel on a composite mean ([mono]AVGMEAN[/mono]) calculated from:
  • Smoothed Adaptive Averages of the current timeframe close
  • SMA of close over the user-defined lookback ([mono]Slow[/mono])

The three means are averaged to reduce lag and noise.
*Draws two layers:
  • HTF Expected Channel (gray fill) = PAMEAN ± expectedD
  • Dynamic Expected Band (inner gray) = HTF Expected Range

*Adds a fast 2σ envelope around AVGMEAN using the standard deviation of close over the lookback period.


Core Calculations (Conceptual Overview)
  • HTF Baseline → ATR on user HTF → SMA & StDev over a defined number of days
  • Compression Ratio → Normalizes current range to HTF “normal” volatility
  • Expected Band Width → [mono]Expected Range × CompressionRatio[/mono]
  • Bias Detection → % change of composite mean over 2 bars → “bullish” / “bearish” filter
  • Overextension % → Position of price within the expected band (0–100%)


How to Use It (3 Steps)
  • Apply to any chart – defaults work on futures (NQ/ES), stocks (SPY), crypto (BTC), forex, etc.
    Price is outside both the fast 2σ envelope and the HTF-scaled expected band
    Expect some sort of reversion
  • Enable alerts – two built-in conditions:
    • NSR Exit Long – bullish bias + high crosses upper expected edge
    • NSR Exit Short – bearish bias + low crosses lower expected edge

Optional toggles:
  • Show 2σ Price Range → fast overextension lines
  • Expected Channel → HTF-based gray fill
  • Mean → MEAN centerline


Why It Works
  • Context-aware: Uses HTF “normal” volatility as anchor
  • Adaptive: Shrinks in consolidation, expands in breakouts
  • Filtered signals: Only triggers when both statistical layers agree
  • Non-repainting: All calculations use confirmed bars


Happy trading!
nsrgroup

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.