If you .SetInput(Input) the actual IndicatorRenderBase objects on the chart, it all starts working (which means the Values arrays are populated and correct) no matter how you cast them (between IChartObject, IndicatorRenderbase, NinjaSriptBase, IndicatorBase, etc) / how you use them.
So according to my findings, adding another list just to hold the same objects is not necessary, and the SetInput seems to be callable from anywhere.
So the following MAY NOT BE the best practice, it works nonetheless:
protected override void OnBarUpdate()
{
if (BarsInProgress != 0 || CurrentBar <= 1) return;
foreach (Gui.NinjaScript.IndicatorRenderBase irb in ChartControl.Indicators)
{
irb.SetInput(Input);
Print("R "+irb.Name + "\t" + irb.Value[1].ToString());
}
}


Comment