StockFetcher Forums · General Discussion · MACD positive divergence<< 1 2 >>Post Follow-up
7 posts
msg #31265
Ignore GI30065
3/2/2004 4:36:32 PM

Hello All,

Let me introduce myself, I'm Marc and live in Belgium.
I have been a trader for about 10 years now.
And guess what, I'm a brand new subscriber to StockFetcher !
I have been studying this forum and StockFetcher for about 2 weeks now.
And I can tell that SF is one of the best TA programs available on the market today.
I know what I'm talking about, because I currently use Metastock, Omnitrader and Hermes.
First I want to THANK all the persons who contribute to this wonderful forum.
There are really some wizards out here !

And now my question, it's something I've been looking for all of my live.
I think we all agree ==> one of the most powerful buy signals is a positive divergence of the MACD against the closing price.
If you have looked at the chart of SanDisk Corp (SNDK) recently, you'll know what I'm talking about.
Every night I spent hours looking for stocks who have such a divergence, now I'm looking for a program which can automate this.

For this we need 2 points I think (please correct me if I'm wrong), two times a MACD crossover.
And we need a formula which can link an event (MACD crossover) to the closing price at the moment the event occurred.
The first line of the filter is very simple ==> Show stocks where MACD fast line(12,26) crossed above MACD slow line(12,26) within the last 0 days ago
For the second crossover we need exactly the same event, except it needs to be the previous crossover ( not the one "fast line crossed below" but the one "fast line crossed above")
Both crossovers are linked to specific dates (the dates that both events occurred) which are linked to specific closing prices.
Again the first date and closing price are simple, it's the date and closing price the filter is run.
You would need to run the filter every single day ( first crossover point = within the last 0 days ago)
If we have all the data we need, then we would have a formula which looks like this ==>

MACD crossover 0 days ago>MACD crossover previous N days ago
close{MACD crossover 0 days ago}<close{MACD crossover previous N days ago}

I suggest for the value of the MACD crossover we take the value of the MACD fast line.
We need this data to compare, so we can see that the most recent crossover is indeed greater (higher in value) then the previous one.

If we have such a filter for the MACD, then we also can tweak it for the stochastic !
Please guys I really need your help with this !
I'm not as smart as you wizards over there :-))
You think with StockFetcher we can accomplish this ?
I would really mean a lot to me.
I hope this all makes sense.



14 posts
msg #31340
Ignore cdrudek
3/9/2004 11:41:30 PM

Hi marc ,

Email me , I might have some info about what you are trying to do.


235 posts
msg #31345
Ignore cegis
3/10/2004 11:48:30 AM

Chris, If that info is related to StockFetcher, could you please post it? That way, everyone can learn. Thanks!


Here's a start:

Fetcher[set{da,days(MACD fast line(12,26) crossed above MACD slow line(12,26) 3 days ago,60)} MACD fast line(12,26) crossed above MACD slow line(12,26) within the past 0 days and da is greater than 0 and price between 5 and 50 and volume 30 day low is greater than 100000 add column da draw MACD(12,26)]

This finds stocks with the two MACD crossovers within the past 60 trading days (with price between 5 and 50, and good volume; change these parameters to suit). It does not compare the crossover values, though. The other thing that this does NOT do is the check of the close. Unfortunately, at this point in time, the number used for the "___ days ago" phrase has to be numeric, and can't be a variable. If it could, you could use"MACD fast line(12,26) da days ago" and "close da days ago" to get the values on the day of the first MACD crossover.

This limitation may not be all that terrible, as this filter only returned three stocks for last night's close. I consider that a reasonable number of charts to check by hand. (Does that sound like a reasonable number of results for the day? The three listed did have the double crossover within the time frame, but that doesn't make my filter absolutely correct...) If you use the Flash charting feature (under Settings), when you hover your cursor over a bar on the chart, it will show you the open, high, low, and close for that day.

If you can't quite figure out how this works, let me know, and I can explain.

What time-frame do you usually consider when looking for the divergance?

HTH & Thanks,


7 posts
msg #31348
Ignore GI30065
3/10/2004 2:45:43 PM

Thank You Very Much cegis !!!
It's a start, I can use all the help I can get :-))
The time frame for the divergence is not important to me, ass long as there is one. Is it possible for me to tweak the formule for the stochastic ass well ?
Ok, maybe this is a stupid question, I will try to tweak it myself and do some tests. Anyway, THX sooo much for the replay cegis.

235 posts
msg #31350
Ignore cegis
3/10/2004 4:24:33 PM


Glad I could help. If you understand the filter I supplied, it should be fairly straight forward to modify it for stochastics. If you want to post your attempt, I can review it for you. If you don't understand my filter, ask and I'll explain it.


P.S., I realize English probably isn't your native language, so please take this with the helping intent it's intended: Your use of "ass" in the prior post should be "as". The word "ass" is the part of your body that you sit on... (Or was this a typo, or intentional? No matter...)

235 posts
msg #31352
Ignore cegis
3/10/2004 4:43:43 PM


Oh, yeah. If the double crossover time frame truely doesn't matter to you, you'll need to change the "3 days ago,60" within the days() function in the set{} command.

If you change "3 days ago" to "1 day ago", you may find a handful of stocks that had the double cross in only a few days. This didn't seem useful to me. (But I could be wrong, of course!)

And you would want to change the "60" to some large number. I'm pretty sure there is a limit to the number of days back you can "look", but I don't know off the top of my head what it is (1 year?). If you pick too big of a number, SF will change it to some small "default" (I think).



36 posts
msg #31354
Ignore DasKapital
3/10/2004 5:00:12 PM

Marc and cegis,

When I saw Marc's post, I also realized that the "days" function would be needed but unworkable. I had alluded to this shortcoming in my post of 11/06/2003. I was hoping that someone had a "work-around" solution, and was waiting for someone to reply to Marc. Thanks for making the official request.

Best regards,


7 posts
msg #31355
Ignore GI30065
3/10/2004 5:01:18 PM

Thx, cegis,

I'm running a few test right now !
I have no trouble reading your filter, but I do have troubles writing my own ones. But now, (thx to you) I can use your filter to tweak it a little bit :-)

Best Regards,

235 posts
msg #31361
Ignore cegis
3/10/2004 8:26:25 PM

Again, glad I could help. I now have an additional very useful filter in my list! (I can manually do what SF can't - yet.) Thanks for the idea, Marc!


548 posts
msg #31363
Ignore txtrapper
3/10/2004 8:35:47 PM


Fetcher[show stocks where the MACD Fast Line(12,26) 0 days ago crossed above the MACD Slow Line(12,26) 0 days ago]


StockFetcher Forums · General Discussion · MACD positive divergence<< 1 2 >>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