infront 3 posts msg #65370 - Ignore infront |
7/23/2008 6:01:58 PM
Hi i would like to use an adx filter to screen stocks. Unfortunately I can not post a screen shot here as I can't seem to cut and paste an example from SF. I will do my best to describe. Basically I am looking for a particular pattern where the adx(14) line is far below the -DI(14) and +DI(14) lines. I want to see the ADX(14) line forming a cup shape (i.e. decreasing for a few days then increasing. As the adx(14) line is increasing I would like to see the +DI and -DI(14) lines diverging. Thus giving a long signal when +DI is above -DI and vice versa.
I thought this should be easy but my programming skills suck, this is what i wrote for long trades:
show stocks where ADX(14) decreasing for 3 days then increasing for 3 days
and adx(14) below 15
and +DI(14) above -DI(14)
and -DI(14) above 20
and +DI(14) and -DI(14) are diverging
and close above 15
I have have had good success with this pattern but can't seem to get the code to show what i want. Any help would be appreciated
|
chetron 2,817 posts msg #65374 - Ignore chetron modified |
7/23/2008 7:47:25 PM
how about a ticker symbol and date that is/did what you wanted?
Thanks In Advance chetron
|
chetron 2,817 posts msg #65375 - Ignore chetron |
7/23/2008 7:59:14 PM
clickable...
changed diverging line. hope it diverging how you like?
|
infront 3 posts msg #65377 - Ignore infront |
7/23/2008 9:06:55 PM
Hi Chetron, thanks for your help. I have read more of the user guide and came up with this:
show stocks where adx(14) 2 days ago had been decreasing for 5 days
and adx(14) has been increasing for the last 2 days
and adx(14) below -DI(14)
and adx(14) below +DI(14)
and +DI(14) and -DI(14) are diverging for the last 2 days
and volume above 100000
and close above 5
Its closer to what i was looking for, but i'm still trying to sort out how to filter for a gentle divergence between the -DI and +DI lines. If you run the above scan ABI will be the third hit. The signal produced in april is what i'm looking for. As you can see, the +DI and -DI lines slope gently away from each other. When red is above green go short and vice versa. I have found that when the divergence is more severe the signal is much less reliable.
Any ideas on how to capture this idea in code? Thanks
|
chetron 2,817 posts msg #65379 - Ignore chetron modified |
7/23/2008 9:45:14 PM
clickable ....
corrected diverging syntax
how about 5 days of divergence?
|
chetron 2,817 posts msg #65380 - Ignore chetron |
7/23/2008 10:16:12 PM
long....
|
tomm1111 202 posts msg #65388 - Ignore tomm1111 |
7/24/2008 2:35:31 AM
Try this...
First post. Don't know how to set up the fetcher.
show stocks where adx(14) 2 days ago had been decreasing for 5 days
and adx(14) has been increasing for the last 2 days
and adx(14) below -DI(14)
and adx(14) below +DI(14)
and +DI(14) crosses -DI(14) last 2 days
and volume above 100000
and close above 5
|
tomm1111 202 posts msg #65391 - Ignore tomm1111 |
7/24/2008 3:12:22 AM
Alright this is the extent of my SF prowness thus far. I couldn't figure out how to use the same filter for buy and sell screens so I modified Infront's filter into 2. Infront, nice filter.
[
/*ADX filter - sell screen*/
show stocks where adx(14) 2 days ago had been decreasing for 5 days
and adx(14) has been increasing for the last 2 days
and adx(14) below -DI(14)
and adx(14) below +DI(14)
and -DI(14) crossed above +DI(14) last 2 days
and volume above 100000
and close above 5
]
[
/*ADX filter - buy screen*/
show stocks where adx(14) 2 days ago had been decreasing for 5 days
and adx(14) has been increasing for the last 2 days
and adx(14) below -DI(14)
and adx(14) below +DI(14)
and -DI(14) crossed below +DI(14) last 2 days
and volume above 100000
and close above 5
|
chetron 2,817 posts msg #65393 - Ignore chetron modified |
7/24/2008 6:40:25 AM
clickable....
THANX TOMM
|
chetron 2,817 posts msg #65394 - Ignore chetron modified |
7/24/2008 6:42:50 AM
CLICKABLE...
TRY TYPING FETCHER BEFORE THE 1ST BRACKET. NO SPACE.
|