I'm trying this code:
protected override void Initialize() { Add(PeriodType.Minute, 1); Add(PeriodType.Minute, 3); Add(PeriodType.Minute, 10); Add(PeriodType.Minute, 30); CalculateOnBarClose = false; } protected override void OnBarUpdate() { Print ("BarsInProgress=" + BarsInProgress + "; CurrentBar=" + CurrentBar); }
... BarsInProgress=0; CurrentBar=962 BarsInProgress=1; CurrentBar=190 BarsInProgress=2; CurrentBar=63 BarsInProgress=0; CurrentBar=962 BarsInProgress=1; CurrentBar=190 BarsInProgress=2; CurrentBar=63 BarsInProgress=0; CurrentBar=962 ...
... Add(PeriodType.Minute, 1); Add(PeriodType.Minute, 2); Add(PeriodType.Minute, 3); Add(PeriodType.Minute, 4); ...
... BarsInProgress=2; CurrentBar=95 BarsInProgress=3; CurrentBar=63 BarsInProgress=4; CurrentBar=48 BarsInProgress=0; CurrentBar=959 BarsInProgress=1; CurrentBar=189 BarsInProgress=2; CurrentBar=95 BarsInProgress=3; CurrentBar=63 BarsInProgress=4; CurrentBar=48 BarsInProgress=0; CurrentBar=959 BarsInProgress=1; CurrentBar=189 ...
Thanks
Comment