OPEN-SOURCE SCRIPT

B4100 - NW Ribbon

Nadaraya-Watson (NW) Moving Averages (MAs) Ribbon. Kernel-based weighting methods and a color gradient (thanks to alexgrover), this ribbon offers trend detection, and a smooth MA.

MA1 to MA5: Display a series of five NW MAs, each with independent settings for length, kernel type, and associated parameters.

Flexible Lengths: Default lengths are set to 50, 100, 150, 200, and 250 periods, respectively, but can be customized to suit different trading timeframes and strategies.

Kernel Types: Choose from Beta, Gaussian, or Epanechnikov kernels to determine how recent data points are weighted.

Beta Kernel: Adjusts weights based on alpha and beta parameters to emphasize different aspects of the data.

Gaussian Kernel: Utilizes a bandwidth parameter to apply a bell-curve weighting, smoothing out the MA.

Epanechnikov Kernel: Applies a polynomial weighting with a specified bandwidth, offering a balance between smoothing and responsiveness.
moving_averageMoving Averagesmovingaveragecrossovernadaraya-watsonnadarayawatsontrendTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer