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

Notification

Icon
Error

Options
Go to last post Go to first unread
LittleHenty  
#1 Posted : Wednesday, March 23, 2011 10:12:07 AM(UTC)
LittleHenty

Rank: Newbie

Groups: Registered, Registered Users
Joined: 3/23/2011(UTC)
Posts: 5

Hi, I have made a custom indicator. It simply plots 1 when two other indicators are showing buy signals. It's very simple and works fine. I made it to use in the Explorer. Because I don't really know how to program, I thought it would be the easiest way to use the explorer to find these two buy signals. It all seemed to work fine, until I noticed there were stocks which were displaying the buy signal on my custom indicator but were not being discovered by the explorer. Of course these stocks were also selected and just returned a 'normal filter rejection' result. I tested these stocks (that didn't show up in the explorer), finding the dates the indicator shows on the chart and changing the date in >edit>options to the following date. But it cannot find any signals on these stocks. All of my stocks are in the same folder. And I cannot think of any reason why some stocks should be excluded as I said it is very simple eploration:" If(Ref(Fml( "the indicator"),-1)=1, 1,0)" in ColA and "ColA" under Filter. If any one has any idea what I have done wrong I would really appreciate it. Thanks.
wabbit  
#2 Posted : Wednesday, March 23, 2011 10:16:50 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)
http://forum.equis.com/forums/thread/19563.aspxbr>
Uncheck "Load Minimum Records" and load a suitable amount of data for the exploration.


wabbit [:D]


LittleHenty  
#3 Posted : Wednesday, March 23, 2011 10:57:25 AM(UTC)
LittleHenty

Rank: Newbie

Groups: Registered, Registered Users
Joined: 3/23/2011(UTC)
Posts: 5

Thanks for your reply. I had already tried that. I have tried 20, 100, 2000, 5000. Nothing works. It just does not seem logical to me that some stocks should not show up.
wabbit  
#4 Posted : Wednesday, March 23, 2011 1:09:02 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)
Post your code. wabbit
LittleHenty  
#5 Posted : Wednesday, March 23, 2011 10:15:51 PM(UTC)
LittleHenty

Rank: Newbie

Groups: Registered, Registered Users
Joined: 3/23/2011(UTC)
Posts: 5

{The two indicators were taken from Jose Silva's site} =================== ZigZag Cycle Length =================== ---8 { Price peak/trough cycle length v4.0 } { Warning: last peak/trough is dynamic!} { Plot in own window below price chart } { 6/4/2004 ASX 1152 active stocks exploration, 3.25% ZigZag cycle lengths, mean price cycles: 3.7 trade days for positive price cycles; 4.5 trade days for negative price cycles; 8.2 trade days complete price cycles.} { ©Copyright 2004 Jose Silva } { http://www.metastocktools.com } zzper:=Input("ZigZag reversal %",.001,100,3.25); pds:=Input("avg StdDev periods",2,2520,7); plot:=Input("[1]Cycles, [2]Cycle Avg, [3]Avg StdDev, [4]ZigZag",1,4,1); pk:=PeakBars(1,C,zzper)=0; tr:=TroughBars(1,C,zzper)=0; lastBar:=Cum(1)=LastValue(Cum(1)); lastLeg:=lastBar*LastValue(BarsSince(pk OR tr)); CycleUp:=pk*BarsSince(tr); CycleUpAvg:= Cum(CycleUp)/(Cum(CycleUp>0)+.000001); CycleUpStdDev:=Stdev(CycleUp,pds); CycleUpStdDevAvg:=Cum(CycleUpStdDev) /(Cum(CycleUpStdDev>0)+.000001); CycleDw:=tr*BarsSince(pk); CycleDwAvg:= Cum(CycleDw)/(Cum(CycleDw>0)+.000001); CycleDwStdDev:=Stdev(CycleDw,pds); CycleDwStdDevAvg:=Cum(CycleDwStdDev) /(Cum(CycleDwStdDev>0)+.000001); statCycle:=CycleUp-CycleDw; lastLeg:=If(ValueWhen(1,pk OR tr,statCycle)<0, lastleg,-lastleg)*lastBar; cycle:=statCycle+lastLeg; zz:=Zig(cycle,zzper,%); plotUp:=If(plot=1,0, If(plot=2,CycleUpAvg, If(plot=3,CycleUpStdDevAvg,0))); plotDw:=If(plot=1,cycle, If(plot=2,-CycleDwAvg, If(plot=3,-CycleDwStdDevAvg,zz))); plotUp;plotDw ---8 {And I called this Zig2} pr:=Input("ZigZag reversal %",.01,100,5); x:=Input("use: [1]Open, [2]High, [3]Low, [4]Close,[5]WghtCl",1,5,4);plot:=Input("plot:1]Signals,[2]ZigZag",1,2,1);x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=4,C,WC()))));zz:=Zig(x,pr,%);sell:=PeakBars(1,x,pr)=0;buy:=TroughBars(1,x,pr)=0;If(plot=1,buy-sell,zz) {The indicator I made,called ZigZig} If(FmlVar("Zig2","BUY") AND FmlVar("ZigZag Cycle Length","PLOTDW") <= -5,1,0) {As I am only interested in searching buy signals} {And the explorer-ColA-:} If(Ref(Fml( "ZigZig"),-1)=1, 1,0) {Filter}ColA { As an example the security CCL from the ASX does not show up on the explorer the last signal for this stock was Jan 4 so I change the date to Jan 5 and it gives normal filter rejection, same for all signals on this stock}
wabbit  
#6 Posted : Thursday, March 24, 2011 1:12:15 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)
Zig(), Peak(), Trough() are hindsight indicators. They change their values of previous bars based on information received later. Read the MS User manual and the many posts on the Forum warning not to use these sorts of indicators for trading signals. wabbit [:D]
LittleHenty  
#7 Posted : Thursday, March 24, 2011 2:29:04 AM(UTC)
LittleHenty

Rank: Newbie

Groups: Registered, Registered Users
Joined: 3/23/2011(UTC)
Posts: 5

Thanks, I understand. I know Zig Zag the MS indicator changes. I'm not too worried about the indicators, but rather why MS Explorer is only showing select stocks. Until I find out why it is happening I will have to manually screen each of the 200 stocks I am testing to find the ones it missed. Thanks for the warning though.
LittleHenty  
#8 Posted : Thursday, March 24, 2011 11:52:21 AM(UTC)
LittleHenty

Rank: Newbie

Groups: Registered, Registered Users
Joined: 3/23/2011(UTC)
Posts: 5

Sorry I didn't understand how the explorer works exactly. I think your right because it is a hindsight indicator some stocks don't show up if I search a past date because on that date the indicator signal was not actually formed. I really don't get how the indicators work, because from my observations I thought once the triangle shape formed (the complete signal) that it would not change but I could be wrong. Do you have any idea if the signals can be deleted based on future data? Or is the issue with these indicators just that they place signals after the fact?
wabbit  
#9 Posted : Thursday, March 24, 2011 2:20:46 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)
LittleHenty wrote:
Or is the issue with these indicators just that they place signals after the fact?

That is the issue. If we could find a broker which allowed us to trade in hindsight, we'd all be very, very rich, but unfortunately reality gets in the way and we can only trade in real time or slower.


wabbit [:D]

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.