Sum of an Indicator

I am trying to get the n-day sum of a breadth indicator. What is the best way to script that?

Thanks,
Dan

Hi,

We can use the ACC() function to sum up values across a selected number of bars.

https://help.optuma.com/kb/faq.php?id=1026

Here’s an example using a Breadth Code, summing the values of the last 5 bars…

V1 = GETDATA(CODE=ADVNASDAQ:BM) ;
ACC(V1, RANGE=Look Back Period, BARS=5)

Hi Dan,

If you’re looking to create a breadth thrust ratio see here (includes workbook):

https://forum.optuma.com/topic/how-to-script-sums-of-a-d-data/#post-55333