StockFetcher Forums · Filter Exchange · RSI DIVERGENCE<< 1 2 3 >>Post Follow-up
TheRumpledOne
6,407 posts
msg #102562
Ignore TheRumpledOne
modified
9/7/2011 10:32:11 AM

Fetcher[

/* TRO RSI(2) Positive Divergence */

set{nd2,count(close below close 2 days ago,1) * count(rsi(2) above rsi(2) 2 days ago,1)}

set{nd3,count(close below close 3 days ago,1) * count(rsi(2) above rsi(2) 3 days ago,1)}

set{nd4,count(close below close 4 days ago,1) * count(rsi(2) above rsi(2) 4 days ago,1)}

set{nd5,count(close below close 5 days ago,1) * count(rsi(2) above rsi(2) 5 days ago,1) }

set{nd6,count(close below close 6 days ago,1) * count(rsi(2) above rsi(2) 6 days ago,1)}

set{nd7,count(close below close 7 days ago,1) * count(rsi(2) above rsi(2) 7 days ago,1)}

set{nd8,count(close below close 8 days ago,1) * count(rsi(2) above rsi(2) 8 days ago,1)}

set{nd9,count(close below close 9 days ago,1) * count(rsi(2) above rsi(2) 9 days ago,1) }

set{nd10,count(close below close 10 days ago,1) * count(rsi(2) above rsi(2) 10 days ago,1) }

set{nd11,count(close below close 11 days ago,1) * count(rsi(2) above rsi(2) 11 days ago,1) }
set{nd12,count(close below close 12 days ago,1) * count(rsi(2) above rsi(2) 12 days ago,1) }
set{nd13,count(close below close 13 days ago,1) * count(rsi(2) above rsi(2) 13 days ago,1) }
set{nd14,count(close below close 14 days ago,1) * count(rsi(2) above rsi(2) 14 days ago,1) }
set{nd15,count(close below close 15 days ago,1) * count(rsi(2) above rsi(2) 15 days ago,1) }
set{nd16,count(close below close 16 days ago,1) * count(rsi(2) above rsi(2) 16 days ago,1) }
set{nd17,count(close below close 17 days ago,1) * count(rsi(2) above rsi(2) 17 days ago,1) }
set{nd18,count(close below close 18 days ago,1) * count(rsi(2) above rsi(2) 18 days ago,1) }
set{nd19,count(close below close 19 days ago,1) * count(rsi(2) above rsi(2) 19 days ago,1) }
set{nd20,count(close below close 20 days ago,1) * count(rsi(2) above rsi(2) 20 days ago,1) }

add column nd2 {PD2}
add column nd3 {PD3}
add column nd4 {PD4}
add column nd5 {PD5}
add column nd6 {PD6}
add column nd7 {PD7}
add column nd8 {PD8}
add column nd9 {PD9}
add column nd10 {PD10}
add column nd11 {PD11}
add column nd12 {PD12}
add column nd13 {PD13}
add column nd14 {PD14}
add column nd15 {PD15}
add column nd16 {PD16}
add column nd17 {PD17}
add column nd18 {PD18}
add column nd19 {PD19}
add column nd20 {PD20}

stock is optionable
close above 10
count(volume below 300000,100) below 1

]



A "1" in the column indicates there is POSITIVE DIVERGENCE between price and RSI(2).

Not sure how far I can push this.

bert123
52 posts
msg #102586
Ignore bert123
9/9/2011 9:39:39 PM

Nice! How about adding the PD columns to get a ranking, 20 being top contendor ?

Eman93
4,750 posts
msg #102588
Ignore Eman93
9/10/2011 11:53:36 AM

The real limitation in SF is you can not store a price value. What we are looking for is the first dip then the second dip to be lower in price but higher in in RSI value than the first dip... for bullish...

But when scanning you dont know what the price is or when it happened.. I have a kind of work around I will post it,,,,

Fetcher[


close > 1


volume > 800000

low reached a new 10 week low

set{rslo, 0 + rsi(14) 10 week low}

set{rsla, 0 + rsi(14) 3 week low}

set{rstoday, 0 + rsi(14)}

set{rdlo, rslo / rsla}

set{rdlp, 1 - rdlo}

set{rmda, rslo - rstoday}

set{rmdb, rslo - rsla}

rdlo < 1

draw rsi(14) 10 week low

add column rstoday

add column rsla {3w low}

add column rslo {10W low}

add column rmdb
add column rdlp



add column Volume Weighted Moving Average(14)

add column beta

add column IND

sort column 8 ascending
]



Eman93
4,750 posts
msg #102589
Ignore Eman93
modified
9/10/2011 5:07:22 PM

