Add(PeriodType.Day, 1);
when loading Count = 177 but CurrentBars[1] only reaches 175?
protected override void OnBarUpdate() { if(BarsInProgress == 1 && FirstTickOfBar) { sum = 0; curPeriod = Math.Min(CurrentBars[1], 20); for(int i=1; i <= curPeriod - 1; i++) sum += Closes[1][i]; } }
Comment