Accumulation Swing Index
Author: Darrell__
Creation Date: 3/24/2018 9:19 PM
profile picture

Darrell__

#1
Can someone check if the Community Indicators code for the Accumulation Swing Index is correct, i.e. it appears the Accumulation Swing Index is only using the current and previous swing index values to compute the current bar's Accumulation Swing Index value. For example, the community indicators code shows:

CODE:
Please log in to see this code.


shouldn't the code be using a cumulative value, i.e.

CODE:
Please log in to see this code.



profile picture

Eugene

#2
Absolutely. The original formula used in translation had this as can be seen in a comment to the source code:
CODE:
Please log in to see this code.

The confusion came from not taking notice that it merely sums two values together whereas it should be accumulating them.

Thanks for spotting the bug and providing the fix!
profile picture

Eugene

#3
Community Indicators has just been updated to v2018.04 with Darrell__'s fix to the AccumSwingIndex factored in.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).