Wave Trend Oscillator MTF
- 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
- Updated: 2 September 2026
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 things are published from it: the cross, the grade of the zone it happened in, and the divergences found on the fast line. All three can be computed on a higher timeframe and drawn on the chart you are looking at.
The cross, the grade and the divergence
A buy cross counts only while the slow line is below the oversold level, and a sell cross only while it is above the overbought level. Anything else is ignored.
A signal is grade one when it happened in the armed zone, and grade two when the slow line also reached the deeper level. The grade describes how far into the zone the market was, not how likely the trade is to work.
Divergence is found by comparing pivots on the fast line with pivots in price. Bullish and bearish disagreements are marked and connected with a line. The same divergence can also be drawn on the price chart itself, between the two price pivots, so you see it where you actually trade.
The momentum histogram between the two lines is coloured by whether the current bar is expanding on the previous one or fading against it, so a still positive but shrinking histogram reads differently from a growing one. This colouring can be switched off, which returns the plain single colour histogram exactly.
What is on the chart
In its own sub-window, with a dotted zero level: the fast and slow wave lines, and the histogram of their difference, coloured by expansion and fading. Divergence lines are drawn in the sub-window and, optionally, on the price chart as well.
The panel
A canvas panel sits by default on the price chart rather than in the oscillator pane, though it can be put there. It is draggable, collapsible and closeable. It shows the timeframe in force, the channel length and the average length; what the last closed bar is, meaning the two wave values and either BUY with its grade, SELL with its grade, or no cross; and whether the numbers came from the properties dialog or from the panel, and how many of them were changed. Below that sit the settings the panel can move, with their current values.
The gear opens a sheet of three tabs. Values holds the timeframe, the channel length, the average length, overbought level 1, oversold level 1, whether divergence lines are drawn, and the shortest and longest pivot span a divergence may have. Every row has steppers, a range and a sentence of help. Alerts holds the master switch, the per-event switches, four channels, the cooldown in minutes and a test alert. Styles holds the palette, whether the lines and the momentum histogram are drawn, and the line width; it is appearance only and recomputes nothing.
Three colour schemes are included, one of them colour-blind safe, built on blue and orange so that red is never set against green. Panel state and every change made on the sheet persist per chart across a timeframe change and a terminal restart. The interface is English.
Alerts
Alerts are off out of the box. Six events can be raised: a BUY signal, a SELL signal, a bullish divergence formed on the fast line, a bearish divergence formed on the fast line, the fast line crossing the zero line up, and the fast line crossing it down.
Four channels carry them: popup window, sound, push to the mobile terminal, and e-mail. Switches are per event and per channel, and a cooldown, two hours by default, keeps a repeat quiet.
Alerts fire on the last closed bar. Two further alerts, off by default, speak on the forming bar within a chosen number of seconds of its close, and they are labelled early because a cross that exists mid-bar can be gone at the close. There is deliberately no forming-bar divergence alert: a divergence needs a confirmed pivot, and announcing one on an unfinished bar would be a guess rather than an early reading. Telegram is not part of this product.
Multi-timeframe
The Timeframe setting computes on a higher timeframe and draws the result here, reading only closed senior bars. A chart bar shows the newest senior bar that had already closed by its own time, not the one that contains it.
Divergence lines are anchored by bar time rather than by index, because on a foreign timeframe the pivots are senior bars and an index into that series means nothing on this chart.
A foreign series is built in the background. The first read of it can return nothing, the indicator retries, and the panel says whether it is waiting for a download or short of history.
Reading it from an EA
Every buffer is readable through iCustom and CopyBuffer. Buffer 0 is WT1, the fast wave line, and buffer 1 is WT2, the slow wave line. Buffer 2 is WT1-WT2, the momentum histogram, and buffer 3 is the colour index that goes with that histogram. Buffer 4 is Signal: +1 on a BUY cross, -1 on a SELL cross, 0 when there is none. Buffer 5 is Grade, 1 or 2 on a signal bar. Buffer 6 is Div, the divergence state. Buffer 7 is Zero: +1 when the fast line crossed zero upwards, -1 when it crossed downwards, 0 when it did neither. Buffer 8 is Override, the number of settings changed from the panel.
This product has no separate Buy and Sell price buffers. The signal is buffer 4 and its grade is buffer 5.
The Styles tab hides a plot by taking its colour away, never by emptying a buffer. Every index listed above stays readable through iCustom and CopyBuffer, and stays visible in the Data Window, with the display switches off.
Buffer 8 exists so that a strategy can tell that a chart instance is running on values changed by hand from the panel. An instance created by iCustom is read-only and always uses the parameters you passed.
Provenance
This is a port of "WaveTrend [LazyBear]" from TradingView. The provenance is a reconstruction: the formulas are canonical and widely mirrored, and they were used as the working specification for this product. The script is openly published, which makes a port by formula admissible.
The product carries the method's name because that is what it implements. The original work is LazyBear's and no authorship of it is claimed here.
Honest limits
The oscillator is live on the forming bar. A cross that exists mid-bar can be absent at the close, and the panel line and the grade go with it. Closed bars do not change.
Divergence marks are never placed on the forming bar. A pivot needs the bars on either side of it to exist before it is a pivot, so divergence appears after the fact by construction. That is a property of divergence rather than a defect, and it also means a divergence is never drawn into a past bar that did not have one.
The grade describes the depth of the zone reached, not a probability. A grade 2 signal was further into the zone. That is all it says.
A cross is not direction. In a trend the oscillator will reach one zone repeatedly, and every cross it produces will be against that trend.
The channel length and the average length move every cross the product will ever show. Two settings give two different sets of signals, and neither one of them is the correct one.
No profit figure, win rate or backtest result is claimed here.

