The usual kernel envelope repaints, because it weights bars on both sides of the one it draws. The nadaraya watson non repaint indicator only ever looks backward. That costs some smoothness at the right edge and buys a line whose printed values never move afterwards.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 3: NW Smooth, Buy, Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 10 |
What the Nadaraya watson non repaint Indicator draws on the chart
One line and two marks, drawn over price.
`NW Smooth` runs dodger blue at width 2.
`Buy` prints in lime beneath the candle.
`Sell` prints in red above it.
Both stand `InpArrowOffsetPts` `10.0` points off.
No separate pane opens.
- NW Smooth: line, dodger blue, width 2
- Buy: arrow, lime, width 2, arrow code 233
- Sell: arrow, red, width 2, arrow code 234

How the Nadaraya watson non repaint Indicator calculates its values
A weighted average
Every bar in reach contributes. Each gets a weight from a Gaussian curve, largest at the bar being estimated and falling away with distance.
Two settings shape it
`InpBandwidth` `8` controls how quickly weight falls away. `InpLookback` `50` caps how many bars enter each estimate at all.
Backward only
This is what the name promises. The sum runs over past bars alone, and `InpConfirmBars` `1` holds a mark back until the following bar closes.
How to read the signals
The line is smoother than any moving average of similar length.
A mark appears where its slope changes sign.
A wider bandwidth gives a smoother, slower line.
The right edge is less smooth than the middle.
That edge behaviour is the price of not repainting.
Fifty bars is the furthest any estimate reaches.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`InpEnableAlerts` opens the group and arrives on with three of its four members: `InpEnablePopup`, `InpEnablePush` for the mobile terminal and `InpEnableSound`, which plays whatever `InpSoundFile` names. Only `InpEnableEmail` waits.
Every Nadaraya watson non repaint Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpLookback |
Lookback bars per estimate. How many bars feed one estimate, `50`. | 50 |
InpConfirmBars |
Confirmation bars (non-repaint). Bars a mark waits before printing, `1`. | 1 |
Display settings
| Setting | What it does | Default |
|---|---|---|
InpBandwidth |
Kernel bandwidth (h). How fast the weighting decays, `8`. | 8 |
InpArrowOffsetPts |
Arrow offset in points. Distance from mark to candle, `10.0`. | 10.0 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
InpEnableAlerts |
Master alert enable. Opens the message group, `true`. | on |
InpEnablePopup |
Popup alerts. A box inside MetaTrader, `true`. | on |
InpEnablePush |
Mobile push notifications. Notification on the mobile terminal, `true`. | on |
InpEnableEmail |
Email alerts. Mail through the terminal settings, `false`. | off |
InpEnableSound |
Sound alerts. Audio played on the desktop, `true`. | on |
InpSoundFile |
Which file that audio uses, `”alert.wav”`. | alert.wav |

Settings that fit your chart
A fifty-bar kernel estimate is slow and very smooth. EURUSD H1 is the reference chart. Slope changes come a couple of times a week there. On M5 they arrive several times a day. On H4 each one marks a real turn.
When the Nadaraya watson non repaint Indicator fails
Backward-only weighting makes the right edge rougher.
Fifty bars per estimate costs real calculation time.
A very smooth line turns late by construction.
One confirmation bar still means a mark lands a bar behind.
Copy the compiled Nadaraya watson non repaint Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Download the Nadaraya watson non repaint Indicator for MT4 and MT5
The zip holds the compiled Nadaraya watson non repaint Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
Why do NW Smooth values stay put once drawn?
Because each estimate sums bars that already closed before the one it draws. The usual kernel version weights bars on both sides, which is exactly why its recent values shift as new bars arrive.
How does InpBandwidth shape the weighting curve?
It sets how fast weight decays with distance. A larger figure spreads weight further and yields a smoother, slower line. A smaller one keeps weight near recent bars, so the line follows price and turns more often.
Why does InpLookback 50 cap the sum?
Because a Gaussian weight never quite reaches zero, so without a cap every estimate would run over the whole chart. Fifty bars keeps the cost sensible while including everything that carries real weight.
What does InpConfirmBars 1 delay?
The mark, not the line. A slope change is only acted on once the next bar has closed, which is the last piece of the non-repaint promise and costs you one bar of timing.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Nadaraya watson non repaint Indicator as one input. Always backtest before trading live.
Category: this is part of our Signal and Forecast collection. Browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- Learn more about the underlying method in Quote stuffing on Wikipedia.
- For wider market background, see Hindenburg Omen at StockCharts ChartSchool.
