Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

MACD Crossover Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Quiktdr
Posted : Friday, November 4, 2005 9:39:50 PM
Registered User
Joined: 10/7/2004
Posts: 794
The attached is supposed to show crossovers of MACD 3,10,16 but when I plug in formula to EZScan crossover may have occurred days ago. I am looking for crossovers today.
Please advise!

Crossing up:
((XAVG(XAVGC16,3) - XAVG(XAVGC16,10))>0)AND((XAVG(XAVGC16.1,3) - XAVG(XAVGC16.1,10))<0)

Crossing down:
((XAVG(XAVGC16,3) - XAVG(XAVGC16,10))<0)AND((XAVG(XAVGC16.1,3) - XAVG(XAVGC16.1,10))>0)

Thank you in advance.
Bruce_L
Posted : Saturday, November 5, 2005 5:20:01 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The formulas you listed are not designed to show when the Signal Line crosses the MACD Line. The formulas are designed to show when the Signal Line crosses the Zero Line. I suspect you want the following formulas instead:

MACD Histogram Crossing From Negative to Positive Today:
(XAVGC3 - XAVGC10) > (XAVG(XAVGC3,16) - XAVG(XAVGC10,16)) AND (XAVGC3.1 - XAVGC10.1) < (XAVG(XAVGC3.1,16) - XAVG(XAVGC10.1,16))

MACD Histogram Crossing From Positive to Negative Today:
(XAVGC3 - XAVGC10) < (XAVG(XAVGC3,16) - XAVG(XAVGC10,16)) AND (XAVGC3.1 - XAVGC10.1) > (XAVG(XAVGC3.1,16) - XAVG(XAVGC10.1,16))

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
Posted : Saturday, November 5, 2005 9:43:25 AM
Registered User
Joined: 10/7/2004
Posts: 794
How do I write a PCF for the crossover when the short crosses the average?

Would it be (3-10=7) when the 7 average crosses the 16?
Doug_H
Posted : Saturday, November 5, 2005 10:38:22 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
The MACD line itself shows the relationship between the two moving averages (the 3 and the 10 in your example).

You can write PCF's for when that MACD line crosses the zero line (a signal that the 3 and the 10 have converged and crossed each other). You have those PCF's in your post above.

You can also write PCF's for when the MACD line crosses its own moving average, sometimes called the signal line (a 16 in your example). These same formulas also find stocks where the MACD histogram crosses from above the center line to below. Bruce has provided those formulas for you.

I'm not sure what you mean when you want to find the short crossing the average. By short, do you mean the 3? By average, do you mean the signal line? Remember, when you're looking at MACD, you're not looking at the 3 and the 10. They are not plotted. You are looking at a line that plots the difference between the 3 and the 10.

And where did a 7 come into play?

- Doug
Teaching Online!
Quiktdr
Posted : Saturday, November 5, 2005 10:40:49 AM
Registered User
Joined: 10/7/2004
Posts: 794
I was under the impression that MACD is the difference between the short (3) and long (10) which would equal 7.

I am looking for a PCF for the first time it crosses its' average.
Doug_H
Posted : Saturday, November 5, 2005 11:34:23 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
The difference between the 3 day moving average and the 10 day moving average does not equal the 7 day moving average. Plot all three, and you'll see that.

MACD is the difference between the value of the short and the value of the long. When that difference is zero, the MACD line crosses the zero line.

If you haven't already watched it, you might find this video very informative:

Understanding MACD



- Doug
Teaching Online!
Quiktdr
Posted : Saturday, November 5, 2005 11:43:20 AM
Registered User
Joined: 10/7/2004
Posts: 794
I stand corrected, thank you. Now how does one write a PCF the first time we get a crossover of the lines not the zero line?
Doug_H
Posted : Saturday, November 5, 2005 11:46:51 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
If by lines you mean the MACD line and it's moving average (the signal line), use Bruce's PCF's above.

If instead, you mean the two moving average lines (the 3 and the 10), and you want to know when they cross, you can use the MACD formulas you posted...because when MACD crosses zero, it means that the 3 and the 10 have crossed.

There are other ways to find stocks where two moving averages have crossed. You may enjoy these videos:

Create PCFs and EasyScans to find moving average crossovers
Comparing indicators using Visual Difference sorts

- Doug
Teaching Online!
jakja
Posted : Monday, November 7, 2005 4:59:45 PM
Registered User
Joined: 11/22/2004
Posts: 8
I'm a new user of TC2005. I've been experimenting with writing PCFs for MACD Histogram, using 12,26,9 as the base.

I'm having difficulty writing a PCF that will give me the MACD Histogram below the zero-line and just begining to tick upwards (on a weekly chart.) I want, as the result of the PCF, to see the very beginings of an "upward sloping MACD Histogram."

Please advise.

