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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
veritech1  
#1 Posted : Tuesday, July 24, 2007 3:28:23 PM(UTC)
veritech1

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/9/2006(UTC)
Posts: 14

Hi,

Has anyone been able to come up with an exploration for the "Holy Grail" system explained in her book Street Smarts? Or are there legal issues about posting it here in the forums?

wabbit  
#2 Posted : Tuesday, July 24, 2007 11:04:28 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)
It seems fairly well defined here: http://www.lbrgroup.com/images///raschke_pt2_0304.pdfith the MS Users Manual and the free Equis Formula Primer and see what you can come up with.



wabbit [:D]

veritech1  
#3 Posted : Wednesday, August 1, 2007 9:03:55 PM(UTC)
veritech1

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/9/2006(UTC)
Posts: 14

Hi Wabbit,

Thanks for the link. I saved it to my pc. Anyway, I tried to develop the code and since I am not very good at programming, I was of course going to have problems. So far this is what I have come up with. When I run the exploration, I scan over a thousand tickers and it only rejects 5. I know thats not correct at all. If you ( or anyone) can help me with my code, or will be so kind to share one that has already been successfully coded, that would be great. Here is my code:

ColA

Mov(L,20,E) OR Mov(H,20,E) OR Mov(C,20,E) AND ADX(14) > 30

Filter

ColA

veritech1  
#4 Posted : Friday, August 10, 2007 11:57:29 PM(UTC)
veritech1

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/9/2006(UTC)
Posts: 14

Has anyone come up with anything other than what I did?
amory  
#5 Posted : Monday, August 13, 2007 5:52:48 AM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

the code makes no sense. fair enough you want an ADX>30, but what is Mov(L,20,E) OR Mov(H,20,E) OR Mov(C,20,E) supposed to be looking for?

veritech1  
#6 Posted : Tuesday, August 14, 2007 10:46:10 PM(UTC)
veritech1

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/9/2006(UTC)
Posts: 14

According to the strategy, we are supposed to be looking for stocks that touch the 20 EMA. So the "OR" command is allowing each value whether one or all to pick out any part of the price bar that touched the 20 EMA. Or at least I think it is...
amory  
#7 Posted : Wednesday, August 15, 2007 4:25:20 AM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

I see what you mean, but I don't think your code does. hopefully, someone wiser will come to the rescue.
Justin  
#8 Posted : Wednesday, August 15, 2007 10:27:36 AM(UTC)
Justin

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 9/13/2004(UTC)
Posts: 673
Location: Salt Lake City, UT

It seems she uses multiple time frames and actually uses the ADX and a custom MACD to "setup" the Moving Average retracement. She does not clearly define how soon after the "setup" the retracement needs to occur. The way you are referring to the moving averages is not comparing them to anything, you are just calling the moving average value itself. You need to compare the moving average to something, i.e.

Cross(C,Mov(C,20,E));

This would look for the moving average to be crossing down below the close. To look for the "setup" condition to be happening X number of bars ago, you could use something like this:

X:=10;{Lookback Periods}
Cross(C,Mov(C,20,E)) AND Alert(Cross(ADX(14),30),X)

There is also no clear definition of how far back to look for her custom MACD to be looking back for a new momentum high. Again an arbitrary number could be assigned, but this may work better as a visual system rather than a scan. If you wanted to assign another lookback value for the custom MACD you could do something like this:

X:=10;{Setup Lookback Periods}
Y:=20;{Oscillator New Momentum High Lookback}
Cross(C,Mov(C,20,E)) AND Alert(Cross(ADX(14),30),X) AND Alert(Mov(Mov(C,3,S)-Mov(C,10,S),16,S) > Ref(HHV(Mov(Mov(C,3,S)-Mov(C,10,S),16,S),Y),-1),X)

Keep in mind this is quite subjective. I'm not too strong in formula writing plus the setup time frames are not clearly defined. I am sure a more experienced formula writer could do better.

johnl  
#9 Posted : Wednesday, August 29, 2007 8:19:34 AM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

