Hello,
im looking to edit this bar counter to count every three bars. ex: 1 3 6 9 12 15 etc. I've tweaked every input to no avail, any assistance greatly appreciated.
input StartAt = 930;
input EndAt = 1615;
def active = secondsFromTime(StartAt) >= 0 and secondsFromTime(EndAt) < 0;
def count = if active and !active[1] then 1
else if !active and active[1] then double.NaN
else count[1]+1;
plot c = if count%2 <>0 then count else double.nan;
c.setPaintingStrategy(paintingStrategy.VALUES_BELOW);
im looking to edit this bar counter to count every three bars. ex: 1 3 6 9 12 15 etc. I've tweaked every input to no avail, any assistance greatly appreciated.
input StartAt = 930;
input EndAt = 1615;
def active = secondsFromTime(StartAt) >= 0 and secondsFromTime(EndAt) < 0;
def count = if active and !active[1] then 1
else if !active and active[1] then double.NaN
else count[1]+1;
plot c = if count%2 <>0 then count else double.nan;
c.setPaintingStrategy(paintingStrategy.VALUES_BELOW);