How it is calculated
VI+ is the sum of |high minus previous low| over length bars divided by the sum of the true range over the same bars; VI- uses |low minus previous high|. The first bar has no previous bar, so the first value is on bar length, counting from 0. While the true range sums to 0, with no movement at all, both lines have no value.
Reference: Botes and Siepman 2010
How to read it
VI+ above VI- points to an uptrend, below it to a downtrend, and the cross is the signal. Both lines swing around 1. In sideways markets they cross often, so a trend filter or a second confirmation helps.
In a strategy
Enter long when ctx.ind("vortex", length=14).plus crosses above .minus, exit on the opposite cross.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Lengthlength | Whole number | 14 | min 1, max 5000 |
What it draws
| Line | Drawn as |
|---|---|
| VI+ | Line |
| VI- | Line |
Guide lines at 1.
Used in
No strategy template reads it yet.