logo
Welcome Guest! To enable all features please Login or Registers.

Notification

Icon
Error

Options
Go to last post Go to first unread
gorachand  
#1 Posted : Saturday, November 17, 2012 11:36:58 AM(UTC)
gorachand

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 2/19/2012(UTC)
Posts: 106

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
The MSFL for cyber cycles with and without inverse Fisher transform is posted on https://www.metastock.co.../TASC/Article.aspx?Id=60 The Cyber Cycle plot does not show any trigger line as described by Ehlers. The one with the transform shows debugging errors and/if plotted gives error messages. Can anybody help?
wabbit  
#2 Posted : Sunday, November 18, 2012 5:03:38 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Try : http://www.traders.com/Documentation/FEEDbk_docs/2004/05/TradersTips/TradersTips.html>or

Code:

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));

ft:=(Exp(2*cycle)-1)/(Exp(2*cycle)+1);

{plot}
.5;

-.5;

ft;

but this code doesn't include any error trapping, so watchout for DBZ and overflow errors!



wabbit [:D]

jjstein  
#3 Posted : Sunday, November 18, 2012 5:26:07 PM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Wabbit -- Tried on SPX, get an OVERFLOW error right off the bat...
wabbit  
#4 Posted : Sunday, November 18, 2012 5:34:32 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
JJ,

The largest value input for Exp() is 88.722835540, so normalise the cycle parameter to half this value (it gets doubled again in the IFT)


wabbit [:D]

wabbit  
#5 Posted : Sunday, November 18, 2012 5:54:53 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Code:

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));

limit:=88.722835540 / 2;

{normalise [-1,1], no allowance for sgn(range)? }
cycle:=(2*(cycle-lowest(cycle))/max(highest(cycle)-lowest(cycle),power(10,-8)))-1;

{normalise [-limit,limit]}
cycle:=limit*cycle;

ft:=(Exp(2*cycle)-1)/(Exp(2*cycle)+1);

{plot}
.5;
-.5;
ft;



wabbit [:D]

jjstein  
#6 Posted : Sunday, November 18, 2012 9:27:38 PM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
wabbit wrote:
The largest value input for Exp() is 88.722835540
How blue bloody blazes did you find out that limit, might I ask?
wabbit  
#7 Posted : Sunday, November 18, 2012 9:31:03 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
http://forum.equis.com/forums/thread/37784.aspxbr>By knowing the largest computational value possible for the declared data type, it's easy to work back... but you still have to deal with floating point precision errors!


wabbit [:D]

wabbit  
#8 Posted : Sunday, November 18, 2012 9:35:49 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
I guess I should add that, as the normalisation compression is non-linear, you cannot simply use the +/- 0.5 levels without due consideration.


wabbit [:D]


jjstein  
#9 Posted : Sunday, November 18, 2012 10:18:13 PM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Curve doesn't quite seem the same:
Code:

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);
UserPostedImage
Code:

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));

limit:=88.722835540 / 2;

{normalise [-1,1], no allowance for sgn(range)? }
cycle:=(2*(cycle-lowest(cycle))/max(highest(cycle)-lowest(cycle),power(10,-8)))-1;

{normalise [-limit,limit]}
cycle:=limit*cycle;

ft:=(Exp(2*cycle)-1)/(Exp(2*cycle)+1);

{plot}
.5;
-.5;
ft;
UserPostedImage
wabbit  
#10 Posted : Monday, November 19, 2012 12:56:21 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
As I said, the compression is non-linear so any levels (0, 0.5 etc) are just arbitrary, so to reinstate those levels to have the plot "make sense" you have to know where the levels get mapped to and then make that correction.

Of course, this entire problem goes away by utilising customised ExtFml() outside of the limitations of MS.


wabbit[:D]

wabbit  
#11 Posted : Monday, November 19, 2012 1:33:26 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Just for fun, here's a compression system in lieu of normalising the cycle:

Code:

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));

limit:=88.722835540 / 2; 

{compression: cycle -> [-1,1] -> [-limit,limit], 0 -> 0}
cycle:=limit*cycle/Max(Highest(Abs(cycle)),Power(10,-8));

ift:=(Exp(2*cycle)-1)/(Exp(2*cycle)+1);

{plot}
ift;


wabbit [:D]

jjstein  
#12 Posted : Monday, November 19, 2012 8:53:45 AM(UTC)
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
wabbit wrote:
Of course, this entire problem goes away by utilising customised ExtFml() outside of the limitations of MS.
I presume you mean a DLL using higher precision internals?
wabbit  
#13 Posted : Monday, November 19, 2012 3:33:49 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Yes, and internal error handling for arguments out of bounds. wabbit [:D]
Users browsing this topic
Guest (Hidden)
Similar Topics
Inverse Fisher Transform Redux (Formula Assistance)
by flavio_meta 11/4/2023 12:14:18 PM(UTC)
February 2022: Inverse Fisher Transform Redux (2022)
by MS Support 6/15/2022 5:23:37 PM(UTC)
The Inverse Fisher Transform (Formula Assistance)
by CalgaryCoolCat 7/2/2019 2:31:33 AM(UTC)
May 2004: The Inverse Fisher Transform <pic> (2004)
by KTP2 5/11/2010 1:43:27 PM(UTC)
fisher transform formula (MetaStock)
by manatrader 4/17/2009 12:48:52 AM(UTC)
fisher transform strategy (MetaStock)
by manatrader 3/31/2009 5:16:45 PM(UTC)
Nov 2002: Fisher Transform (2002)
by KTP2 11/12/2008 5:05:43 PM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.