As you can see with any filter overall market timing is critical.. look at the results for 8-19 and 8-20.- 90% of all stocks move with the market. This is by no means a mechanical system.. it only alerts you that a bullish condition exists.

TheRumpledOne
6,407 posts
msg #102594
Ignore TheRumpledOne
9/11/2011 5:06:08 PM

Bert, that would exceed SF limitations.

I have done that already. The limit is 4.



TheRumpledOne
6,407 posts
msg #102595
Ignore TheRumpledOne
9/11/2011 5:08:46 PM

Eman, I agree.

Divergence identifies candidates to trade.

When and how you trade them is up to you.



Eman93
4,750 posts
msg #102798
Ignore Eman93
10/1/2011 11:43:00 PM

What would make this really valuable. Is if you could plot filter results... a line plot would be fine.... you can back test for 20 years but not plot of hits? that is so easy.


Just look at the filter I posted and type in the dates of all the swing lows.. you get a big number of hits like a week ago thursday the 22nd 600+ hits thats high...... I guess you would with a lot of oversold filters.. but it would be very use full... IMHO

Just add it to the back test area....

JTATRADER
6 posts
msg #107194
Ignore JTATRADER
7/25/2012 12:47:49 AM

Hey All,

I am using an EXTREMELY simple filter-not quite as sophisticated as I've seen here-great codes guys!

show stocks that are optionable
show stocks where rsi is approaching 30 from above
show stocks close is above 40

It does have an element that was not found in other codes though, it tries to pick the 30 oversold area, before it happens with the second line of code

In the end, I am looking at my picks and using subjective measures to filter them out, I am not that good with the code, this is ok with me as I have spent years looking at charts, I know what I want.

Here is what I use:
certain amount of time from the top-sweet spot
take a look at how many times it has failed to break the 50day EMA, IBD has a method of mapping a downtrend doing this, where 2nd and 3rd fails to the 10 week (50 day) ema are good short candidates. As I want to go long, I see where I am at here and stay away from those critical points.
Also, I want there to be liquid options markets, so some days I get 0 picks, some i get several, I filter out the worst from the above metrics, add some that are 'too close to top' < 4 months to a watchlist.

But as said before, when a filter like this goes from 0 picks per day to double digits per day over several days, and large double digits quick, you are pretty sure it is an indicator of a swing bottom in the major indexI'm glad someone else noticed that as well. ;)





klynn55
747 posts
msg #107212
Ignore klynn55
modified
7/25/2012 9:57:29 PM

JT : could you give us one example? thanks

JTATRADER
6 posts
msg #107227
Ignore JTATRADER
modified
7/26/2012 1:10:59 PM

Hey, No problem,

On Monday, July 23rd, I ran the above 3 code screen and came up with these:

AGN - ALLERGAN INCORPORATED 84.78 -0.43 2,389,100 0.18 historical 3m , 6m , 1y , 2y
K - KELLOGG CO 47.15 -1.03 1,985,200 -0.47 historical 3m , 6m , 1y , 2y
FXE - EURO CURRENCY TRUST 120.66 -0.21 1,565,000 1.23 historical 3m , 6m , 1y , 2y
HUM - HUMANA INC 72.44 -1.60 1,160,400 -4.98 historical 3m , 6m , 1y , 2y
RAH - RALCORP HOLDINGS INC 60.45 -1.76 455,000 -0.98 historical 3m , 6m , 1y , 2y
RLI - RLI Corp 63.49 0.73 154,800 1.01 historical 3m , 6m , 1y , 2y
FXF - Rydex Swiss Franc Tr 99.57 -0.20 45,000 1.20 historical 3m , 6m , 1y , 2y

AGN wasn't in that 'sweet spot', I like to see it in 4-5 months from an important top. I guess I am looking for the turning point of an intermediate correction, I have a bullish bias with this code; anything less wouldn't really qualify for me. So, I put it on a watch list.
K has too much gapping, illiquid movement in the chart, I like it to be smoother, so its was out,
FXE and FXF are currency etfs. FXF just happened to have larger open interest (better chance of maintaining a liquid market), so I chose FXF
HUM looked good, also chose HUM,
HUM is a good example of what can potentially go wrong when I jumped the gun, didnt wait for a triple divergence, thought it may be setting up a double div, but, didn't wait for it to happen.
RAH and RLI were scrapped due to low open interest in the option market, if i remember right.
I toss them out this way, because, with a watch list, you end up with quite a list over just a couple weeks, plenty of trade options.
FXF 100's was a double in two days, sold it. Still have the HUM AUG 75's
So, that's just how I narrow them down based on the picks the screen gives me.

StockFetcher Forums · Filter Exchange · RSI DIVERGENCE<< 1 2 3 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.