For example, a series of consecutive numbers like this, in OnBarUpdate():
for(int i = 0; i <= 20; i++)
ds.Set(i,i);
in Initialize(): ds = new DataSeries(this);
(where ds was defined as: private DataSeries ds)
Now, when I try to do
double f = EMA(ds, 3)[0];
the results of 'f' seems not to hold the right EMA for those last 3 numbers.
So how can I do such a thing, or what is wrong...
Thanks in advance.
Arnon.


Comment