{my Holy Grail shot}
{=====================================}
{ Create my functions }
{---- (3-10 osscillator) -----}
p1 := Mov(C,3,S)-Mov(C,10,S);
{---- adx ------}
p2 := ADX(14);
{---- moving average ----}
p3 := Mov(C,20,E);
{======================================}
{ Do my calcs }
{---- periods since (3-10 ocs) was true ---}
a1:= HHVBars(p1,20);
{---- periods since adv crossed 30 ----}
a2:= BarsSince(Cross(p2,30)=1);
{---- periods since 20 prd MA crossed low ---}
a3:= BarsSince(Cross(p3,L)=1);
{---- buy signal - close cross 20 day MA ---}
a4:= Cross(C,p3);
{=======================================}
{Do all my conditions for signal to be true}
{--all as to happen within last 20 periods time frame---}
b1:= If((a1<20),1,0);
{---adx signal has to come after (3-10 MA) signal--}
b2:= If((a2>a1),1,0);
{--- trade has to have crossed below 20MA after my adx signal---}
b3:= If((a3<a2),1,0);
{=======================================}
{--- add up all my conditions---}
c1:= a4*b1*b2*b3;
{--- plot the sucker---}
c1
{-- done : end of function---}

Although Wabbit and Jose are far better programmers I do all my functions in the same
boring format as above so I can read it and more importantly manipulate the variables easier.
Looks ok going up trend but to reduce signals I need another function to stop signals from kicking
in when trending down.




veritech1  
#10 Posted : Wednesday, August 29, 2007 10:33:22 PM(UTC)
veritech1

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/9/2006(UTC)
Posts: 14

Cool, Thanks for the help. I noticed however that when I plugged the function into the charts. I was only getting shorting signals. I'm surprised that I have not heard from Jose or Wabbit. They are usually very good at correcting code for people....
johnl  
#11 Posted : Thursday, August 30, 2007 1:14:11 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Would think they should get paid for helping on something like this.
Think it works though, all it does is flash a signal when the Close crosses 20 day MA
with the rest of the conditions - it's a "get me on this train" signal with the logic being that in
a up trend you jump in front of the momentum.
In a down trend or sideway trend, however, you will get pretty beat up. So addition logic is
required to only allow up trends. Maybe only when 50MA>200MA, etc.


amory  
#12 Posted : Thursday, August 30, 2007 5:17:41 PM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

Veritech: << only getting shorting signals >>

are you sure you don't mean buying signals?

anyway, there is a CCI-based formula (I am sure it has been discussed on this forum) with pretty similar results & gives signals for both long & short.

johnl  
#13 Posted : Friday, August 31, 2007 11:48:57 AM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Here's another way to approach the signals:
I noticed that failed signals often happen in a consolidation area so I created
a breakout level from the closes of each signals in the "d" series of code below.
Gets rid of some bad trades and increases my profit/loss ratio so I'll play with it
some more.

{holy grail breakout signal}

p1 := Mov(C,3,S)-Mov(C,10,S);
p2 := ADX(14);
p3 := Mov(C,20,E);

a1:= HHVBars(p1,20);
a2:= BarsSince(Cross(p2,30)=1);
a3:= BarsSince(Cross(p3,L)=1);
a4:= Cross(C,p3);

c1:= a4*If((a1<20),1,0)*If((a2>a1),1,0)*
If((a3<a2),1,0);

d1:=ValueWhen(1,c1=1,C);
d2:=ValueWhen(2,c1=1,C);
d3:=ValueWhen(3,c1=1,C);
d4:=ValueWhen(4,c1=1,C);
d5:=(1.05*((d1+d2+d3+d4)/4));
d6:=Cross(C,d5);
d6
veritech1  
#14 Posted : Friday, August 31, 2007 11:18:59 PM(UTC)
veritech1

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/9/2006(UTC)
Posts: 14

Thanks john for your help. One way to probably get rid of the false signals: Linda explained in her book that the 14 day ADX must be at least 30 and rising. This was very important since the value of 30 and above is said that the stock is trending whether it was bullish or bearish. Now, when the ADX was at 30 and above and the price of the stock pulled back and touched the 20 EMA, this was a buy/short signal. The 20 EMA was a form of resistance/suppport and the price would retest the last high or low depending on the direction of the trend. This might get rid of the stocks that are in consolidation. I've read and have heard from many that this strategy is very common and profitable. Just have not been able to code it correctly since my coding skills are the equivalent of elephant dung. [:$]
johnl  
#15 Posted : Saturday, September 1, 2007 9:20:28 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Here is the latest code per your advice:
Varable c4 is the adx(14) condition. I got junk with [adx(14)>30] - way too late so I
changed to [adx(14)<20] and got better results. Switch the two and you can see for yourself.
Varable a4 is the buy/sell signal: a4:=Cross(C,p3) says close was below and just now is above
20 day EMA. Switch to a4:=Cross(p3,C) to say close just dropped below 20day EMA.
Make more comments with a specific stock and signal might help me narrow things down.
c2 and c3 are not used since they dropped tooooo much stuff out:
c2 says 50 daySMS has to be > 200 day SMA and
c3 says adx(14) has to be increasing - I think the Level of adv is important but not so with it's
direction. You can add by changing [d1:=c1*c4] to [d1:=c1*c2*c3*c4] and see what happens.

