Reply To: Accumulation ACC() does not seem to work

Optuma Forums Optuma Scripting Accumulation ACC() does not seem to work Reply To: Accumulation ACC() does not seem to work

  • Topics: 18
  • Replies: 24
  • Posts: 42

Hi Matthew,

What I was trying to do, was get the value on that specific date, and then use it as a reference on every bar from that point forward, so if the value was 250, I wanted to assing f2 to 250, and then be able to reference back to the 250 on each bar.  What is happening in the code, is that f2 is equal to 250 on the first bar, but then changes to 0 the next bar, as the start date no longer matches.  In order to carry the 250 to each subsequent bar, i was trying to accumulate the f2 , hoping that it would take the initial value of 250 and add 0 to this on each bar, keeping 250 as the constant result.  In the above, what happens is that the 250 is fluctuating with each new bar, as the degrees change, which is then not providing me with the reference back to the 250.  I have tried to use FIRST(Non zero, f2) but still does not seem to carry this value of 250 across to the future bars.  Not sure if there is a logical error here, but logic seems correct, just cant seem to get it to work in the code.


Thanks a mil


Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.