calhawk01 135 posts msg #101575 - Ignore calhawk01 |
7/11/2011 10:54:53 PM
Hi, i'm trying to combine 2 filters:
filter 1)
Close above 5
Average volume(50) > 500000
close > ma(200)
close < ma(10)
rsi(2) one day ago below 2
rsi(2) below 1
OR
filter 2)
Close above 5
Average volume(50) > 500000
close > ma(350)
close < ma(30)
rsi(2) one day ago below 2
rsi(2) below 1
I'm trying to combine both filters so that i can backtest them together... But i cant even get the first set of data correct: Here is what i have so far..
close above 5
average volume(50) > 500000
SET{LONG1, COUNT(CLOSE > MA(200),1)}
SET{LONG2, COUNT(CLOSE < MA(5),1)}
set{long3, count(close > ma(350),1)}
Set{long4, count(close < ma(30),1)}
Set{1, long1 * long2}
Set{2, long3 * 4}
Set{3, long1 * 2}
3 above .5
draw ma(200)
draw ma(10)
draw ma(300)
draw ma(30)
|
Kevin_in_GA 4,599 posts msg #101583 - Ignore Kevin_in_GA |
7/12/2011 8:26:13 AM
http://forums.stockfetcher.com/sfforums/?q=view&fid=1002&tid=93830&qrid=
|
calhawk01 135 posts msg #101594 - Ignore calhawk01 |
7/12/2011 2:52:09 PM
lol I was actually on that yesterday. And that's how i came up with the top version. But cannot seem to put it together!
|
Kevin_in_GA 4,599 posts msg #101598 - Ignore Kevin_in_GA |
7/12/2011 3:47:03 PM
close above 5
average volume(50) > 500000
SET{LONG1, COUNT(CLOSE > MA(200),1)}
SET{LONG2, COUNT(CLOSE < MA(5),1)}
set{long3, count(close > ma(350),1)}
Set{long4, count(close < ma(30),1)}
Set{1, long1 * long2}
Set{2, long3 * 4}
Set{3, long1 * 2}
3 above .5
Do not use numbers as user-defined variable names.
Also, the lines in bold are incorrect.
Try this
|
calhawk01 135 posts msg #101601 - Ignore calhawk01 |
7/12/2011 6:52:16 PM
Thank you Kevin! You the best!
|
calhawk01 135 posts msg #101603 - Ignore calhawk01 |
7/12/2011 8:12:24 PM
So...
close above 5
average volume(50) > 500000
rsi(2) one day ago below 2
rsi(2) below 1
SET{LONG1, COUNT(CLOSE > MA(200),1)}
SET{LONG2, COUNT(CLOSE < MA(5),1)}
set{long3, count(close > ma(350),1)}
Set{long4, count(close < ma(30),1)}
Set{var1, long1 * long2}
Set{var2, long3 * long4}
Set{var3, var1 + var2}
var3 above .5
|
optionsavenger 7 posts msg #101606 - Ignore optionsavenger |
7/13/2011 12:18:30 AM
Kevin would you happen to have a filter that I could use that would tell me when to go long or short the spy on an intra day bases. Thanks for all you do for us, I enjoy glimming your knowledge, keep it up you have a fan.
|
duke56468 683 posts msg #101608 - Ignore duke56468 |
7/13/2011 10:31:03 AM
Here is one of Kevins Market indicator filters
|
calhawk01 135 posts msg #101635 - Ignore calhawk01 |
7/14/2011 3:47:20 PM
Kevin, what am I doing wrong here?
The results should be combined results of:
price > 5
average volume(65) > 500000
rsi(2) one day ago below 2
rsi(2) below 1
close above ma(200)
close below ma(10)
close above ma(350)
close below ma(30)
Thanks
|
Kevin_in_GA 4,599 posts msg #101638 - Ignore Kevin_in_GA |
7/14/2011 6:39:34 PM
Kevin, what am I doing wrong here?
You are adding instead of multiplying - use the * to require BOTH criteria to be true. Look at what I did here
|