I've created Series objects that store price information given certain events. The problem I have is how to refer to those events again. Since Series index already in reverse, each new bar added means that I need to add one to the index of where that event took place.
e.g.
//on bar 10, my event takes place so let's update mySeries. mySeries[0] = Close[0];
//on bar 15, I want to get back mySeries value on bar 10, when the last of my events took place. //I could keep an iterator updated on each bar so that I have something like; lastEventIdx++; //some code here //I need my value now. lastEventValue = mySeries[lastEventIdx];
Interested to hear your thoughts.
regards
Comment