Nadaraya Watson Envelope Scanner
- Indicators
-
Evgenii Sutulov
I build trading indicators, strategies, and dashboards that don't repaint.
Seven years doing this. MetaTrader 4, MetaTrader 5, TradingView.
Closed bars only. What you see is what happened.
The bar being formed never changes a published value. - Version: 1.3
- Activations: 20
Nadaraya Watson Envelope Scanner is two products in one file. The first is Nadaraya Watson Envelope itself, drawn on the chart you are looking at: a causal Nadaraya-Watson kernel regression centre line, an envelope built from the mean absolute error around it, and marks where price came back inside the envelope after having traded outside it.
The price increases every 10 purchases, the next price is $39
The second is a board that runs the same calculation over a list of symbols on several timeframes at once and puts the answer in a table. The board tells you where to look, and the chart under it shows you what is actually there, so you do not have to attach a second indicator to act on what the table found.
The board
A row per symbol, a column per scanned timeframe, up to four of them, on up to twenty-eight symbols. The symbol list is comma separated, or the board can take the Market Watch list instead. Broker prefix and suffix are detected from the chart you are on, or given by hand. Out of the box the board scans four: M15, H1, H4 and D1.
A cell reads like ^14b: a direction glyph, then how many bars ago that signal happened. The word flat means the calculation ran and found no direction there. Three dots mean the cell has not been measured yet, and hovering it says why in words. A cell whose signal is older than the freshness threshold is drawn in the same colour, quieter, so the hue says which way and the weight says how much it still matters. A row with a fresh signal anywhere in it gets a wash of the accent colour so your eye lands on it before you have read a single cell.
The AGREE column is the point of the board. It takes the visible timeframe columns for that symbol, finds the majority side, and prints it as v3/4: the direction the majority agrees on, and how many of the visible timeframes stand on it. A row where every visible timeframe agrees is drawn bold and in that side's colour, because that is the row the board exists to surface. A tie prints a dash and counts as no verdict, because calling a one-one split a signal would be the board inventing conviction it does not have. With only one timeframe visible the column is dropped entirely, header and all, rather than showing a 1/1 that restates the cell beside it.
Every column header is a button. Click a timeframe header and the board sorts by that column, the freshest signal on that timeframe first, and rows with none in it go to the bottom together. Click the same header again to reverse. Click AGREE to sort by agreement, with full agreement first and a full house outranking a partial one of the same count. The active column is drawn in the accent colour with a caret showing the direction, so the sort state is on the header itself. There is also a Sort button that cycles freshest, grade and name, for when you want a whole-board order rather than a column order.
A Show button cycles all, buys, sells and fresh. Buys and sells follow the AGREE verdict rather than any single cell, so a row you see under buys always reads an up glyph in AGREE. A tie shows under neither. This filters the view, not the calculation: a hidden row is still being measured and can still alert.
The legend sits above the table and decodes the notation in one line: up glyph, down glyph, bars since, and what the AGREE fraction means. It can be switched off once you know it by heart.
Timeframe buttons at the top show and hide a column. Hiding one does not stop the calculation measuring it.
The row count is fitted to the height of the chart pane, and the row setting is a maximum rather than a demand. When everything fits, no page buttons are drawn at all. When it does not, previous and next buttons appear with the page number on them. Because the board never draws more rows than the pane holds, the page buttons are always on screen and always reachable, however tall the row setting is.
Clicking a cell switches this chart to that symbol and that timeframe. It does not open a window per click.
Two status lines are always on show: how many symbols are ready of how many, how long ago the board last updated, and how many signals it found in the lookback window, then either the watchdog's own line or a sentence explaining why nothing is showing.
Diagnostics
A second panel, off by default, that answers "why is there no signal". It lists the symbol coverage, which series are short of bars and by how much, how many signals were found in the window, and how many symbols this indicator switched on in Market Watch to do its job. It names the stage a cell failed at rather than leaving the cell blank without explanation.
The chart indicator
Drawn in the price window: the centre line coloured by its slope, the upper and lower envelope, and BUY and SELL marks. It can be turned off from the Styles tab if you only want the board. Its timeframe is set separately from the board's timeframes: the board scans several, the chart draws one.
The settings sheet
The gear opens three tabs. Values holds the timeframe, the window N, the bandwidth h and the envelope multiplier, each with steppers, a range and a sentence of help. Changing one here recalculates the whole board and the panel says so while it works, with a count of how many symbols it has redone.
Alerts holds the master switch, the per-event switches, the channels, the cooldown and a test button.
Styles holds show the legend, draw the indicator on this chart, palette, show the centre line, the envelope and the arrows, line width and arrow size. These are the same display controls the matching single-chart indicator carries, under the same names, so a chart set up one way can be reproduced on the other.
Three colour schemes are available, including a colour-blind safe one that uses blue and orange and never puts red against green. Panel position, scheme, collapsed state, the sort, the filter, which timeframe columns are visible and every value changed on the sheet are stored per chart and survive a timeframe change and a terminal restart. The interface is English.
Alerts
Off out of the box. A master switch on the panel itself turns them all on or off without opening the sheet, and there is a Test alert button that fires through every channel currently on.
Events: a fresh BUY and a fresh SELL, declared separately for each scanned timeframe, plus data health, which speaks when a symbol loses or regains its data. There is a minimum grade setting, and this port does not grade, so every signal counts as grade one for that purpose.
Channels: popup window, sound, push to the mobile terminal, e-mail. Cooldown is per cell and per event, thirty minutes by default, because a board watching many symbols has many more chances to repeat itself than a single chart does. Telegram is not part of this product.
Cost
The work is budgeted. A set number of symbols is refreshed per timer tick, lower being gentler on a slow machine, so a long list spreads its load out instead of stalling the terminal. The first pass is visibly progressive and the panel says what percentage of the symbols it has measured.
Reading it from an EA
The chart indicator publishes ten buffers, readable through iCustom and CopyBuffer. Buffer 0, Buy, holds the mark price on a BUY bar and EMPTY_VALUE otherwise, and it is not drawn; buffer 1, Sell, is the same for a SELL bar. Buffer 2, Center, is the kernel regression centre line and buffer 3 is the colour index that goes with it. Buffer 4, Upper, and buffer 5, Lower, are the two envelope edges. Buffers 6 and 7, BuyMark and SellMark, are the drawn copies of buffers 0 and 1. Buffer 8, Signal, reads +1 for a re-entry from below, -1 for a re-entry from above and 0 for none. Buffer 9, Slope, is +1 while the centre is rising, -1 while it is falling and 0 when it is flat.
Buffers 0 and 1 are the EA contract. They are never painted, and they are filled on every pass whatever the Styles tab is set to, so nothing on the display side can starve a strategy of a signal. What you see on the chart is the drawn copy, kept in step with the contract. Hiding is done by changing how a plot is drawn, never by emptying a buffer, so every index above stays readable through iCustom and CopyBuffer and stays visible in the Data Window with the display switches off.
This map is the scanner's own and is not the same as the single-chart Nadaraya Watson Envelope MTF, which publishes one further buffer at index 10. Read the list above.
The board itself is a panel, not a buffer. It is read by eye and by alert.
Honest limits
The board reads closed bars, and a cell's age is counted in closed bars: a value published on a closed bar does not change afterwards. The mark on the current forming bar of the chart indicator can appear and disappear before that bar closes.
AGREE is a count of timeframes, not a probability. Four timeframes pointing the same way means four correlated readings of the same instrument agreed, which is worth knowing and is not a forecast.
A tie deliberately produces no verdict, and rows with a tie are hidden by both the buys and the sells filters. That is the honest answer rather than a missing one.
Scanning has a cost. Twenty-eight symbols on four timeframes is a hundred and twelve cells and it will be felt on a slow machine. The budget setting is what you turn down.
A symbol your broker does not carry, or one with too little history for the kernel window, cannot be measured. The board says which, and why, rather than showing an empty cell.
No profit figure, win rate or backtest result is claimed here.

