Indicators/probuilder · probacktest · proorder · proscreener

VIplus

VIplus in ProBuilder returns the positive Vortex Indicator line, measuring upward trend movement over N bars. Syntax, formula, examples, interpretation.

Syntax

probuilder
VIplus[period]

Parameters

NameTypeDefaultDescription
periodinteger14Number of bars used in the calculation. Shorter periods react faster but cross more often; longer periods produce fewer, slower signals.

Formula

code
VI+ = Sum[N](ABS(high - low[1])) / Sum[N](TrueRange)

The numerator accumulates the distance between the current high and the previous low over N bars, capturing upward vortex movement. Dividing by the summed true range normalises the result for volatility. The negative counterpart, computed by VIminus, uses the distance between the current low and the previous high instead.

How it works

The Vortex Indicator, introduced by Etienne Botes and Douglas Siepman, splits price rotation into two components. VI+ grows when bars keep pushing above prior lows, the signature of sustained upward movement. VI- grows when bars keep undercutting prior highs. VIplus computes only the positive component; a complete Vortex setup calls both functions with the same period.

The function takes no price argument. It reads the instrument's high, low, and true range directly, so the only choice is the lookback period. On each bar the two lines are recalculated over the trailing window, producing values that oscillate around 1.0.

The lines are usually plotted together in a separate panel. Their relative position defines the trend reading, and their crossings define the signals.

Examples

Example 1, Plotting both Vortex lines (Indicator)

probuilder
// Standard 14-period Vortex Indicator
myVIplus = VIplus[14]
myVIminus = VIminus[14]
RETURN myVIplus AS "VI+", myVIminus AS "VI-"

Calculates both Vortex lines with the conventional 14-bar setting and plots them in the same panel so crossings are visible.

Example 2, Bullish crossover scan (ProScreener)

probuilder
vp = VIplus[14]
vm = VIminus[14]
// Match instruments where VI+ just crossed above VI-
SCREENER[vp CROSSES OVER vm](vp AS "VI+ 14")

Returns instruments where the positive Vortex line has just crossed above the negative line, the standard bullish Vortex signal.

Example 3, Vortex trend filter for entries (ProOrder)

probuilder
vp = VIplus[21]
vm = VIminus[21]

// Enter long on the bullish cross, exit when the cross reverses
IF NOT LongOnMarket AND vp CROSSES OVER vm THEN
  BUY 1 CONTRACT AT MARKET
ENDIF
IF LongOnMarket AND vp CROSSES UNDER vm THEN
  SELL AT MARKET
ENDIF

A long-only system that holds a position while the 21-period VI+ stays above VI-. The longer period reduces the number of crossings compared with the default 14.

Interpretation

ConditionReading
VI+ above VI-Upward movement dominates, trend classified as positive.
VI- above VI+Downward movement dominates, trend classified as negative.
VI+ crosses over VI-Bullish signal, potential start or resumption of an uptrend.
VI+ crosses under VI-Bearish signal, potential start or resumption of a downtrend.

Vortex crossings are trend-following signals. They tend to work in markets that move directionally and generate repeated false crossings in sideways ranges, similar to DIplus and DIminus in the ADX family.

Common errors and gotchas

  • No price argument. VIplus takes only the bracketed period. Writing VIplus[14](close) is invalid because the function reads highs and lows internally, not an arbitrary price series.
  • Half an indicator on its own. VI+ has little meaning in isolation. The documented signals come from its relationship with VIminus, so both lines should be computed with the same period.
  • Whipsaws in ranges. In sideways markets the two lines cross repeatedly around 1.0. Combining the cross with a trend strength filter such as ADX reduces noise.
  • Period mismatch between the two lines. Calling VIplus[14] against VIminus[21] produces crossings that do not correspond to any standard Vortex reading. Keep the periods identical.
  • VIminus, the negative Vortex line, required to complete the indicator.
  • ADX, trend strength measure often paired with directional lines.
  • DIplus, positive directional movement line from the ADX family.
  • DIminus, negative directional movement line from the ADX family.
  • AverageTrueRange, the volatility measure underlying the Vortex denominator.
  • SAR, parabolic stop-and-reverse trend follower.
  • Supertrend, ATR-based trend direction indicator.
  • AroonUp, alternative measure of upward trend strength.