Vortex Indicator
Posted: Sun Jun 12, 2016 10:17 am
Here is my version of this indicator
trSum:= sum(ATR(1), N);
VtxP := if (trSum == 0 ,0 , sum(Abs(high - Ref(low,1)),N))/ trSum,ColorGreen;
VtxM := if (trSum == 0 ,0 , sum(Abs(low - Ref(high,1)),N))/ trSum,ColorRed;
OST:VtxP - VtxM,Colorstick;
Con1:= OST >= 0;
Con2:= OST < 0;
Con3:= OST > Ref(OST,1);
Con4:= OST < Ref(OST,1);
BullRise:If(Con1 & Con3,OST,0),ColorLime;
BullFall: If(Con1 & Con4,OST,0),ColorGreen;
BearFall: If(Con2 & Con4,OST,0),ColorRed;
BearRise: If(Con2 & Con3,OST,0),ColorDarkRed;
OSTAvg:MA(OST,Sig),width2,ColorBlue;
ZeroLine:0,ColorBlack;
UpperZone:MA(OST,34)+(1.3185*Std(OST,34)),width2,colorViolet;
LowerZone:MA(OST,34)-(1.3185*Std(OST,34)),width2,colorViolet;
FillRgn(1,BullRise,0),Brush#5000FF00;
FillRgn(1,BullFall,0),Brush#50006400;
FillRgn(1,BearRise,0),Brush#508B0000;
FillRgn(1,BearFall,0),Brush#50FF0000;
under the parameter tab
n double 10 3 100
Sig double 3 2 100
trSum:= sum(ATR(1), N);
VtxP := if (trSum == 0 ,0 , sum(Abs(high - Ref(low,1)),N))/ trSum,ColorGreen;
VtxM := if (trSum == 0 ,0 , sum(Abs(low - Ref(high,1)),N))/ trSum,ColorRed;
OST:VtxP - VtxM,Colorstick;
Con1:= OST >= 0;
Con2:= OST < 0;
Con3:= OST > Ref(OST,1);
Con4:= OST < Ref(OST,1);
BullRise:If(Con1 & Con3,OST,0),ColorLime;
BullFall: If(Con1 & Con4,OST,0),ColorGreen;
BearFall: If(Con2 & Con4,OST,0),ColorRed;
BearRise: If(Con2 & Con3,OST,0),ColorDarkRed;
OSTAvg:MA(OST,Sig),width2,ColorBlue;
ZeroLine:0,ColorBlack;
UpperZone:MA(OST,34)+(1.3185*Std(OST,34)),width2,colorViolet;
LowerZone:MA(OST,34)-(1.3185*Std(OST,34)),width2,colorViolet;
FillRgn(1,BullRise,0),Brush#5000FF00;
FillRgn(1,BullFall,0),Brush#50006400;
FillRgn(1,BearRise,0),Brush#508B0000;
FillRgn(1,BearFall,0),Brush#50FF0000;
under the parameter tab
n double 10 3 100
Sig double 3 2 100