cunparis 71 posts msg #64665 - Ignore cunparis |
7/3/2008 5:22:04 PM
I have filters that work best in bull/bear markets but the problem is how to determine which one? I've used things like 60 day slope but what happens is this misses the beginning and is valid too long at the end. I'd like my filter to just not return any results if we're in the wrong market. Is it possible?
|
rtucker 318 posts msg #64687 - Ignore rtucker modified |
7/3/2008 10:44:27 PM
Maybe something like this? Take away the offset 30 and you get no
returns.
|
cunparis 71 posts msg #64701 - Ignore cunparis |
7/4/2008 2:30:44 AM
I don't really understand your example.
this is what I'm testing right now. It works but lags a bit for entry and exit.
ind(SPY, MACD fast line(12,26)) is below ind(SPY, MACD slow line(12,26))
|
rtucker 318 posts msg #64702 - Ignore rtucker |
7/4/2008 4:59:11 AM
As I understand you, you seem to already have what you are looking for.
Here is another simple example below:
When this code is included in any filter, if the stochs(39) of SPY is above 50 its value is 1 . When LONG = 1 "and" your filter conditions are met, stocks will be returned. Now , the trend is your friend and trade long.
When the stochs(39) of SPY is below 50 (LONG = 0) then dont make the long trades because the general market is falling. Or, trade short.
ma(50) and stochs(39) are two of many ways to do this. Maybe try ADX levels, parabolic sar crosses, ma crossovers etc....
IF you backtest, this can help you develop .... say a long strategy, that doesnt continue to take long trades during a market selloff (stochs(39) of SPY below 50) when the value of your "trend" is 0.
The date offset of 30 is required because of the condition "LONG is above 0" . LONG was above zero 30 days ago, .... today it isnt, so, nothing would be returned by your filter.
This could be tried as a simple "stop and reverse" method. Oh oh........there I said it !
Hope that helps.
|
chetron 2,817 posts msg #64707 - Ignore chetron modified |
7/4/2008 10:13:46 AM
comparision thing.....
|