And thanks for the terrific assistance hithertofore.

Sincerely,

Jack
Doug_H
Posted : Monday, November 7, 2005 5:15:07 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
You'll find a bunch of PCF's for MACD underneath the video window at the following link:

Understanding MACD

However, these PCF's are for a daily chart. They really can't be translated to a weekly chart.

Instead, let me recommend that you plot MACD12,26,1 and then plot a seperate 9 bar moving average of the MACD line. Then you can use a visual difference sort to identify stocks where the MACD line is just about to cross its moving average (the signal line) or has just crossed it. These will be the same stocks where the histogram would have just ticked above zero. The beauty of this method is that you can set your chart to weekly before you do the sort, and it will find you what you want. These sorts can be done on any time frame.

Here is a video about Visual Difference Sorting:

Comparing indicators using Visual Difference sorts

The video deals with two moving averages, but you can apply the technique to MACD and its moving average very easily.

- Doug
Teaching Online!
jakja
Posted : Tuesday, November 8, 2005 12:00:49 PM
Registered User
Joined: 11/22/2004
Posts: 8
Doug,

Thanks for the prompt reply. I will use your suggestions as soon as possible.

However, I am not concerned about how to write a PCF for MACD cross-overs above (or below) the zero-line; but rather when the MACD Histogram begins to tick upwards (i.e. the bars begin to shorten) while the MACD Histogram is still below the zero-line. (I hope I'm making myself clear. But I'm a novice; so it wouldn't surprise me if I weren't!! Ha!)

In any event, thanks again, Doug. I appreciate your help.

Jack
Doug_H
Posted : Tuesday, November 8, 2005 12:11:51 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
I misunderstood the remaining below the zero line part. I still think if you use visual sorting, you could look for stocks where the the MACD line has been well below the signal line, but now (visually speaking) it is beginning to move up toward the signal line. When that happens, the histogram would show shortening bars below the zero line.

The reason I've suggested this technique is because you're wanting to deal with weekly data, and visual sorting (unlike scanning) can be done on any time frame.

- Doug
Teaching Online!
jakja
Posted : Tuesday, November 8, 2005 12:32:44 PM
Registered User
Joined: 11/22/2004
Posts: 8
I understand.

Thanks, Doug.
Doug_H
Posted : Tuesday, November 8, 2005 12:34:47 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
You're welcome!

- Doug
Teaching Online!
ggalvin
Posted : Sunday, November 13, 2005 4:59:38 PM
Registered User
Joined: 5/2/2005
Posts: 5
I have read thru this whole discussion and still haven't seen what I am looking for -- a PCF to search for todays MACD Histogram bar that is longer (higher) than yesterday's bar or todays bar shorter ( lower ) than yesterday's bar - Thanks Gary G.
jynkin
Posted : Sunday, November 13, 2005 7:13:44 PM
Registered User
Joined: 10/7/2004
Posts: 286
The following PCF yields TRUE when the width between the 3d and 10d average changes from expanding negetive divergence to contracting convergence.

((AVGC3-AVGC10)>(AVGC3.1-AVGC10.1)) AND ((AVGC3.1-AVGC10.1)<(AVGC3.2-AVGC10.2))



To get the reverse "topping", just change the repective > < symbols.

((AVGC3-AVGC10)<(AVGC3.1-AVGC10.1)) AND ((AVGC3.1-AVGC10.1)>(AVGC3.2-AVGC10.2))
Craig_S
Posted : Monday, November 14, 2005 6:32:19 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Gary,

What are your MACD settings?

- Craig
Here to Help!
james9898
Posted : Thursday, December 8, 2005 1:36:25 PM
Registered User
Joined: 2/21/2005
Posts: 24
I can't seem to make this work...I have a 12,26,9 MACD and a 12,26,9 MACD histogram. I am trying to write a PCF to use in an Easy scan that tells me when the histogram first day goes from being a down bar below the zero line to being an up bar above the zero line. When I use the previously posted MACD Histogram Crossing UP Positive to Negative in a scan, I get all kinds of stocks with down bars or up bars that have been up for several days, etc. I just want the stocks that had a down histogram bar and one day later had an up histogram bar. I have looked at post after post and failed completely in my effort. My time frame of interest is daily close. I have an MACD headache! You guys must spend more time on MACD than anything! Please help and thank you, in advance.

James

PS I am going to want to do it the opposite way...up to down...but I am hoping if you can teach me to fish I can catch that fish myself!
Craig_S
Posted : Thursday, December 8, 2005 2:49:20 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
There are a few things...

1) Are you sure you are looking at daily charts?

2) What formula are you using?

3) Are you sure your plotted MACD is 12,26 and 9?

4) Is your formula simple and your plotted MACD exponential (or visa-versa)?

5) Are your PCFs calculated to the most recent date?

