ERROR: BarsInProgress always equals Zero even when I have added multiple data series
protected override void OnMarketData(MarketDataEventArgs e) {
....
else if (e.MarketDataType == MarketDataType.Last) {
str = string.Format( templateStr ,e.Time,e.Price,e.Volume.ToString("#####"));
myForm.Print(str+"Ask "+myint+" BIP: "+BarsInProgress);
}
....
}
generates:
01:14:09 81.59 1 Ata 0 BIP: 0
01:14:02 81.59 1 Ata 0 BIP: 0
01:14:01 81.59 1 Ata 0 BIP: 0
01:14:01 81.59 1 Ata 0 BIP: 0
with 1 data series
I add another data series and I get the following output
01:18:49 81.51 1 Atb 0 BIP: 0
01:18:49 81.51 1 Atb 0 BIP: 0
01:18:48 81.52 1 Ata 0 BIP: 0
01:18:48 81.52 1 Ata 0 BIP: 0
01:18:35 81.51 1 Bet 0 BIP: 0
01:18:35 81.51 1 Bet 0 BIP: 0
01:18:30 81.52 1 Ask 0 BIP: 0
01:18:30 81.52 1 Ask 0 BIP: 0
..BarsInProgress is ALWAYS ZERO!!!... even though the event is triggered twice and the help says that you should use this property when in this event
when I add the data series ...
protected override void Initialize() {
Add( PeriodType.Minute, 1);
...
from the help file:
Tips
Comment