PureBytes Links
Trading Reference Links
|
Saw this thread and thought you minght like the AMA function. Just create a
Function Called AMA and Paste in.
Inputs: Period(Numeric);
Vars: Noise(0), Signal(0), Diff(0), efRatio(0), Smooth(1), Fastest(.6667),
Slowest(.0645), AdaptMA(0);
Diff = AbsValue(Close - Close[1]);
IF CurrentBar <= Period Then AdaptMA = Close;
IF CurrentBar > Period Then Begin
Signal = AbsValue(Close - Close[Period]);
Noise = Summation(Diff, Period);
efRatio = Signal / Noise;
Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2);
AdaptMA = AdaptMA[1] + Smooth * (Close - AdaptMA[1]);
End;
AMA = AdaptMA;
____________________Reply Separator____________________
Subject: Re: not a programmer
Author: Ron Augustine
Date: 10/9/98 3:56 PM
You don't mention if you're using SC or TS -- In TS, you can do the
following in the Power Editor -- Set Plot1 to Green/Point and Plot2 to
Red/Point --
_AMA is not referenced in my TS, so I assume it's proprietary to your program.
____________________________________
Value1 = Momentum(_AMA(close,10),3);
If Value1 > Value1[1] then Plot1(Value1,"Up")
Else
Plot2(Value1,"Dn");
_____________________________________
At 02:37 AM 10/10/98 -0500, you wrote:
>this momentum of an AMA seems to frequently coincide with a price trend
>direction change (probably because it's based on price! ;) )
>
>i'm out of my league when i leave QuickEditor. any suggestions how to
>readily cause the indicator to show green when it calculates HIGHER than
>the previous calculation & RED when Lower?
>
>ideally, would be nice to compare to a short (eg., 3-period) MA.
>
>any suggestions would be appreciated
>
>
>Plot1(Momentum(_AMA(close,10),3),"PLOT1")
>
>thanx, preston morrow
>
>
|