Found this code:
https://usethinkscript.com/threads/...tire-chart-or-specified-time.5496/#post-51741
If i wanted to use "volume" in place of var, and have the count reset to 0 each 15 bars and begin again, what would that look like?
i'm having trouble figuring out how to reset the count
Ruby:
declare lower;
#COUNT OF THE CUMULATIVE OF THE TOTAL NUMBER OF GREEN BARS (CLOSE>OPEN) FROM XYZ BARS AGO
#(COUNT CUMULATIVE TOTAL OF GREEN BARS FROM THE LAST / PAST XYZ BARS)
# By XeoNoX via Usethinkscript.com
input barsago = 15;
def var =close>open;
def count = Sum(var, barsago);
AddLabel (yes, "COUNT " + (count) );
If i wanted to use "volume" in place of var, and have the count reset to 0 each 15 bars and begin again, what would that look like?
i'm having trouble figuring out how to reset the count
Last edited by a moderator: