Vortex Indicator 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
Two lines that measure the actual rotation of a market rather than the shape of an average. Vortex Indicator MTF sums the upward and downward vortex movements over a window, divides each by the true range, and takes its signal from the crossing of the resulting pair, which is a direction change measured from the bars themselves. It carries no recursion at all, so a continuation from any bar is exact by construction. It is free: no trial, no locked features, no upgrade page.
Over a window three sums are taken: the distance from this bar's high to the previous low, which is upward vortex movement, the distance from this bar's low to the previous high, which is downward, and the true range. Each of the first two divided by the third gives VI plus and VI minus. Both oscillate around one, and their crossing is the signal.
There is no recursion anywhere in this port. The two lines are pure functions of a window over the input highs, lows and closes, which is why a continuation from any bar is exact by construction rather than approximately so. The strength level only grades a crossing two instead of one and marks the strengthening and fading of the vortex as its own event; it filters nothing, and every crossing is published.
What is on the chart
In its own sub window: VI plus and VI minus as two lines around the one level, and the spread between them as a histogram, coloured by whether it is expanding or fading. Divergence lines are drawn on the pair and, if you want them, between the matching pivots on the price chart as well.
The panel
A canvas panel on the price chart, draggable, collapsible, closeable. It shows the timeframe in force and the setting values actually being used. It says what the last closed bar was: a BUY signal, a SELL signal, or neither. And it says whether the numbers on screen came from the properties dialog or from the panel, and how many of them were changed by hand.
Below that sit the settings the panel can move, with their current values. The gear opens a three-tab sheet.
Values covers the timeframe, the length the three sums are taken over, fourteen by default, the strength level of 1.10 which grades a crossing two instead of one, and the three divergence rows. Styles covers the palette, the two lines and their width, and the spread histogram. Every Values row has steppers, a range and a sentence of help.
The Alerts tab covers the master switch, the per event switches, the channels, the cooldown in minutes and a test alert.
Three colour schemes: dark, light, and a colour-blind safe one that uses blue and orange rather than red and green. Everything about the panel, including every value changed on the sheet, is stored per chart and survives a timeframe change and a terminal restart. The interface is English.
Alerts
Off out of the box. Six events: a BUY signal, a SELL signal, a bullish divergence, a bearish divergence, the vortex strengthening, and the vortex fading. Each has a switch of its own.
Channels: a popup window, a sound, a push to the mobile terminal and e-mail. There are per-event and per-channel switches, and a cooldown that defaults to two hours.
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 flip that exists mid-bar can un-happen. Telegram is not part of this product.
Multi-timeframe
The Timeframe setting computes on a higher timeframe and draws the result here. Only closed senior bars are read: a chart bar shows the newest senior bar that had already closed by that chart bar's own close, so the flip lands on the bar that closes together with the senior bar, and nothing is drawn that could not have been known in real time.
The foreign series is built in the background. The first read of it can come back empty, the indicator retries, and the panel says whether it is waiting for a download or looking at a genuine shortage of history. It never fails initialisation over missing bars.
Reading it from an EA
Nine buffers, all readable through iCustom and CopyBuffer. Buffer 0 is VI plus, the upward vortex movement and buffer 1 is VI minus, the downward one. Buffer 2 is the spread between the two, drawn as a histogram, and buffer 3 is the colour index that paints it. Buffer 4, Signal, is +1 on a BUY bar, -1 on a SELL bar and 0 otherwise. Buffer 5 is the grade of that signal. Buffer 6 carries the divergence marks, +1 bullish and -1 bearish. Buffer 7 is the zero line and buffer 8 is Override.
This product has no separate Buy and Sell price buffers, because there is no price to put an arrow at in a sub window. The signal is buffer 4 and it is the contract: filled on every pass whatever the Styles tab says, and present in the Data Window. Hiding a plot is done by taking its colour away and never by emptying a buffer, so every index above stays readable with the display switches off.
An instance created by iCustom is read only and always uses the parameters you passed. The Override buffer lets a strategy detect that a chart instance is running on numbers changed by hand from the panel.
Provenance
This is a port of the Vortex Indicator by Botes and Siepman, published in Technical Analysis of Stocks and Commodities in 2010. The mathematics is public and the indicator is built into TradingView, which makes a port by formula admissible. One deviation is declared: the sums are progressive on the first bars where Pine returns nothing, and the very first bar has zero vortex movement because it has no bar before it.
The product is called Vortex Indicator MTF because that is the name of the method, not because authorship of the method is claimed here. The original work belongs to its author.
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.
A crossing of the two lines is a change in which rotation dominates. In a range they cross often, and each of those crossings is a real crossing and a poor trade.
The strength level describes how far the leading line stood above one at the moment of the cross. It is a description of the reading, not a probability.
The single length setting moves every crossing the product will ever show. A short window crosses constantly, a long one rarely, and neither is the correct setting.
No profit figure, win rate or backtest result is claimed here.
