So formula represented here for the "Votex" version is still equal
========
///****with Vortex version as "tester"***
myVIp = CALL Vortexplus[k]
myVIm = CALL Vortexminus[k]
if myVIp >= myVIm then
stop1 = customclose + AverageTrueRange[n](customclose)
else
stop1 = customclose - AverageTrueRange[n](customclose)
endif
if myVIp >= myVIm then
stop2 = highest[m]
else
stop2 = lowest[m]
endif
return stop1 as "Stop_ATR", stop2 as "Stop_hi_lw.est"
//default k = 11, n = 14, m = 20.
=======
but you have to define Vortexplus and Vortexminus included in the definition of Vortex indicator (January, 2010) http://www.fergco.co/2010/01/vortex-indicators-pro-real-time-formula.html
Simply use the Vortex formula, truncating useless parts for this purpose:
VIMinus
/ +VM giorno precedente VM+ daily
VMplus=abs(high-low[1])
//-VM giorno precedente VM- daily
VMminus=abs(low-high[1])
//calcolo indicatore VM (vortex movement) for n-days
//vero indicatore VM+n - effettive VM+ for the period given by n-days
VMminusn=summation[n](VMminus)
//true range of VMovement
Raggio=high-low
True1=max(Raggio, VMplus)
True2=max(Raggio, VMminus)
vero=max(true1, true2)
//true range of Vmovement for the period
Truen=summation[n](vero)
//calculation of the Vortex Indicators for the period
VImin=VMminusn/Truen
RETURN VImin coloured (0,150,0) as "VI-"
VIPlus
// +VM giorno precedente VM+ daily
VMplus=abs(high-low[1])
//-VM giorno precedente VM- daily
VMminus=abs(low-high[1])
//calcolo indicatore VM (vortex movement) for n-days
//vero indicatore VM+n - effettive VM+ for the period given by n-days
VMplusn=summation[n](VMplus)
//true range of VMovement
Raggio=high-low
True1=max(Raggio, VMplus)
True2=max(Raggio, VMminus)
vero=max(true1, true2)
//true range of Vmovement for the period
Truen=summation[n](vero)
//calculation of the Vortex Indicators for the period
VIplus=VMplusn/Truen
RETURN VIplus coloured (100,0,100) as "VI+"
That's all!!
see you very soon for the next formulas proposed by Stocks & Commodities!!
Any source
No comments:
Post a Comment