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

Notification

Icon
Error

Options
Go to last post Go to first unread
RUAGOODP  
#1 Posted : Sunday, April 2, 2006 1:12:51 AM(UTC)
RUAGOODP

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 1/13/2005(UTC)
Posts: 87
Location: perth australia

Hi all, I found the indicator below which plots on a chart however the explorer does not seem to pick up the valid signals. Why is this? {ZigZag validity engine by Spyros Raftopoulos} {additional code by Jose Silva} {1=ZigZag valid, 0=ZigZag invalid} perc:=Input("ZigZag percent",.1,100,5); plot:=Input("plot: signals=1, % of valid signals=2, ZigZag=3",1,3, 1); x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 P=6",1,6,4); x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C))))); z:=Zig(x,perc,%); z1:=Ref(z,-1); z2:=Ref(z,-2); last:=ValueWhen(1,z>z1 AND z1<z2 OR z<z1 AND z1>z2,z1); pc:=Abs((x-last)*100/last); SD:=z>z1 AND z1>z2 OR z<z1 AND z1<z2; res:=pc>=perc; valid:=If(Alert(res,2) AND SD,1,res); validper:=Cum(valid)/Cum(valid>-1)*100; If(plot=3,z,If(plot=2,validper,valid)) Cheers Norman
Jose  
#2 Posted : Sunday, April 2, 2006 4:42:39 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
The "P" variable in the formula can be a problem if no plot is highlighted before the exploration is run. Try this "P"-less version of the same indicator: [code:1:afbc4569ab] {ZigZag validity engine by Spyros Raftopoulos} {additional code by Jose Silva} {1=ZigZag valid, 0=ZigZag invalid} perc:=Input("ZigZag percent",.1,100,5); plot:=Input("plot: signals=1, % of valid signals=2, ZigZag=3",1,3, 1); x:=Input("use Open=1 High=2 Low=3 Close=4 Vol=5 WCl=6",1,6,4); x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,WC(),C))))); z:=Zig(x,perc,%); z1:=Ref(z,-1); z2:=Ref(z,-2); last:=ValueWhen(1,z>z1 AND z1<z2 OR z<z1 AND z1>z2,z1); pc:=Abs((x-last)*100/last); SD:=z>z1 AND z1>z2 OR z<z1 AND z1<z2; res:=pc>=perc; valid:=If(Alert(res,2) AND SD,1,res); validper:=Cum(valid)/Cum(valid>-1)*100; If(plot=3,z,If(plot=2,validper,valid)) [/code:1:afbc4569ab] jose '-)
RUAGOODP  
#3 Posted : Sunday, April 2, 2006 5:21:25 AM(UTC)
RUAGOODP

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 1/13/2005(UTC)
Posts: 87
Location: perth australia

Hi Jose, Thanks for that. Could you use this indicator for trading or are the past signals not reliable(ie relies on future data.) Cheers Norman
Jose  
#4 Posted : Sunday, April 2, 2006 6:35:17 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Norman, I wouldn't trust any process that uses hindsight for trading purposes. And even if you have a validly confirmed hindsight signal, by the time confirmation comes along, the opportunity for profits have come and gone. jose '-)
Users browsing this topic
Guest (Hidden)
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.