I am wondering if there is a simpler way to store the index of a bar that you want to keep for later use?
Say an event occurs, and you want to keep track of WHEN that occurrence has happened. Typically what I have always done is start a counter, and increment it onBarUpdate(), and when I want to reference that number, subtract that from the current bar to get that location. Of course resetting that value when done.
Is there a simpler way to accomplish that without the need for counting and resetting your count variables?
Comment