Basically creating a custom indicator and need the previous indicator value added up. I’m currently using the following code:
exampleName = exCloseVal + exCloseVal[1] + exCloseVal[2] + exCloseVal[3] + exCloseVal[4] + exCloseVal[5]
Now let’s say I wanted the past 100 bar close values added up, would there be an alternative way to add them up, rather than typing it out the way I am up to 100?
Many thanks for reading and would greatly appreciate any help.