I dont know how to go on
I have main bar Range 6 and in Initialize method I added
Add(Instrument.FullName, PeriodType.Tick, 1, MarketDataType.Last);
CalculateOnBarClose is false.
In OnBarUpdate() I have something like:
if (BarsInProgress==0) {
Print("******************************************* **********");
Print("RANGE: "+CurrentBars[0]); //main bars
Print("******************************************* **********");
}
if (BarsInProgress==1) {
Print("TICK: "+CurrentBars[1]); //tciks bars
}
}
Result is:
TICK: 0
TICK: 1
TICK: 2
TICK: 3
.
.
.
TICK: 100 (for example)
********************************
RANGE: 0
********************************
TICK: 101
.
.
.
TICK: X
********************************
RANGE: 1
********************************
ETC.
So I know from the list that to the RANGE bar index 0 "belongs" 100 TICK bars. To the RANGE bar 1 belongs X-101 prevoius bars etc.
BUT - I dont want to save these info, if it is not necessary, and when I click(for example) on any main bar on chart and It has index let say 100, how can I get all prevoius tick bars belongs to this main bar ?? For example when I click bar index 0 I need to get (I mean go through) all 100 tick bars "belongs" to this main bar. Is it possible in any way ??
Of couse I have my own onmousedown event where I need to process data.
Thankyou very much for your help.
Alex
Comment