Tuesday, April 12, 2011

Adaptive Moving Average

Adaptive Moving Average
In MetaStock 6,5 you can easily create Perry Kaufman Adaptive Moving Average system. With MetaStock 6,5 works, choose Indicator Builder from the Tools menu and then click New. Enter the following formulas.
Adaptive Moving Average Binary Wave
Periods: = Input ("periods", 1.1000, 10);
Direction: = Close - Ref (Close, periods);
Volatility: = Sum (abs (Taiwan (close, 1 ,$)), periods);
ER: = abs (Direction / Volatility);
FastSC: = 2 / (2 + 1);
SlowSC: = 2 / (30 + 1);
SSC: = ER * (FastSC - SlowSC) + SlowSC;
Constant: = Pwr (SSC, 2);
BUT: If = (Cum (1) = periods +1, ref (Close, -1) + * constant (close - ref (Close, -1)), Prev + constant * (close - before));
FilterPercent: = Input ("Filter Percentage", 0,100,15) / 100;
Filter: = FilterPercent * Std (AMA - Ref (AMA, -1), periods);
AMALow: = If (AMA <Ref (AMA, -1), but, last);
AMAHigh: = If (AMA> Ref (AMA, -1), but, last);
If (AMA - AMALow> Filter, 1 {Buy Signal}, If (AMAHigh - AMA> Filter, -1 {Sell Signal}, {0} No_Signal))

Adaptive Moving Average
Periods: = Input ("periods", 1.1000, 10);
Direction: = Close - Ref (close, period);
Volatility: = Sum (abs (Taiwan (close, 1 ,$)), periods);
ER: = abs (Direction / Volatility);
FastSC: = 2 / (2 + 1);
SlowSC: = 2 / (30 + 1);
SSC: = ER * (FastSC - SlowSC) + SlowSC;
Constant: = Pwr (SSC, 2);
BUT: If = (Cum (1) = periods +1, ref (Close, -1) + * constant (close - ref (Close, -1)), Prev + constant * (close - before));
AMA
If you want to see the Adaptive Moving Average, only to plot any chart. If you want to see the buy and sell signals Adaptive Moving Average System Adaptive Moving Average Binary plot wave. This binary wave plots of 1 when a buy signal, to -1, when a sell signal and zero when no signal.

No comments:

Post a Comment

Powered by Blogger.