indicator · own pane · open source
Vortex Difference indicator
Vortex Difference is a free open-source indicator. Vortex Difference is +VI minus -VI — a single-line oscillator that goes positive when… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Vortex Difference does
Vortex Difference is +VI minus -VI — a single-line oscillator that goes positive when up-moves dominate and negative when down-moves do.
- Crosses of zero are the cleanest entries.
- Magnitude scales with trend strength; combined with ADX it gives a regime + direction readout.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Vortex Difference", overlay=false)
len = input.int(14, "Length", minval=2, maxval=200)
colorUp = input.color("color.green", "Color Up")
colorDown = input.color("color.red", "Color Down")
colorNeutral = input.color("color.gray", "Color Neutral")
ta.tr = math.max(high - low, math.abs(high - close[1]), math.abs(low - close[1]))
vip = math.sum(math.abs(high - low[1]), len) / math.sum(ta.tr, len)
vim = math.sum(math.abs(low - high[1]), len) / math.sum(ta.tr, len)
vd = vip - vim
hline(0, "Zero", color=colorNeutral, linestyle=hline.style_dashed)
p_VI_Diff = plot(vd, "VI Diff", color=vd >= 0 ? colorUp : colorDown, style=plot.style_columns, linewidth=2)
alertcondition(ta.crossover(vd, 0), "VI diff turns up", "Vortex difference crossed above zero")
alertcondition(ta.crossunder(vd, 0), "VI diff turns down", "Vortex difference crossed below zero")
No comments yet.
Sign in to comment.