If I call daily bars (also see pivots indicator) via
isInit = true;
Data.Bars.GetBars(Bars.Instrument, new Period(PeriodType.Day, 1), Bars.From, Bars.To, (Session) Bars.Session.Clone(), Data.Bars.SplitAdjust, Data.Bars.DividendAdjust);
isInit = false;
within an indicator, this produces a strange effect:
OnBarUpdate() continues its course during this initialization process, so what happens is
(1) OnBarUpdate() runs 5000 times
(2) Initialization is completed and isInit is set to false;
(3) OnBarUpdate() runs another 5000 times to complete the chart.
The problem is here that the daily bars are only available, when the chart has been scanned halfway, which is not very helpful, as I want to use them right in the beginning!
Is there any way to tell NT to please first complete the initialization of the daily bars and then continue to proceed with OnBarUpdate()?
Comment