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_
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?