{
if (CurrentBar == 0)
Value.Set(Input[0]);
else
{
int back = Math.Min(Period - 1, CurrentBar);
double val = 0;
int weight = 0;
for (int idx = back; idx >=0; idx--)
{
val += (idx + 1) * Input[back - idx];
weight += (idx + 1);
}
Value.Set(val / weight);
}
}
So far though I can't figure it, any help appreciated.
Thanks,
Jeremy
Comment