michaelhasip
New member
I hear that some other system have a function named "sumbars", which use to count how many bars that "data" 's sum reach specify amount.
e.g.: sumbars(close, 100) will return how many bar the close (close+close[1]+close[2]+...+close[n]) will reach 100
Is there any function or way in thinkscript can do such thing?
I tried fold and sum, but sum does not accept dynamic variable....
Thanks in advance.
e.g.: sumbars(close, 100) will return how many bar the close (close+close[1]+close[2]+...+close[n]) will reach 100
Is there any function or way in thinkscript can do such thing?
I tried fold and sum, but sum does not accept dynamic variable....
Thanks in advance.