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

"The Yen Recursed"........



PureBytes Links

Trading Reference Links

 Is the name of an article in the December issue of TASC, written by 
Dennis Meyers. In it he describes what he calls " The Recursive 
Moving Trend Average" . I wont go into all the article right now, but 
here is my translation of his math (for Metastock 6.5) :
 
 {Recursive Moving Trend Average}
Lb:=Input("Look-Back Period?",3,100,21);
Alpha:=2/(LB+1);
Bot:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+C;
RMTA:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+
     (Alpha*Abs(C+Bot-Ref(Bot,-1)));
RMTA;

He then explains how to make an oscillator by subtracting an 
Exponential MA form the Recursive MA...... again here is the code:

 {TOSC}
Lb:=Input("Look-Back Period?",3,100,21);
Alpha:=2/(LB+1);
Bot:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+C;
RMTA:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+
     (Alpha*Abs(C+Bot-Ref(Bot,-1)));
TOSC:=RMTA-Mov(C,lb,E);
TOSC;


Here is the code for System Testing;

Buy Long:

Lb:=opt1;
ent:=3;
Alpha:=2/(LB+1);
Bot:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+C;
RMTA:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+
    (Alpha*Abs(C+Bot-Ref(Bot,-1)));
TOSC:=RMTA-Mov(C,lb,E); 
Cross(tosc,(0-Abs(ent)))

Sell short:

Lb:=opt1;
ent:=3;
Alpha:=2/(LB+1);
Bot:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+C;
RMTA:=(1-Alpha)*(If(Cum(1)<Lb,C,PREV))+
    (Alpha*Abs(C+Bot-Ref(Bot,-1)));
TOSC:=RMTA-Mov(C,lb,E); 
Cross((0+Abs(ent)),tosc1)

Opt1 is the look- back periods, of 3 to 30, and
Opt2 is the entry value of the oscillator, 0 to 5.

Now, after all the hours spent on figuring out the 
code, I have discovered that the RMTA plots very
similar to the DEMA,  oh well............



 Best wishes,
               Adam Hefner.
 e-mail:  VonHef@xxxxxxxxxx

_____________________