If you are still having problems, give me the PCF and some stocks that are showing up TRUE for the PCF that should not be.

- Craig
Here to Help!
james9898
Posted : Thursday, December 8, 2005 3:05:05 PM
Registered User
Joined: 2/21/2005
Posts: 24
Craig,

I believe I found my answer in posts you made on or around March 24, 2005. Yes, I am looking at Daily charts...you already taught me that one and it is always the first thing I check now. I am using your March 24 formula now. The MACD parameters were correct but it was simple...I would have sworn it was exponential. PCF's are updated. Bottom line is it seems to be straightened out and working now. Thanks, as always, for your exemplary help.

James
Craig_S
Posted : Thursday, December 8, 2005 3:21:10 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Glad it all matches up now.

- Craig
Here to Help!
Winnie
Posted : Thursday, December 8, 2005 3:23:21 PM
Registered User
Joined: 10/7/2004
Posts: 1,006
James,

Hope this will clarify James9898 question, also hope I’m not treading on anyone’s toes by replying. Below are some PCF for the exponential MACD and what they mean, for simple MACD just remove all X's in each PCF.

Winnie

Exponential MACD12.26.9
MACD12.26.9 Short 12, Long 26, Period Number (Signal Line) 9

MACD 12.26 Exponential
(XAVGC12-XAVGC26) MACD Exponential, Short 12, Long 26, Today

Signal Line ( EMA 9 ) for MACD 12.26.9
(XAVG(XAVGC12,9)-XAVG(XAVGC26,9)) MACD Exponential Signal Line, Today

MACD 12.26.9 Exponential Histogram, Short 12, Long 26, Period Number (Signal Line) 9
(XAVGC12-XAVGC26)-(XAVG(XAVGC12,9)-XAVG(XAVGC26,9)) Today

MACD 12.26 Exponential Above or Below 0 Line
(XAVGC12-XAVGC26) >0 MACD above zero line, Today
(XAVGC12-XAVGC26) <0 MACD below zero line, Today

MACD 12.26 Exponential Crossing Up 0 Line
(XAVGC12-XAVGC26) >0 AND (XAVGC12.1-XAVGC26.1) <0

Signal Line ( EMA 9 ) for MACD 12.26.9 Above or Below 0 Line
(XAVG(XAVGC12,9)-XAVG(XAVGC26,9))>0 MACD Signal Line above 0, Today
(XAVG(XAVGC12,9)-XAVG(XAVGC26,9))<0 MACD Signal Line below 0, Today

MACD 12.26.9 Exponential Histogram, Crossing UP or DOWN 0
(XAVGC12-XAVGC26)-(XAVG(XAVGC12,9)-XAVG(XAVGC26,9))>0 Above 0, Today
(XAVGC12-XAVGC26)-(XAVG(XAVGC12,9)-XAVG(XAVGC26,9))<0 Below 0, Today

MACD12.26.9 Crossing UP Signal Line 9 is the same as Histogram Crossing UP 0
(XAVGC12-XAVGC26) > (XAVG(XAVGC12,9) - XAVG(XAVGC26,9)) AND (XAVGC12.1-XAVGC26.1) < (XAVG(XAVGC12.1,9)-XAVG(XAVGC26.1,9))

MACD12.26.9 Crossing DOWN Signal Line 9 is the same as Histogram Crossing DOWN 0
(XAVGC12-XAVGC26) < (XAVG(XAVGC12,9) - XAVG(XAVGC26,9)) AND (XAVGC12.1-XAVGC26.1) > (XAVG(XAVGC12.1,9)-XAVG(XAVGC26.1,9))

Craig_S
Posted : Thursday, December 8, 2005 3:25:53 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Thank-you winnie.

He had the right formula but did not match the averaging type to his chart.

- Craig
Here to Help!
james9898
Posted : Monday, December 12, 2005 4:57:53 PM
Registered User
Joined: 2/21/2005
Posts: 24
Winnie,

Thanks for all of the formulas and explanations...there are several there that I do not yet have. It was very thoughtful of you to post them and I apppreciate it very much!

James
jakja
Posted : Monday, December 12, 2005 8:48:20 PM
Registered User
Joined: 11/22/2004
Posts: 8
Winnie,

I, too, am grateful for your formulas regarding MACD crossovers.
Thanks.

Jack
htp1
Posted : Monday, December 26, 2005 12:59:51 AM
Registered User
Joined: 12/10/2005
Posts: 32
Winnie,
Thanks so much for sharing the MACD formulas.
Craig_S
Posted : Monday, December 26, 2005 1:01:35 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Here are some more to work from (under the video)

Understanding MACD

