Lets say I have 3 time-frames:
//main time-frame, the one to which strategy is attached.
Add(PeriodType.Minute, 3); //added in onIntialize
Add(PeriodType.Minute, 1); //added in onIntialize
How do I get latest Bar object for 3rd time-frame?
I can obtain Closes[2][0],Highs[2][0], Lows[2][0], Opens[0],Times[2][0], Volumes[2][0], which is basically information stored in the object. But I need Bar object- it's just a matter of usage convenience. I could easily live without it, but since you do have Bar class in framework, I thought it might be possible. I just don't seem to be able to find how could I do that.
I would assume that it should be accessible through Bars object and you do have
GetDayBar function in this class. But its name suggests something different.
So would BarsArray[2].GetDayBar[0] get me latest bar for 1 minute time-frame?
Comment