Nadaraya Watson Envelope MTF MT4

  • Indicators
  • Evgenii Sutulov
    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

A kernel regression that does not repaint, which is the whole point. Nadaraya Watson Envelope MTF draws a smooth centre line through price and an error envelope around it, marks the bars where price came back inside after stretching out, and computes every bar from the bars behind it only, so a closed bar never moves. The usual charting-site version of this line is fitted two-sided and rewrites itself under your feet; this one is causal by construction. Free, no trial, no locked functions.

The question it answers is narrow and it is the only one it claims to answer: price has stretched away from its own recent centre, and it has just stopped stretching. Whether you treat that as a mean-reversion entry, as a place to take profit on a trend position, or as nothing at all is your decision. The indicator locates the event, it does not rate it.

How the line is built

The centre line is a Nadaraya-Watson kernel regression: every bar is a weighted average of the bars behind it, with a Gaussian weight that falls off with distance. The envelope sits a chosen number of mean absolute errors above and below that centre, so it widens when price has been noisy around the line and tightens when it has been obedient.

The estimate is causal. Bar i is computed from bars i, i-1, i-2 and back, and never from a bar to its right. That is a deliberate departure from how kernel regression is usually shown on charting sites, where the fit is two-sided and the line moves under your feet as new bars arrive. Here the centre line, once a bar has closed, does not change.

What is on the chart

The centre line is coloured by its own slope, one colour while it is rising and another while it is falling. The upper and lower envelope are drawn as dotted bands. BUY and SELL marks appear on the bars where price re-entered the envelope, placed below the low and above the high respectively.

It draws in the price window, over the candles.

The panel

A canvas panel on the chart, movable by dragging it, collapsible, closeable. It carries three lines of live text: the timeframe the maths is actually running on together with the window and bandwidth in force; what the last closed bar did, meaning the centre value and either a BUY return, a SELL return, or no re-entry; and where the numbers came from, the properties dialog or the panel, and how many of them were changed by hand.

Below that sits every setting the panel can move, with its current value. A changed value is highlighted so you can see at a glance that the chart is not running on the defaults.

The settings sheet

The gear opens a settings sheet with three tabs.

Values holds the four things that can move a signal: the timeframe, the window N, the bandwidth h and the envelope multiplier. Each row has minus and plus steppers, a legal range, and a sentence explaining what moving it does. A counter at the top says how many of the four are no longer what the properties dialog says, and a single button puts them all back.

Alerts holds the master switch, the per-event switches, the four channels, and the cooldown in minutes, plus a button that sends a test alert through every channel that is on.

Styles holds appearance only: palette, whether the centre line, the envelope and the arrows are drawn, line width and arrow size. Nothing on this tab recomputes anything. Hiding the centre line does not stop it being calculated, alerting, or being readable by an EA.

Three colour schemes: dark, light, and a colour-blind safe scheme that uses blue and orange and never puts red against green. The scheme button is in the panel header and the chart palette can be set to follow it.

Panel position, scheme, collapsed state 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. The master switch ships in the off position, so attaching the indicator makes no noise until you ask it to.

Events: a BUY signal, a SELL signal. Channels: popup window, sound, push notification to the mobile terminal, e-mail. Each event and each channel has its own switch, and a cooldown, two hours by default, stops the same event repeating.

Alerts fire on the last closed bar. There are also two optional forming-bar alerts, off by default, that speak while the current bar is still open and only within a chosen number of seconds of its close. They are labelled as early on the panel and in the inputs for a reason: a re-entry that exists mid-bar can stop existing before the bar closes.

Telegram is not part of this product.

Multi-timeframe

The Timeframe setting makes the indicator compute on a higher timeframe and draw the result on the chart you are looking at. It reads only closed senior bars: the value a chart bar shows is the newest senior bar that had already closed by that chart bar's own time, not the senior bar that happens to contain it. The bar that contains it is still forming and is not knowable in real time.

The BUY and SELL marks land on the single chart bar where the senior bar changed. The centre line, the envelope and the slope are held across the whole span of the senior bar, which is what gives the stepped staircase look.

A foreign timeframe is built by the terminal in the background, and the first read of it can legitimately come back empty. The indicator retries once a second and says on the panel whether it is waiting for a download or looking at a real shortage of history. It never fails initialisation over missing bars.

Reading it from an EA

Thirteen buffers, all readable through iCustom, and the two signal buffers are at the front so a strategy does not have to count. This map is not the MetaTrader 5 edition's map: MQL4 has no colour-indexed plots, so the slope-coloured centre line is drawn as a pair of plain lines, and the indices behind them shift.

