Accumulative Swing Index

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4720 quote
    Peter13.2007Peter13.2007
    Participant
    New

    Does anyone have the ProRealTime code for the Accumulative Swing Index developed by Welles Wilder?

    CUMULATIVE-SWING-INDEX.png CUMULATIVE-SWING-INDEX.png
    #4722 quote
    NicolasNicolas
    Keymaster
    Legend

    Hello Peter,

    Please find attached the Accumulative Swing Index indicator, made of the Swing Index found on PRT official library.

    Accumulative-Swing-Index.itf
    #4740 quote
    Peter13.2007Peter13.2007
    Participant
    New

    Hi Nicolas,

    The code works!

    Thank you so much.

    #13569 quote
    Fengshui17Fengshui17
    Participant
    New

    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…

    #13589 quote
    NicolasNicolas
    Keymaster
    Legend

    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!

    accumulative-swing-index-indicator-formula.png accumulative-swing-index-indicator-formula.png
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Accumulative Swing Index


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by NicolasNicolas
10 years ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/31/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...