[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Challenge Code



PureBytes Links

Trading Reference Links



During the interesting discussion on E Waves, I was asked to provide 
some code that worked and was simpler than E Wave. Since I hadn't 
posted any code in a long time, I thought I would do that.

A couple of E Wave users dismissed all of my points without ever 
furnishing the one thing I asked for which was hard copy proof of E 
Wave results, rather than simply antidotal stories from other users 
who swear by it. 

There are a lot of "cancer" cures people swear by through antidotal 
stories. Too bad they don't tell you how many of the cancer patients 
using their miracle cure die from it. That's the one statistic that 
counts.

Anyway, during the discussions I was asked for something that worked 
better. As I said, I usually ignore that kind of response to the 
questions I've presented that someone doesn't want to answer. If you 
can't provide the logical evidence someone asks for just throw a 
question back at them! 

I wrote this this morning and tested it against the S&P 500. I'm not 
suggesting this is a complete trading system. It is only a component 
of a system, so you shouldn't launch off after trades using only this.

Here's what might be a simple system component for long trades. 
(Trading is risky. You will probably lose all your money if you use 
this, or any other code as part of a system. You should do your own 
testing on this and decide if it's right for you before attempting to 
use it. I have no idea if this will work for you.)

Before trading with any method, you should figure out the market 
bias. After all, you don't want to trade against the trend. In my 
case, I would like to really know the trend and not be guessing at it 
with complicated cycle tools that are hard to read. To accomplish 
this, I use two sets of charts, one weekly and one daily.

On a weekly chart I look at the 5, 15, and 40 SMA. When the 5 crosses 
above the 15 the trend looks like it's going to establish itself 
upward. When the 15 crosses above the 40, the trend is upward. The 
market has long term upward bias. I trade long.

Since there are pull backs during any long term trend, I use a 4, 9, 
and 18 daily EMA on the same index. SPX in this case. I read it the 
same way looking for pullbacks during the long term upward trend. 

Using this simple system, I would only take trades when both the 
daily and weekly chart show an upward trend. You can take long trades 
at other times of course, but the probability of sucess is lower. 

Here's the code for your systems tester, or whatever else you want to 
use it on.

Long entry

x:=Alert(WillR(10)<-10,3);
z:=Mov((H+L+C)/3,30,S)-Mov((H-L),30,S);
set:=c>z AND x=1 AND C>Ref(H,-1);
reset:=cross(c,z);
Init:= Cum(set+ Reset>-1)=1;
Trade:= BarsSince(Init OR Set)<BarsSince(Init OR Reset);
Trade AND Alert(Trade=0,2);


Long Exit

x:=Alert(WillR(10)<-10,3);
z:=Mov((H+L+C)/3,30,S)-Mov((H-L),30,S);
set:=cross(z,c);
reset:=c>z AND x=1 AND C>Ref(H,-1);
Init:= Cum(set+ Reset>-1)=1;
Trade:= BarsSince(Init OR Set)<BarsSince(Init OR Reset);
Trade AND Alert(Trade=0,2);

The market has been in a long term uptrend for the past two years, so 
you can test this on the S&P over the last 500 bars and get a 
relatively good idea how it works. I would then go back to another 
period when the market was in an uptrend on the weekly chart, and 
test it during those dates and compare the results. You can also test 
it on 2003 and then again on 2004, with is the poor man's walk 
forward test. 

Since I want to improve on the number of bad trades shown by the 
systems tester, I don't shouldn't enter trades long when the market 
is in a daily pull back.

In addition, to looking at the results from the system tester, you 
should run explorations using this code on dates that establish 
different market conditions. You want to see how the trades this code 
found work in the long run. You'll want to look at how many are 
successful, how long the trades last and what trading rules to 
establish as far as entry and exit points, as well as stop losses. 

This is free. It comes with no guranatees, but a warning that you 
must test everything thoroughly before using it--no matter who 
recommends it--and I mean NO MATTER WHO RECOMMNEDS IT.  I don't care 
what guru, or vice president, or genie out of a bottle you got the 
trading advice from. Don't believe a word of it until you test it and 
examine it carefully, and conclude it works for you. 

All of you should be reading Roy's newsletter. www.metastocktips.co.nz

You would be surprised what you can lean in there. 

Have fun! 








------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/