- Craig
Here to Help!
htp1
Posted : Monday, December 26, 2005 11:48:31 AM
Registered User
Joined: 12/10/2005
Posts: 32
Hi,
I am thankful the formula for MACD:
((AVGC3-AVGC10)<(AVGC3.1-AVGC10.1)) AND ((AVGC3.1-AVGC10.1)>(AVGC3.2-AVGC10.2))
Could you help me with a formula for Stochastic which would yield the similar "true" results to double check with the above MACD PCF.
Thanks again.
Craig_S
Posted : Monday, December 26, 2005 11:51:20 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
What do you want the Stochastic formula to reveal? 2 days of increases?

What stochastic settings are you using?

Have you watched this video and looked at the formulas posted under it yet?

Understanding Stochastics

- Craig
Here to Help!
htp1
Posted : Monday, December 26, 2005 3:01:51 PM
Registered User
Joined: 12/10/2005
Posts: 32
Hi,
I am using MACD 3,10,16 and would like to have Stochastic PCF 16,3,3 crossing up to confirm with the MACD.
I am trying this PCF but it does not seem to work:
(STOC3.3>30) AND (STOC3.3<AVG(STOC3.3,16)) AND (STOC3.3.1>AVG(STOC3.3.1,16))
Thanks
Craig_S
Posted : Monday, December 26, 2005 3:05:34 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Simple or exponential stochastics?

If it is simple, try this:

(STOC16.3>30) AND (STOC16.3<AVG(STOC16.3,3)) AND (STOC16.3.1>AVG(STOC16.3.1,3))

- Craig
Here to Help!
htp1
Posted : Monday, December 26, 2005 3:25:21 PM
Registered User
Joined: 12/10/2005
Posts: 32
Hi Craig,
Thank you so much for responding so fast. I input your PCF and did update all the criteria and the message showed "sorted by: Not calculated". How do I make it work ?
Thanks
Craig_S
Posted : Monday, December 26, 2005 3:34:51 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Go back and edit the PCF. Be sure it TESTS (gives a TRUE or FALSE).

If you get a syntax error, you need to copy it over again.

- Craig
Here to Help!
htp1
Posted : Monday, December 26, 2005 8:07:12 PM
Registered User
Joined: 12/10/2005
Posts: 32
Hi Craig,
I tested the formula again and still could not get any true or false result eventhough the message " Not calculated" is not there any more. However, it would work when I combine with another PDF.
((AVGC3 - AVGC10) - (AVG(AVGC3,16) - AVG(AVGC10,16)) > 0) AND (STOC16.3 > 30) AND (STOC16.3 < AVG(STOC16.3,3)) AND (STOC16.3.1 > AVG(STOC16.3.1,3))
Could you please explain why it would not not by itself ?
Thanks
Craig_S
Posted : Monday, December 26, 2005 9:28:03 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
What does it say by itself (if not true/false)?

Are you highlighting, copying then pasting the formula or retyping it?

I just tested it again and it works fine here....

- Craig
Here to Help!
htp1
Posted : Tuesday, December 27, 2005 8:02:31 PM
Registered User
Joined: 12/10/2005
Posts: 32
Hi Craig,
It's working now! Thanks so much for your help.
Craig_S
Posted : Tuesday, December 27, 2005 9:56:55 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Glad to hear it!

- Craig
Here to Help!
Winnie
Posted : Thursday, January 12, 2006 4:56:14 PM
Registered User
Joined: 10/7/2004
Posts: 1,006
Hi Craig,

Can you see where I am making the error, to screen stocks where the MACD12.29.9 has crossed UP the Signal Line within the last 5 days and is above the Signal Line today. Do you have to write the PCF with AND OR for each Day?

How do you write the second part where the MACD has crossed UP in any one of the the previous 5 days, is there a simple way to do this?

MACD12.26.9 Crossed UP Signal Line within the last 5 Days
(XAVGC12 - XAVGC26) > (XAVG(XAVGC12,9) - XAVG(XAVGC26,9)) AND (XAVGC12,5 - XAVGC26,5) < (XAVG(XAVGC12,5,9) - XAVG(XAVGC26,5,9))

Thanks
Winnie
Doug_H
Posted : Thursday, January 12, 2006 5:30:07 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
Try this, Winnie:

MACD12.26.9 Crossed UP Signal Line within the last 5 Days
(XAVGC12 - XAVGC26) > (XAVG(XAVGC12,9) - XAVG(XAVGC26,9)) AND (XAVGC12.5 - XAVGC26.5) < (XAVG(XAVGC12.5,9) - XAVG(XAVGC26.5,9))


- Doug
Teaching Online!
Winnie
Posted : Thursday, January 12, 2006 9:01:13 PM
Registered User
Joined: 10/7/2004
Posts: 1,006
Hi Doug,

I had used your .5 (for the last 5 days) first, even with a short PCF like this I must have had something else wrong, I appreciate the correction, nice to know help is always just a few keystrokes away.

Thanks
Winnie
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.