p1 := Mov(C,3,S)-Mov(C,10,S);
p2 := ADX(14);
p3 := Mov(C,20,E);
p4 := Mov(C,50,S)-Mov(C,200,S);

a1:= HHVBars(p1,20);
a2:= BarsSince(Cross(p2,30)=1);
a3:= BarsSince(Cross(p3,L)=1);
a4:= Cross(C,p3);

c1:= a4*If((a1<30),1,0)*If((a2>a1),1,0)*
If((a3<a2),1,0);
c2:= If((p2-Ref(p2,-1)>0),1,0);
c3:= If((p4>0),1,0);
c4:= If((p2<20),1,0);

d1:=c1*c4;
d1
amory  
#16 Posted : Sunday, September 2, 2007 5:32:45 AM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

John, while I agree that your latest formula is very good, but cannot understand

c4:= If((p2<20),1,0);

what puzzles me is this: P2 is supposed to be the ADX(14) right? now if Linda specifically wants to see the ADX >30, then how did you arrive at that line?

thanks

johnl  
#17 Posted : Sunday, September 2, 2007 6:11:29 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Yes: variable P2 is the ADX(14), but I get really bad results with:
c4:=If((p2>30),1,0) or ADX > 30 so I played around with the formula
and got c4:= If((p2<20),1,0) giving not bad results so I used it.
I also noticed there were very few good signal when ADX(14) was > 30 and rising, they
all seemed to be "late" in the trend so I used p2<20 which would mean the "higher highs" and "lower lows" are battling it out and the trend direction not established. The other factors should weight the outcome and point my trade in the correct direction.
At least that was my thought process.
Still my win/loss ratio is still too low to call it a "holy Grail".
The current logic does go against the article which tells me I want to snoop around some more.
Did she give any more info out?


amory  
#18 Posted : Monday, September 3, 2007 4:56:19 AM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

there is nothing wrong with the formula, inasmuch as all the stocks which come up have that characteristic in common - a dip shortly before recovery to the 20MA - which I believe you were looking for. if you were to add a line in the sense of "VOLUME>Mov(VOLUME,50,S)" or whatever, you'd be narrowing the field a bit more (I can only write old-fashioned formula).

anyway, seeing that all explorations are based on EOD, one won't be buying till the day following, when price & depth of trading help towards a final decision. looks good to me!

johnl  
#19 Posted : Monday, September 3, 2007 5:43:30 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Yep: Adding a volume function drops the signal even further: adding functions p5,c5 and changing d1.
Looks like I have gone off from a tangent from Linda's system though.


p1 := Mov(C,3,S)-Mov(C,10,S);
p2 := ADX(14);
p3 := Mov(C,20,E);
p5 := Mov(V,10,S)-Mov(V,50,S);

a1:= HHVBars(p1,20);
a2:= BarsSince(Cross(p2,30)=1);
a3:= BarsSince(Cross(p3,L)=1);
a4:= Cross(C,p3);

c1:= a4*If((a1<30),1,0)*If((a2>a1),1,0)*
If((a3<a2),1,0);
c4:= If((p2<20),1,0);
c5:= If((p5>0),1,0);

d1:=c1*c4*c5;
d1
amory  
#20 Posted : Monday, September 3, 2007 7:41:07 PM(UTC)
amory

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/18/2007(UTC)
Posts: 99
Location: sydney australia

sorry John, but the previous formula was heaps better! P4 has to stay.

in any case, the question of volume has not been resolved. a lot of stocks come up where preceding volume is patchy or negligible. that whole thing about volume was only a suggestion, it may not much have much merit at all.

like you say, the important thing is to try & stick to Linda's plan.

best regards

Users browsing this topic
Guest (Hidden)
2 Pages12>
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.