Buffer 0, Buy, holds the price of the BUY mark on a signal bar and EMPTY_VALUE otherwise; buffer 1, Sell, is the same for the SELL mark. Buffers 2 and 3 are the centre line as its two display halves, one while it rises and one while it falls. 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 is the centre line as one continuous series, the same values the MetaTrader 5 edition publishes at its index 2, and buffer 9 is its colour index. Buffer 10, Signal, reads +1 for a re-entry from below, -1 for a re-entry from above and 0 for none. Buffer 11, Slope, is +1 while the centre is rising and -1 while it is falling. Buffer 12, Override, reports how many settings were changed from the panel.

The Data Window lists the eight drawn rows, from Buy through SellMark. The contract behind them, buffers 8 to 12, does not appear there, and that proves nothing: iCustom reads every index above just the same. An EA that wants the centre line by value reads buffer 8.

Buffers 0 and 1 are the contract. They are not painted and they are filled on every pass whatever the Styles tab is set to. The arrows you see on the chart are copies at index 6 and 7, kept in step with the contract, so turning the arrows off can never starve an EA of a signal.

MQL4 has no input groups, so the parameter list an EA passes to iCustom here is shorter than the MetaTrader 5 edition's, and the positions differ. Build the call against this edition's input list, not the other platform's. Buffer 12 exists so an EA can tell that the numbers it is reading were not computed on the parameters it passed in; an instance created by iCustom is read-only and always follows the parameters you gave it.

Honest limits

The mark on the current, unfinished bar can appear and then disappear. Price is inside the envelope while the bar is open and outside it at the close, and the mark goes away. Once a bar has closed, its mark and its lines do not change.

This is not a strategy. There is no exit rule, no position sizing, no stop placement and no filter for whether the market is in a state where mean reversion is a reasonable idea. In a strong trend price can sit outside the envelope for a long time and every re-entry it eventually produces will be against that trend.

No profit figure, win rate or backtest result is claimed here, and none should be inferred.

On a higher timeframe the earliest bars of the chart may have no senior bar that had already closed, and those are left empty on purpose.

The kernel window is a bar count. On a short history, or on a symbol whose history your broker does not carry, the line starts where there are enough bars to compute it and not before.

