[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: Adaptive Moving Average



PureBytes Links

Trading Reference Links

------------------------------------------------------------------------
You cannot reply to this message via email because you have chosen not
to disclose your email address to the group.

To reply:  http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=5367
------------------------------------------------------------------------

>By the way: Grizz, would you mind telling us where that you did find 
>your code(s)? Thanks a lot!

praktikus and all,
I find nearly all of the codes that I don't create myself at one of 
these sites: 
  http://eis.pl/kr/AFM/index-en.html
     look under K for Kaufman
  www.guppytraders.com/Metastock%20Formulas/formula%20index.htm  
     look under A for adaptive moving average.
Many thanks for the explanation. I think I see the light. I'm going 
to go play with it for a while to see if I can better understand what 
is going on there.  

Grizz

--- In equismetastock@xxxx, "praktikus_ms" <mluescher@xxxx> wrote:
> Grizz
> 
> Her is what Kaufman says in his book:
> 
> Basic Buy and Sell Signals
> --------------------------
> 
> The trading rules for the AMA are:
> 
> - Buy when the AMA turns up.
> 
> - Sell when the AMA turns down.
> 
> ...
> 
> 
> A Filter for False Signals
> --------------------------
> 
> A filter is nneded for any trending system to avoid false signals 
> caused by noise when prices are moving sideways. During a 
> nondirectional period, prices will move back and forth trough the 
> smoothed trendline value. This affects all moving average systems 
in 
> the same way, but it is more obvious with faster trends. The 
> trendline must move higher or lower by the amount of the filter to 
> qualify for a trading signal. ...
> 
> Self-Adjusting filter:
> To be consistent with the adaptive nature of the system, the filter 
> will be also get larger and smaller when prices become more or less 
> volatile. To accomplish this, the filter is defined as a small 
> percentage of the changes in the AMA-Trendline:
> 
>      filter = percentage x @std_dev(AMA - AMA[1],n)
> 
> where percentage is the percentage of 1 standard deviation,
>       @std_dev(series,n) is the standard deviation of "series over 
n 
> periods", and
>       AMA - is the 1 day change in the AMA trendline.
> 
> The smallest filter percentages of 0.01 can be used for faster 
> trading, while the larger percentages of 1.0 select those trades 
that 
> have had a more significant price move. ... Normally the filter is 
> calculated over a period of 20 days.
> 
> ... 
> 
> Because a slow trend change may result in a series of days wich 
fail 
> to penetrate the filter, the net change over 1 to three days is 
> substituted for a sigle day.
> 
> The new rules for trading signals are 
> 
> - Buy when AMA - @lowest(AMA,n) > filter
> 
> - Sell when @highest(AMA,n) - AMA > filter
> 
> 
> Grizz, as you can see Kaufman uses 10 periods for the AMA itself 
and 
> 20 periods for the filter. From this text I made the following 
system:
> 
> ------------------------------------------
> {ama}
> 
> Direction:=CLOSE - Ref(CLOSE,-10);
> Volatility:=Sum(Abs(ROC(CLOSE,1,$)),10);
> ER:=Abs(Direction/Volatility);
> FastSC:=2/(2+1);
> SlowSC:=2/(30+1);
> SSC:=ER*(FastSC-SlowSC)+SlowSC;
> Constant:=Pwr(SSC,2);
> If(Cum(1)=10+1,Ref(CLOSE,-1)+constant*(CLOSE-Ref(CLOSE,-
> 1)),PREV+constant*(CLOSE-PREV));
> 
> 
> {enter long}
> 
> (Fml( "ama") -  LLV( Fml("ama"), 10)) 
> > (opt1* 
> ( Stdev( Fml("ama") - Ref(Fml( "ama"),-1) , 20)))
> 
> 
> {enter short}
> 
> (HHV( Fml("ama"), 10)- Fml( "ama")) 
> > (opt1* 
> ( Stdev( Fml("ama") - Ref(Fml( "ama"),-1) , 20)))
> -------------------------------------------
> 
> The periods in {ama} are set to 10, the periods in the filter are 
set 
> to 20. I guess my system is anything else than  overwhelming but 
for 
> my excuse please consider:
> 
> - I'm Swiss so I have to translate the idea to German
> - my knowledge of Tradestation code (what I guess the "@" comes 
from) 
> is even worse than for MS
> - after all I tried to code what I understood of Kaufmans ideas
> 
> Once coded the system showed profits so my guess was it couldn't be 
> to far from the original thoughts ;-) !
> 
> Hope this helps to bring some light to this topic. :-)
> 
> 
> By the way: Grizz, would you mind telling us where that you did 
find 
> your code(s)? Thanks a lot!
> 
> @ Preston: Thank you very much for sharing your knowledge with me
> (us). I played with your sample of the AMA that you posted some 
days 
> ago. To me it looks great on the chart :-). I then tried it to use 
> with the same system as described above but it didn't show as much 
> profit as mine :-(. That doesn't mean one of them is better or 
not.  
> 
> praktikus 
> 
> --- In equismetastock@xxxx, "grizz003" <grizz002@xxxx> wrote:
> > Praktikus
> > 
> > I don't quite understand the buy-sell trigger that you are using. 
> Are 
> > you using an AMA10 crossover of the AMA20? Or something else? 
> > 
> > Many thanks,
> > Grizz
> > 
> > By the way, 
> > I found an Adaptive Moving Average Binary Wave that looks very 
> > interesting.. Here it is:
> > 
> > {Kaufman's Adaptive Moving Average Binary Wave }
> > Periods := Input("Time Periods",1,1000, 10);
> > Direction := CLOSE - Ref(Close,-periods);
> > Volatility := Sum(Abs(ROC(CLOSE,1,$)),periods);
> > ER := Abs(Direction/Volatility);
> > FastSC := 2/(2 + 1);
> > SlowSC := 2/(30 + 1);
> > SSC := ER * (FastSC - SlowSC) + SlowSC;
> > Constant := Pwr(SSC,2);
> > AMA := If(Cum(1) = periods +1, ref(Close,-1)+ constant * (CLOSE- 
ref
> > (Close,-1)),Prev + constant * (CLOSE - PREV));
> > FilterPercent := Input("Filter Percentage",0,100,15)/100;
> > Filter := FilterPercent * Std(AMA - Ref(AMA,-1),Periods);
> > AMALow := If(AMA < Ref(AMA,-1),AMA,PREV);
> > AMAHigh := If(AMA > Ref(AMA,-1),AMA,PREV);
> > If(AMA - AMALow > Filter, 1 {Buy Signal},If(AMAHigh - AMA > 
> Filter, -
> > 1 {Sell Signal}, 0 {No_Signal}))
> > 
> > 
> > 
> > --- In equismetastock@xxxx, "praktikus_ms" <mluescher@xxxx> wrote:
> > > Hi grizz
> > > 
> > > Yes that's exactly the same formula I'm using. I got mine 
> > originally 
> > > from a book called "New Trading Dimensions" by Florek but I'm 
not 
> > > sure at the moment wether it exists in english language or 
> not.The 
> > > AMA-Formula I posted earlier was with periods set as 10 
according 
> > to 
> > > the original rules in Kaufmans book "Smarter trading". Also the 
> > > periods for filtering the buy and sell signals is set to 20 for 
> the 
> > > same reason. 
> > > 
> > > In my opinion the idea of Kaufman souds quite logical to me and 
> he 
> > > mentions to only adjust the filter. The worst that you can do 
to 
> > such 
> > > a system is overfitting the whole thing (guess what: I know 
what 
> > I'm 
> > > talking about 'cause I lost "some" money with a system that was 
> > close 
> > > to the "grail". Unfortunately just in one timeframe - the one 
it 
> > was 
> > > (over)optimised.
> > > 
> > > Got MS8.0 Pro on a second computer and I got different results 
> than 
> > > with 7.02 EOD on the same data. Seems that I have tho check 
> things 
> > > like order bias ect. 
> > > 
> > > Happy trades
> > > 
> > > praktikus
> > > 
> > >  
> > > 
> > > --- In equismetastock@xxxx, "grizz003" <grizz002@xxxx> wrote:
> > > > TO: Prakticus
> > > > 
> > > > 
> > > > >For my own small piece of fortune I trade a moving average 
> > System 
> > > as 
> > > > >explained by Perry Kaufman in "Smarter Trading" (the 
adaptive 
> > > moving 
> > > > >average) with European bonds 
> > > > 
> > > > Prakticus,
> > > > I was able find the AMA formula at: 
> > > > http://www.guppytraders.com/Metastock%20Formulas/formula%
> > 20index.htm
> > > > 
> > > > Is this what you are using with good success?  How are you 
> using 
> > > it? 
> > > > This formula does look impressive...
> > > > Grizz
> > > > 
> > > > {Adaptive Moving Average by Perry Kauffman}
> > > > {Described in S&C 06/1995 - Metastock ver 6.5 or higher}
> > > > 
> > > > Periods := 10;  Direction := CLOSE - Ref(CLOSE,-periods);
> > > > Volatility := Sum(Abs(ROC(CLOSE,1,$)),periods);
> > > > ER := Abs(Direction/Volatility);
> > > > FastSC := 2/(2 + 1);  SlowSC := 2/(30 + 1);
> > > > SSC := ER * (FastSC - SlowSC) + SlowSC;
> > > > Constant := Pwr(SSC,2);
> > > > AMA := If(Cum(1) = periods +1, Ref(CLOSE,-1) + constant * 
> (CLOSE -
> >  
> > > Ref
> > > > (CLOSE,-1)),
> > > > PREV + constant * (CLOSE - PREV));
> > > > AMA;


To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/