Overview

NWE Curve Signal is an overlay indicator that smooths price using a Nadaraya–Watson Estimator (NWE) curve and wraps it with adaptive volatility bands. It highlights statistically stretched moves (“overflow”) and combines them with curve turning points to mark potential reversal zones.

How It Works

  • NWE curve: A Gaussian-kernel regression is calculated over the last ~500 bars using the selected Source and Bandwidth.
  • Adaptive bands: A smoothed mean absolute error is computed and multiplied by Multiplier to form dynamic upper/lower envelopes around the curve.
  • Curve turning points: U-shape bottoms and ∩-shape tops are detected by slope sign changes on the NWE curve.
  • Curve filtering: Min Curve Depth (%) removes tiny wiggles by requiring the curve swing to exceed a minimum percentage move.
  • Overflow logic: Band breakouts are used both for visual markers and as a requirement for LONG/SHORT labels.

What You’ll See on the Chart

  • Two dynamic band lines around the NWE curve (upper/lower), styled via Band Colors.
  • Optional overflow markers:
    • when price is above the upper band and then re-enters
    • when price is below the lower band and then re-enters
  • Optional signal labels:
    • LONG (triangle up) near curve bottoms when a qualifying lower-band overflow occurred within the lookback window
    • SHORT (down label) near curve tops when a qualifying upper-band overflow occurred within the lookback window
  • Optional debug curve markers (◡ bottoms, ◠ tops) for validating the detection logic.
  • A small dashboard table (top-right) displaying Min Curve Depth, Overflow Lookback, and repaint status.

Indicator Information

Version 1.0
Category Momentum & Trend, Trend Following
Compatibility TradingView
Script Pine Script v5