I'm trying to submit order on different bars, but I'm facing an obstacle right from the get go.
My strategy runs on 5 minutes bar and I'm testing my strategy on a certain date.
So here's my code:
protected override void Initialize() { CalculateOnBarClose = false; Add(PeriodType.Second, 10); } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { if (BarsInProgress != 0) return; if (Times[0][0].Date != _datetest){ return; } Print(BarsArray[0].BarsSinceSession); /* REST OF THE CODE */ }
What is the reason for that?
Thanks.
Comment