StockFetcher Forums · Filter Exchange · ISO a Bullish (Bearish) Divergence Filter<< >>Post Follow-up
2 posts
msg #99445
Ignore Abertawe
3/1/2011 8:13:35 PM

As is common knowledge, Bullish Divergence (i.e. progressively lower lows in stock price accompanied by progressively higher lows in a momentum indicator such as MACD) is a useful technical indicator. Likewise for its counterpart, Bearish Divergence (i.e. progressively higher highs in stock price accompanied by progressively lower highs in a momentum indicator such as MACD).

Try as I might, I can't conceive (or source from elsewhere) a Bullish (or Bearish) Divergence filter. Can anyone possibly help please. I'm sure this would be a very useful filter for StockFetchers.

Without wanting to put anyone on the wrong scent, here is my own failed attempt at cracking the problem for Bullish Divergence:

set{price_low_1, the close 1 month low}
set{price_low_2, the close 3 month low}
set{macdh_low_1, the MACD Histogram(12,26,9) 1 month low}
set{macdh_low_2, the MACD Histogram(12,26,9) 3 month low}
Show stocks where price_low_1 is below price_low_2
and macdh_low_1 is above macdh_low_2

4,599 posts
msg #99447
Ignore Kevin_in_GA
3/1/2011 9:50:00 PM

Read here:

2 posts
msg #99453
Ignore Abertawe
3/2/2011 2:59:20 AM

Thank you for referring me to that page, Kevin. I actually had previously read through that thread (I should have cited it in my original post to let people know that). However, the concept of positive and negative divergence -- and the newly developed SfPosDiv() and SfNegDiv() functions -- is different from the modeling Bullish Divergence and Bearish Divergence.

With Bullish Divergence, I really need to be able to compare whether successive lows in a measure of price (some moving average of price) are progressively lower while the corresponding lows in some momentum indicator (e.g. MACD Fast Line) are progressively higher.

That's quite different from examining whether, say, MA(20) is, say, increasing while the indicator is heading in the opposite direction.

I've racked my brains over various approaches to solving this challenge of filtering for Bullish (or Bearish) Divergence. When it occurs (which isn't that often), it's an incredibly reliable leading indicator that a downtrend (or an uptrend) is about to reverse. I hope someone inside StockFetcher or among the broader SF community can figure out how to screen for it. Thank you.

11 posts
msg #99695
Ignore Kaylexa
3/16/2011 1:06:12 AM


We have to talk. I've been racking my brains over the EXACT same thing. I started two posts this week trying to get more insights into this Bullish/Bearish Divergence challenge. I thought it would be relatively easy to create the SF filter code for this very helpful concept. But it's super tricky. I'd love to try and figure it out together. I am amazed that you posted this inquiry this month when it's been on my mind the past few months.

Please respond back to this. Then we can share email addresses.


StockFetcher Forums · Filter Exchange · ISO a Bullish (Bearish) Divergence Filter<< >>Post Follow-up

*** Disclaimer *** 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. does not recommend particular securities., 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 2018 - 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