Nadaraya Watson Indicator for NinjaTrader 8

Created 17 Aug 2024 · Updated 20 Aug 2024

The Nadaraya-Watson indicator is a Premium smoothing indicator for the NinjaTrader 8 platform that uses a simple Gaussian Kernel regression method as a weighting function to smooth the price.

Prerequisites

To properly use this indicator you should have the following prerequisites available.


Description

The indicator can be switched between non-Repainting and Repainting modes, and can also be run on a higher timeframe and calculate price smoothing there instead. The indicator exposes Buy/Sell signals that can be used from within a strategy, and can thus be easily integrated with the NinjaTrader Strategy Builder.

The Nadaraya-Watson smoother can be described as a series of weighted averages using a specific normalized kernel as a weighting function. For each point of the estimator at time t, the peak of the kernel is located at time t, so the highest weights are attributed to values neighboring the price located at time t.

Examples

Non-Repainting Mode

On ES on the 5-minute timeframe with non-repainting mode, using a Window Size of 500 and a Bandwidth of 8, the Nadaraya-Watson smoother tracks the price without repainting past values.

Nadaraya-Watson smoother in Non-Repainting mode
Click to enlarge
Repainting Mode

The same ES 5-minute region with Repainting mode enabled, and the same parameters (Window Size 500, Bandwidth 8), shows how the smoother continues to adjust its past values as new price data arrives.

Nadaraya-Watson smoother in Repainting mode
Click to enlarge

Features

The Nadaraya-Watson indicator has a set of unique features:

  • Can be run in two modes: Non-Repainting or Repainting mode
  • Can be run on a higher timeframe
  • Easy integration in a custom Strategy or from the NinjaTrader Strategy Builder Wizard Tool
  • Highly customizable, lightweight, and fast to calculate compared to the same indicator from other vendors

Parameters

We always try to keep the parameters to a minimum.

General
Run On Higher TimeFrameEnables/disables running the smoothing algorithm on a higher timeframe and displaying the result on the active chart.
Higher TimeFrameSelects the higher timeframe on which the smoothing engine runs. Make sure to select a timeframe higher than the active chart's — for example if the chart is on 15 Minutes, select something like 1 Hour, not 1 Minute, or the indicator won't work.
Higher TimeFrame PeriodSets the period of the higher timeframe.
Window SizeSets the window size of the Nadaraya-Watson smoothing function.
BandwidthControls the bandwidth of the Gaussian kernel — higher values return smoother results, while a lower bandwidth weights the price at a precise point more heavily and produces less smoothed results.
Allow RepaintEnables/disables repainting of the smoother. If repaint isn't enabled, the endpoint of the smoother is returned for each point.
Rendering
Bearish ColorDraw color of bearish items.
Bullish ColorDraw color of bullish items.

Download & Installation Instructions

License Requirements

At automated-trading.ch you can choose to either purchase a monthly subscription to use our premium products, or use our free products without subscribing.

In both cases, you need to create an account so you can get a License you can use for both premium and free products.

To obtain your license, simply sign up and then get your license on the billing page.

Important: This is a Premium product. It can be run in Backtest, Playback, and Optimization modes for free; an active Premium subscription is required to run it live.
Download
Sign in to download this file.
Latest Version v1.1.0.0 · Published 2 years ago
This file was downloaded 379 times. Last download was 58 minutes ago.

You can also download this strategy — and every other automated-trading.ch strategy or indicator — anytime from your centralized Downloads page.

Installation Steps
1
Import the downloaded .zip file into NinjaTrader using the Import NinjaScript menu item.
2
Open a new chart window.
3
Right-click the chart and choose Indicators... to add the indicator to the chart.
4
Copy/paste your license key, found on the billing page, into the license parameter.
5
After adding the indicator to the chart with a valid license, it runs on the chart's historical data first, then continues running on live market data.

Frequently Asked Questions

General

Yes — if you have an idea that you believe can improve this indicator, use the contact page to send us a message.

No, the source code of the indicator is protected for copyright reasons.

No, this indicator only does rendering and doesn't provide data that can be used from within a strategy — check out our other strategies for one based on this same concept.

Yes, you can use this indicator without TickReplay, but bear in mind that in this case the indicator will not detect events on historical candles — it will only start detecting them on real-time volume and price data.

Release Notes

  • Fix issue with reading License info

  • First Release of the indicator
discord
Join our Discord community
Questions, feedback, or just want to chat with other traders? Come say hi.
Join Discord
Quick Facts
Platform NinjaTrader 8
Category Indicator
Plan Required Premium
Latest Version v1.1.0.0
Last Updated 2 years ago
Downloads 379