Nadaraya Watson Envelope Indicator for MT5
A Nadaraya-Watson envelope for MetaTrader 5 built with kernel regression, plotting dynamic bands to spot overextended prices and potential reversals.
- MetaTrader 5
- Works on VPS
- Lifetime support
About Nadaraya Watson Envelope Indicator for MT5
In short: the Nadaraya-Watson Envelope for MetaTrader 5 draws bands around a kernel-regression estimate of price. When price closes outside them, it marks a triangle and can alert you to a possible mean-reversion setup. You can choose a non-repainting mode for stable results or a repainting mode for smoother bands.
Related guide: Nadaraya-Watson Envelope MT5: A Practical Guide for Gold
What is Nadaraya-Watson kernel regression?
Nadaraya-Watson regression is a statistical method for estimating a smooth curve through noisy data. Each point of the curve is a weighted average of nearby values, where closer points get more weight. Applied to price, it produces a smoothed trend line that follows the market without the lag of a simple moving average.
This indicator goes a step further. It wraps that smoothed line in an envelope and uses it contrarian-style: when price stretches too far from its smoothed trend, the envelope marks a possible reversal zone.
Repainting vs non-repainting mode
Kernel-smoothing indicators are known for repainting, so this one lets you decide how it behaves:
- Non-repainting mode estimates the trend with an endpoint estimator and forms the bands by adding and subtracting the mean absolute deviation. The result is similar to classical channels or volatility bands, with stable history. Use this mode if you want to backtest or trade the signals.
- Repainting mode uses a real-time estimator that keeps updating. Bands look smoother, but their historical shape can shift as new bars arrive. Use it for visual analysis. Even here, the triangle markers appear at the moment the cross happens and stay in place.
How to read the envelope
- Price closes above the upper band: price is stretched upward, which may be a mean-reversion short opportunity.
- Price closes below the lower band: price is stretched downward, which may be a mean-reversion long opportunity.
- Price inside the bands: no overextension signal; in a range the bands act as dynamic support and resistance.
The triangle markers show these crossings directly on the chart, and the same conditions can trigger alerts.
Nadaraya-Watson envelope vs Bollinger Bands and Keltner Channels
Bollinger Bands and Keltner Channels are built from moving averages. The Nadaraya-Watson envelope is built from a kernel-regression trend estimate, which is smoother and can be tuned through Bandwidth. In non-repainting mode, the band width is derived from the mean absolute deviation, so it behaves like a volatility band while following a different centre line. If you already use a squeeze setup, see how the Squeeze Momentum indicator compares Bollinger Bands with Keltner Channels.
Settings explained
- Bandwidth – smoothness of the envelope. Higher values give smoother, slower bands; lower values hug price more closely.
- Mult – envelope width. A larger multiplier pushes the bands further from the trend, so signals are rarer but more extreme.
- Source – the price series used for the calculation, for example close, open or hl2.
- Repainting Smoothing – switches between the repainting and non-repainting estimators.
Using it well
- Start in non-repainting mode, so what you see in history is what you would have seen live.
- Prefer ranging or mean-reverting conditions. In a strong trend, price can stay outside the bands for a long time, so a cross is a warning to watch rather than an automatic reversal trade.
- Combine the cross with a second signal, such as a candle pattern, a key level, or momentum from the Impulse MACD indicator.
- Test Bandwidth and Mult on your own symbol and timeframe before relying on the defaults.
Frequently asked questions
What is the Nadaraya-Watson envelope?
It is a band system built around a Nadaraya-Watson kernel regression estimate of price, a smoothed trend line. The envelope sits above and below that line, and price moving outside it suggests it has stretched far from its smoothed trend.
Does the Nadaraya-Watson Envelope repaint?
You choose. Non-repainting mode gives stable, historically consistent bands. Repainting mode gives smoother bands, but their history can shift as new bars arrive. The triangle signal markers appear at the moment of the cross and stay locked in place in both modes.
How are the bands calculated in non-repainting mode?
The indicator estimates the trend with an endpoint Nadaraya-Watson estimator, then adds and subtracts the mean absolute deviation to form the upper and lower bands.
What do Bandwidth and Mult do?
Bandwidth controls how smooth the envelope is: higher values give smoother, slower-responding bands. Mult controls how far the bands sit from the smoothed trend, so it sets the envelope width.
Is it trend-following or contrarian?
Contrarian. It is designed to highlight possible reversal zones when price extends too far from its smoothed trend, so it suits mean-reversion trading better than breakout trading.
Can I get alerts?
Yes. Alert conditions are built in for price crossing above or below the envelope bands, matching the triangle markers on the chart.
Is there a free demo?
Yes. Download the free demo from the MQL5 Market and run it in the MetaTrader 5 Strategy Tester before buying.
The Nadaraya-Watson Envelope is an analysis tool and does not guarantee trading results.
Ready to try Nadaraya Watson Envelope Indicator for MT5?
Download it from the MQL5 Market and attach it to your MetaTrader 5 chart in minutes.
Want it customized or need something similar? Request a free quoteTrading involves risk. Our indicators are analysis tools for educational and informational purposes and do not constitute financial advice. Read our Disclaimer.
More indicators
NRTR Indicator for MT5
NRTR (Nick Rypock Trailing Reverse) for MetaTrader 5 detects trend direction and reversals with a trailing line, carefully converted to MQL5.
View details →Isolated Peak and Bottom Indicator for MT5
Spot trend exhaustion and potential reversals in MetaTrader 5 with the Isolated Peak & Bottom indicator, which marks significant isolated highs and lows.
View details →CM Ultimate Indicator for MT5
CM Ultimate MA for MetaTrader 5 is a flexible moving-average tool for forex, indices, stocks and commodities, with multiple MA types and trend colors.
View details →


