custom indicator reference in cBot got Wrong value
05 Apr 2015, 06:53
Hi, every one.
the Result in my indicator is {5,3,0,0,0,1}
if got {5,3,3,3,3,1} in cBot.
BreakOutTips br;
protected override void OnStart()
{
br = Indicators.GetIndicator<BreakOutTips>();
}
protected override void OnBar()
{
Print("time={0},bk={1}", MarketSeries.OpenTime.LastValue, br.Result.LastValue);
}
i tryed to got it by br.Result.Last(index) too,but still never got 0 value.
any one could help?

superium
06 Apr 2015, 04:58
got it ,it seems that was coursed by the use of dataseries in the Last day.
OnCalculate(int index){
Result[index]=dosomecalculateonIndex(Dataseries,index);
}
but onBar() was called before the bar finished, so dataseries got wrong value.
@superium