Quote from Spelunk:
There is no simple way of using iterators on a custom object like you are creating. A much more useful way to implement this is to organize your data into vectors of Open, High, Low, etc rather than by bars. This will be much faster, flexible and will allow you to use the standard vector functions.
Thanks Spelunk,
That's what I figured. I thought of doing it that way - but the problem is, with the custom Vector of a Vector, I can grow each internal Vector row dynamically with calculated data.. was hoping to use iterators to simplify/expedite the process of accessing/manipulating the OHLC _and_ newly calculated data.. but what you are saying makes sense - I'll try it out and see if I can make it work. It is just nice and secure having all data for a given point in time tied together in a single vector - but as you have pointed out, there are more efficient ways.
I am wondering if STL is even the answer.. eventually speed will be a concern - for now I don't have piles of data, but when tick data becomes part of the equation in the future, fast access and well-organized data structures become crucial.. of course I read on the other threads about some of the other guys using databases to hold their historical data.. still kicking around some ideas here - just want to do it right, and build on that... seems more practical than kludging it all together and having to redesign when limitations are met.. especially once interfaced with a GUI, and combined with massive amounts of tick data. Maybe using C is a better approach as some of the others here are doing - much (much!) to learn..
.