MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

Inverse Fisher Transform by John Ehlers

John Ehlers' article in this issue, "The Inverse Fisher Transform," includes
the TradeStation code for two indicators. The MetaStock code for those same indicators is listed below.

Inverse Fisher Transform of RSI

v1:= .1*(RSI(5)-50);
v2:= Mov(v1,9,W);
.5;
-.5;
(Exp(2*v2)-1)/(Exp(2*v2)+1)

Inverse Fisher Transform - Cyber Cycles with Inverse Filter Transform

pr:= (H+L)/2;
a:= 0.07;
sp:= (pr+(2*Ref(pr,-1))+(2*Ref(pr,-2))+Ref(pr,-3))/6;
cycle:=Power(1-(.5*a),2)*(sp-(2*Ref(sp,-1))+Ref(sp,-2))+(2*(1-a)) *
PREV-(Power(1-a,2)*Ref(PREV,-1));
.5;
-.5;
(Exp(2*cycle)-1)/(Exp(2*cycle)+1)

John Ehlers' cyber cycle concept is included in the second formula. Here is the formula for the cyber cycles without the transform:

Inverse Fisher Transform - Cyber Cycles

pr:= (H+L)/2;
a:= 0.07;
sp:= (pr+(2*Ref(pr,-1))+(2*Ref(pr,-2))+Ref(pr,-3))/6;
Power(1-(.5*a),2)*(sp-(2*Ref(sp,-1))+Ref(sp,-2))+(2*(1-a)) *
PREV-(Power(1-a,2)*Ref(PREV,-1))

In his article, Ehlers states the inverse Fisher transform can work with any oscillator, and that values between -5 and 5 are more suited for the transform calculations. Here is another version of the inverse Fisher transform of RSI. This version takes the highest and lowest value of the RSI and normalizes the scale to a range of -5 to 5.

Inverse Fisher Transform - Normalized RSI with IFT

plot:= RSI(5);
ph:=LastValue(Highest(plot));
pl:=LastValue(Lowest(plot));
pf:=10/(ph-pl);
v1:= ((plot-pl)*pf)-5;
v2:= Mov(v1,9,W);
.5;
-.5;
(Exp(2*v2)-1)/(Exp(2*v2)+1)

This second version of the formula can be used with any oscillator by substituting the formula for your oscillator with the formula for the RSI on the first line. For example, to use the formula on the stochastic oscillator, change the first line from this:

plot:= RSI(5);
to this:
plot:= Stoch(5,3);

--William Golson
Equis International

Source / From: TOP