I have a strategy with the following functions defined:
protected override void Initialize()
{
CalculateOnBarClose = true;
Add(PeriodType.Day, 1);
Add(PeriodType.Minute, 60);
Add(PeriodType.Minute, 5);
Add(PeriodType.Minute, 1);
}
protected override void OnBarUpdate()
{
if(CurrentBars[1]<7){Print("Not enough days: " +CurrentBars[1]); return;}
if(CurrentBars[2]<150){Print("Not enough hours: " +CurrentBars[2]); return;}
if(CurrentBars[3]<3){Print("Not enough 5min: " +CurrentBars[3]); return;}
if(CurrentBars[4]<3){Print("Not enough 1min: " +CurrentBars[4]); return;}
if(BarsInProgress!=2){Print("Not an hour update...");return;}
Print("Update Happening");
}
I set it on 60 Minute bars with loading 10 days and 200 bars and the output I get is:
"Not enough days: 0"
which just goes on and on.
the question is why its not moving on to the next day and what could be done to solve it?
Thank you,
Sergey

Comment