public class xx : Indicator
{
SMA jk_sma;
protected override void Initialize()
{
jk_sma = new SMA();
}
protected override void OnStartUp()
{
jk_sma.Input=BarsArray[0];
}
protected override void OnBarUpdate()
{
//** Indicator is unusuable, not getting any data
if(BarsArray[0].CurrentBar>100)
Print(String.Format("{0}",jk_sma.Value[0]));
}}...
How can I assign the dataseries properly? I know I can use SMA simply as SMA(x).Value[0] but I need to do it the way I've described for other reasons.
Thanks.
Comment