More from author
UT Bot MTF
Evgenii Sutulov
UT Bot MTF is an ATR trailing stop and the flip signals it produces. The stop follows price at a distance of a chosen multiple of ATR, ratchets in the direction of the move and never gives ground back. When price closes through it, the stop flips to the other side and the indicator marks a BUY or a SELL. That is the whole engine, and it is deliberately simple. What this product adds around it is the part that decides whether you can actually use it: four independent filters, an honest account of
FREE
Currency Strength Pro ranks the eight major currencies by relative strength, read from up to 28 pairs, on a multi-timeframe composite, then ranks the basket's own pairs into a graded scanner. Closed bars only, never on a tick. Launch price: $59. It rises to $69 after the next 10 copies, then step by step to the final $98.  The idea is simple: trade a strong currency against a weak one, instead of the chart that happens to look nice today. The strength table answers "which currency". The scanner
Nadaraya Watson Envelope MTF draws a smooth centre line through price and an envelope around it, then marks the bars where price came back inside that envelope after having traded outside it. The question it answers is narrow and it is the only one it claims to answer: price has stretched away from its own recent centre, and it has just stopped stretching. Whether you treat that as a mean-reversion entry, as a place to take profit on a trend position, or as nothing at all is your decision. The i
FREE
Half Trend MTF draws a stepped trend line that holds its level until the market takes it out, and flips to the other side when it does. Around it sits an ATR channel. The decision it supports is a simple one, and it is stated plainly: the line says which side the trend is currently held on, the flip says the moment that changed, and the channel says how much room the current volatility gives price before the flip is likely to matter. Because the line only moves when the extremes of the last N ba
FREE
Wave Trend Oscillator MTF is a two-line momentum oscillator in its own sub-window. The fast line measures how far the typical price has run from its own smoothed centre, relative to its recent average deviation, and a slower average of that fast line is drawn beside it. The event is a cross between the two lines inside a zone the market has actually reached. Crosses in the middle of the range are not signals, and that single rule is what separates this product from a plain oscillator. Three thin
FREE
Currency Strength Flux ranks the eight major currencies by relative strength, read from up to 28 pairs, on a four-timeframe composite that only ever uses closed bars. The idea is simple: trade a strong currency against a weak one, instead of the chart that happens to look nice today. Everything on the panel serves that one decision. What it does The panel ranks EUR, GBP, AUD, NZD, USD, CAD, CHF and JPY from strongest to weakest. Every reading is built from the pairs your broker actually quotes.
FREE
QQE Mod MTF
Evgenii Sutulov
QQE Mod MTF is a momentum oscillator in its own sub-window. It runs two independent QQE blocks over RSI and turns them into one readable histogram. QQE, which stands for Qualitative Quantitative Estimation, smooths RSI and then builds a trailing band around it from the smoothed average of the RSI's own absolute changes. The band does not move against the trend, which is what makes a QQE cross slower and less noisy than an RSI cross. This product runs two of those blocks at once and publishes wha
FREE
Squeeze Momentum MTF answers two questions at once, in one sub-window. The first is whether the market is compressed. Bollinger Bands are compared with a Keltner Channel: when the Bollinger Bands sit entirely inside the Keltner Channel, volatility has contracted and the market is in a squeeze. When they push back outside it, the squeeze has released. The second is which way the compressed energy is pointing. A detrended price series is fitted by linear regression and the endpoint of that fit is
FREE
Currency Strength Flux ranks the eight major currencies by relative strength, read from up to 28 pairs, on a four-timeframe composite that only ever uses closed bars. The idea is simple: trade a strong currency against a weak one, instead of the chart that happens to look nice today. Everything on the panel serves that one decision. What it does The panel ranks EUR, GBP, AUD, NZD, USD, CAD, CHF and JPY from strongest to weakest. Every reading is built from the pairs your broker actually quotes.
FREE
Exhaustion Count MTF counts. It does not predict direction and it does not tell you which way to trade. It answers one question: has this move been going on long enough that it is running out of participants. Two independent phases run on the chart, a setup and a countdown, each with its own rules, its own cancellation conditions and its own place in the buffers an Expert Advisor can read. The setup Nine consecutive closes on one side of the close four bars back, started by a price flip. A bar t
FREE
A trailing stop that never gives ground, and the exact bar it turns. UT Bot MTF draws the ATR stop on your chart, marks every BUY and SELL flip, and then does the part almost no version of it does: it tells you how many signals its filters threw away and which filter threw them, and it warns you, in colour, while the arrow on the current bar can still disappear. Free, no trial, no locked features. The engine is deliberately simple. The stop follows price at a chosen multiple of ATR, ratchets in
FREE
Momentum you can read at a glance, and a product that tells you when it is not sure. QQE Mod MTF runs two independent QQE blocks over RSI and prints one histogram: bright when both blocks agree on a direction, grey when they do not. That grey is the point. Most oscillators give you a colour on every bar and leave you to guess how much it is worth; this one says out loud when there is no confirmation. Free, no trial, no locked features. QQE, which stands for Qualitative Quantitative Estimation, s
FREE
A trend line that refuses to wander. Half Trend MTF holds its level while the market pushes at it and flips only when the extremes of the last N bars actually take it out, so it sits still through the chop that makes a moving average look like a signal generator. Around it an ATR channel shows how much room today's volatility gives price before that flip is likely to matter. Free, no trial, no locked features. The decision it supports is a simple one, and it is stated plainly: the line says whic
FREE
An arrow tells you to buy. Obsidian Scalper Pro tells you where to buy, where the stop goes, where the three targets are, how big the position should be for your risk, and how good the setup is out of 100. Every signal arrives as a finished trade plan drawn on the chart, and a built in statistics window shows the honest result of the last hundred of them, win rate with a confidence interval and all. Every decision is made on a closed bar, so the history you are looking at is the history you woul
Twenty-eight symbols, four timeframes, one screen, and the trade already on the chart under it. Half Trend Scanner runs the stepped trend line across your whole watchlist, sorts the board by what flipped most recently, and tells you in one column how many timeframes agree on each symbol. Every cell it could not measure explains itself in words instead of going blank, so an empty board is never a mystery. The price increases by $10 every 10 purchases. It is two products in one file. The first is
Mean reversion is a numbers game, and the numbers live on more charts than you can watch. Nadaraya Watson Envelope Scanner runs a causal, non-repainting kernel regression envelope across your symbol list on up to four timeframes at once, prints every re-entry with its age, and marks the rows where the timeframes agree. Out of the box it scans fifteen pairs; one setting raises that to twenty-eight. The envelope itself draws on the chart in front of you, so you act on what the table found without
Twenty-eight symbols on four timeframes at once, and a board that admits when momentum is not confirmed. QQE Mod Scanner runs two independent QQE blocks over RSI across your whole watchlist, prints in every cell which way momentum turned and how many bars ago, and writes flat where the two blocks do not agree instead of colouring the cell anyway. The AGREE column tells you how many timeframes stand on the same side, and the oscillator itself is drawn in the sub-window under the table, so the mom
Watch twenty-eight symbols on four timeframes at once, and see the trade on the chart in the same breath. UT Bot Scanner runs the ATR trailing stop across your whole watchlist, sorts the board by what flipped most recently, tells you how many timeframes agree on each symbol, and draws the indicator itself on the chart under the table, so the moment the board finds something you are already looking at it. Every cell that could not be measured explains itself in words instead of going blank. The p
An oscillator that ignores every cross in the middle of the range. Wave Trend Oscillator MTF publishes a cross only when it happens inside a zone the market has actually reached, grades it by how deep that zone was, finds divergences on the fast line and can draw them on the price chart where you trade, and it can compute all of this on a higher timeframe while you watch your own. Free, no trial, no locked functions. The fast line measures how far the typical price has run from its own smoothed
FREE
One glance instead of twenty-eight charts. Wave Trend Oscillator Scanner runs the Wave Trend calculation across your symbol list on up to four timeframes at once, prints every fresh cross with its age and its grade, and marks the rows where the timeframes actually agree. Out of the box it scans fifteen pairs; one setting raises that to twenty-eight. And the oscillator itself draws in this chart's sub-window, so you act on what the table found without attaching a second indicator. The price incre
Currency Strength Pro ranks the eight major currencies by relative strength, read from up to 28 pairs, on a multi-timeframe composite, then ranks the basket's own pairs into a graded scanner. Closed bars only, never on a tick. Launch price: $59. It rises to $69 after the next 10 copies, then step by step to the final $98.  The idea is simple: trade a strong currency against a weak one, instead of the chart that happens to look nice today. The strength table answers "which currency". The scanner
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 time
Exhaustion Count Scanner is two products in one file. The first is Exhaustion Count MTF itself, drawn on the chart in front of you: the setup and countdown numbers printed bar by bar, the Setup Barrier levels currently in force, and the arrows on completed signals. The second is a board that runs the same counting across a list of symbols on up to eight timeframes at once. A nine or a thirteen is a rare event on any one instrument, which is exactly the case a board is for. The table finds them a
QQE Mod Scanner is two products in one file. The first is the QQE Mod oscillator itself, in this chart's own sub-window: two independent QQE blocks over RSI, reduced to one histogram, a trailing line drawn around zero and a Bollinger filter on that line. The state it publishes is the combination of the two, bright when both blocks agree on a direction and grey when they do not. The second is a board that runs the same calculation across a list of symbols on several timeframes at once. The board
Wave Trend Oscillator Scanner is two products in one file. The first is the Wave Trend oscillator itself, in this chart's own sub-window: the fast and slow wave lines and the histogram of their difference, coloured by whether momentum is expanding or fading, with divergence lines that can also be drawn on the price chart itself. The second is a board that runs the same calculation across a list of symbols on several timeframes at once. This is one of the two products in the family where the grad
Squeeze Momentum Scanner is two products in one file. The first is Squeeze Momentum MTF itself, in this chart's own sub-window: the momentum histogram coloured by expansion and fading, and the row of squeeze dots that says whether the Bollinger Bands are inside the Keltner Channel, outside it, or have just come out. The price increases every 10 purchases, the next price is $39 The second is a board that runs the same calculation across a list of symbols on several timeframes at once. A squeeze
Half Trend Scanner is two products in one file. The first is Half Trend itself, drawn on the chart in front of you: the stepped trend line that holds its level until the market takes it out, the ATR channel around it, and the flip arrows. The second is a board that runs the same calculation across a list of symbols on several timeframes at once. The board says which pairs have flipped and how recently; the chart under it shows you the line and the channel, so you do not have to attach a second i
UT Bot Scanner is two products in one file. The first is UT Bot MTF itself, drawn on the chart in front of you: the ATR trailing stop coloured by the side it is on, and the flip arrows, with the same four optional filters the single-chart product carries. The second is a board that runs the same calculation across a list of symbols on several timeframes at once. The board says which instruments have flipped and how recently; the chart under it shows you the trailing stop, so you do not have to a
An arrow tells you to buy. Obsidian Scalper Pro tells you where to buy, where the stop goes, where the three targets are, how big the position should be for your risk, and how good the setup is out of 100. Every signal arrives as a finished trade plan drawn on the chart, and a built in statistics window shows the honest result of the last hundred of them, win rate with a confidence interval and all. Every decision is made on a closed bar, so the history you are looking at is the history you woul
Filter:
No reviews
Reply to review