fischer indicator

tsxela

Newbie
Messages
4
Likes
0
j'm writing in omega the follow indicator (by metastock), when compile the code appare excellent, but ts plot on the chart "floating point numerical overload".

someone can help me? thank you



METASTOCK:

{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)}

TRADESTATION

[input: price((h+l)/2),aa(0.07);
var: sp(0),cycle(0);

sp= (price+(2*price[1]+(2*price[2])+price[3])/6);

cycle=power(1-(0.5*aa),2)*(sp-(2*sp[1]+sp[2]+(2*(1-aa))*cycle[1]-power(1-aa,2)*cycle[2]));

value1=(expvalue(2*cycle)-1)/(expvalue(2*cycle)+1);

plot1(value1);
plot2(0.5);
plot3(-0.5);]

--------------------------------------------------------------------

METASTOCK

{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))}

TRADESTATION

[input: price((h+l)/2),aa(0.07);
var:sp(0),cycle(0);

sp= (price+(2*price[1]+(2*price[2])+price[3])/6);

cycle=power(1-(0.5*aa),2)*(sp-(2*sp[1]+sp[2]+(2*(1-aa))*cycle[1]-power(1-aa,2)*cycle[2]));

plot1(cycle);]

------------------------------------------------------------------

METASTOCK

{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)}

TRADESTATION

[input: osc(rsi(c,4));
var: ph(0),pl(0),pf(0),v1(0),v2(0);

ph=highest(osc,10);
pl=lowest(osc,10);
pf=10/(ph-pl+.000001);
v1=((osc-pl)*pf)-5;
v2=waverage(v1,9);


value1=(expvalue(2*v2)-1)/(expvalue(2*v2)+1);

plot1(value1);]
 
I am not able to say exactly what you need to do but it is good practice if you are getting floating point errors to not use (H+L)/2 and instead use (H+L)*0.5 and this is because you avoid divide by 0 errors (so I am told)


Paul
 
Top