FractalTrade_

Nadaraya-Watson Oscillator

This indicator is based on the work of @jdehorty and his amazing Nadaraya-Watson Kernel Envelope, which you can see here:

General Description

The Nadaraya-Watson Oscillator (NWO) will give the same information as the Nadaraya-Watson Envelope, but as an oscillator off the main chart, by plotting the relationship between price and the Kernel and its bands. This also means that we can now detect divergences between price and the NWO.

You can see the relationship between the two here:

You can think of this indicator as the kernel envelope version of a Bollinger Band %B. In ranging markets the bands are perfect for mean reversion trades, but in certain situations the break of one of the bands can signal the beggining of a strong trend and price will remain close to the bands for a long period and will only give small pullbacks. As with any indicator, confluence with price and other tools must be taken into account.

Main Features

As with @jdehorty 's Envelope, you can change the following settings:
  • Lookback Window.
  • Relative Weighting.
  • The initial bar for the regression.
  • ATR period for the bands.
  • Inner and Outer Multiples for the bands.

I also added the following:
  • A middle band around the Kernel to filter out false crossovers.
  • A Hull Moving Average to smoothen out the movements of the oscillator and give extra confirmation of turnover points.

Colors

Some special things to note regarding the coloring:
  • The zero line features a gradient that changes color every time the Kernel slope changes direction.
  • The Oscillator plot has a gradient coloring that gets stronger the closer it gets to each of the bands.
  • Every time the oscillator crosses over/under the outer bands the background will be highlighted.

Happy trading!

@FractalTrade_
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?