Inputs: Period(10);
Vars: Signal(0), Noise(0), Diff(0), ER(0), Smooth(1), Fastest(.6667), Slowest(.0645), AMA(0);
Diff = AbsValue(Close — Close[1]);
IF CurrentBar <= Period Then AMA = Close;
IF CurrentBar > Period Then Begin
Signal = AbsValue(Close — Close[Period]);
Noise = Summation(Diff, Period);
If Noise > 0 then ER = Signal / Noise;
Smooth = Power(ER ∗ (Fastest — Slowest) + Slowest, 2);
AMA = AMA[1] + Smooth ∗ (Close — AMA[1]);
End;
Plot1( AMA, «AMA»);
This entry was posted
on Вторник, 12 апреля, 2011 at 19:53 and is filed under Omega Research, торговые роботы (МТС).
You can follow any responses to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.
One comment