Does anyone have the ProRealTime code for the Accumulative Swing Index developed by Welles Wilder?
Hello Peter,
Please find attached the Accumulative Swing Index indicator, made of the Swing Index found on PRT official library.

Hi,
I tried to put this ASI into PRT by using this itf file above but I get something totally different to what we should expect from the ASI. What I mean is, the zero line, that should mark the separation between the bearish and bullish trends was passed only in 2013 (we are in 2016 !), which is absurd being given the ASI is an indicator quite fast, as we can see for example in this short video:
https://www.youtube.com/watch?v=dxJ64XXEiRA
So shouldn’t we think there is something wrong in this itf file?
Thank you for putting some light about it…
I don’t remember from which language I translate this formula in the first place.
I have just recoded from an MQL4 one (MT4) :
T = 300
Tpoints = T * pointsize
IF BarIndex > 0 THEN
if(close[1]>=Low and Close[1]<=High) then
ER = 0
else
if close[1]>high then
ER = abs(high-close[1])
elsif close[1]<low then
ER = abs(low-close[1])
endif
endif
K = max(abs(high-close[1]),abs(low-close[1]))
SH = abs(close[1]-open[1])
R = TR - 0.5*ER + 0.25*SH
if R = 0 then
SIBuffer = 0
else
SIBuffer = 50*(close-close[1]+0.5*(close-open)+0.25*(close[1]-open[1]))*(K/Tpoints) / R
endif
ASI = ASI[1]+SIBuffer
ENDIF
RETURN ASI
Got exactly the same returned curves from the 2 indicators. On what instrument did you observe a difference? Maybe the cTrader indicator formula from the youtube video is not the same as the ones I found so far!