Hi. I’ve made a fairly simple custom indicator that pops up a graphic overlaid on the main chart when a calculated value is within a certain range, and once it moves back out of the range, the “state” is reset and graphics removed.
Everything works great if the current candle closes with the value within range, but if the graphic/reset trigger happens mid-bar and then moves back out, the reset never actually happens because it appears to be that the “state” changes do not get ‘saved’ until the close of the bar.
What I’d really like to know is: what is the code to “save” when the conditions are met, and not have to wait until the close of the bar?
I am needing some volume profile stuff, so the Input needs to be set to BARs, i think? At least, changing that seems to deactivate any profile() data from coming through.
Thanks.