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

velpidimaktov
 1 

Маэстро, это прелестно!
А на quik и qpile Вы уже совсем не тратите время? У меня, к сожалению, нет возможности сейчас осваивать новые пакеты и языки, коими, к тому же, мне невозможно вести торговлю. Вот если бы всю эту красоту — да на qpile! Сам не смог…

13 апреля, 2011 at 15:46