for example,
private IDataSeries x;
where and how should we initialize the variable x? for example,
x = SMA(Close, 9);
Does it go to the if(BarsinProgress==1) of OnBarUpdate()?
If it go to the initialize() or OnStartUp(),
how do we write the code?
I found the code x = SMA(Close, 9) will work only for the second bar with
the same period and type as first bar.
Thank you.
Comment