four 5,087 posts msg #93575 - Ignore four modified |
6/6/2010 6:24:13 PM
brank20 ,
I wonder if you might be able to clean-up the code?
Always looking to get better.
|
brank20 41 posts msg #93576 - Ignore brank20 |
6/6/2010 6:37:03 PM
Because the code is kinda scattered, I really dont know what your trying to do.
Your buy trigger doesnt look like a standard buy trigger, it just looks like its a day range value above the max(open, close). Dont see how it would ever trigger a buy?....
|
four 5,087 posts msg #93577 - Ignore four modified |
6/6/2010 6:39:08 PM
"Your buy trigger doesnt look like a standard buy trigger, it just looks like its a day range value above the max(open, close). Dont see how it would ever trigger a buy?...."
- This is the value for a limit order placed after the market close today , for tomorrow.
------------------
"I see to many conditionals bieng saved as variables."
- Anything specific that can be changed?
|
brank20 41 posts msg #93579 - Ignore brank20 modified |
6/6/2010 7:51:25 PM
when I clean it up, it returns no results. Thats because the rsi(2) 1 week low never(or very, very rarely) crosses above the rsi(2) 2 week low.
|
brank20 41 posts msg #93580 - Ignore brank20 |
6/6/2010 8:06:08 PM
figured out why it wasnt working.
rsi(2) 1 week low will never cross above rsi(2) 2 week low because it never falls below it. You have to take the difference and find the point when it diverges.
rsi(2) 1 week low - rsi(2) 2 week low
difference crossed above .001
Here is the corrected filter.
|
four 5,087 posts msg #93583 - Ignore four |
6/6/2010 9:00:21 PM
brank20,
Thank you
|
wkloss 231 posts msg #93600 - Ignore wkloss |
6/7/2010 12:28:49 PM
Four,
You asked me my thoughts in an earlier post but I defer to brank20's judgement as I believe brank20 is more knowledegable than I am. Something I would suggest regarding stops is to look into Chuck LeBeau's work, especially Precise Exits and Entries.
I modified your PP MA5 formula to display shorts and wondered if I got it right:
close < cma(pp 1 day ago,5)
close < open
low< cma(pp 1 day ago,5)
high 1 day ago > cma(pp 1 day ago,5)
close between 1 and 20
avgvol(30) > 800000
Bill
|
four 5,087 posts msg #93613 - Ignore four modified |
6/7/2010 6:53:08 PM
Bill,
Yes, > can become < and < can become >. Then back-test and see what happens. Remember, shorting requires covering the loan and interest. Shares aren't always available to borrow. A long has unlimited upside potential (100% +), but a short can only go to zero.
It is how you trade and manage your money that also determines Profit/Loss. When do you get in? When do you take profit? When do you fold? What's your bet -- average down, average up, hold 'em? What is your risk?
Remember, perfect fills with paper trading don't always happen in the "real world".
Hope this helps.
Questions lead to answers. Keep asking.
|
wkloss 231 posts msg #93614 - Ignore wkloss |
6/7/2010 7:21:12 PM
Four,
I tried changing the formula from long to short and it appears to work fine.
When I say short, I really mean using put options and here I would use 1 strike in the money to make sure I have enough deltas for the put to move like price does. I would probably go out 2 months or so to give the trade time to work. I would use calls for the buy signals.
I took a class where they used this indicator, seasonality (from the Commodity Traders Almanac) and the COT report. Combined, they appeared to work great. Supposedly your indicator when combined with monthly pivot support and resistance gives a 70% accuracy.
Bill
|
wkloss 231 posts msg #93650 - Ignore wkloss |
6/8/2010 5:44:39 PM
Four,
After looking at filter results for a few days, I notice that this filter returns pp/ma crosses from several days ago. From a strategy viewpoint, I'm not sure whether I want to enter the morning after the signal or wait a day for a confirming close in the direction of the signal.
I have been getting several hundred stocks a day on the modified version I did for shorting stocks and I suspect I will get several hundred stocks a day long when the market turns up. Is there a way to add code that only shows something like
stocks that yesterday pp/ma crossed and closed in the direction of the cross and today closed in the direction of the cross?
This would give a cross, a close in that direction and a confirming close in that direction the next day?
I'm terrible at writing code so any help would be appreciated.
Bill
|