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

MACD Moving Average Crossovers Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
optionsgod
Posted : Tuesday, May 29, 2007 9:57:08 AM
Registered User
Joined: 7/17/2006
Posts: 15
Is there a way to create a PCF to scan for MACD Moving average crossovers?

I would like to scan for items that have the MACD line cross above and below the zero line.

Any help would be appreciated.
Bruce_L
Posted : Tuesday, May 29, 2007 10:00:21 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You may wish to review the following:

Understanding MACD
How to create a Personal Criteria Forumula (PCF)
Handy PCF example formulas to help you learn the syntax of PCFs!

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
optionsgod
Posted : Thursday, May 31, 2007 1:08:10 AM
Registered User
Joined: 7/17/2006
Posts: 15
My MACD is set to 12,26,9. Average type = exponential, MACD color = blue, AVG color = red.

I think my question was wrong. I would like to know how to create a PCF to find out if the blue line crossed above the red line today and if the blue line crossed below the red line today to alert me of buying and selling signals.

I could not find these formulas in your example.
optionsgod
Posted : Thursday, May 31, 2007 1:09:29 AM
Registered User
Joined: 7/17/2006
Posts: 15
MACD histogram = unchecked
Craig_S
Posted : Thursday, May 31, 2007 5:29:36 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
What you are asking for is the same as a MACD histogram crossing zero (check out the video Bruce linked above to see why).

Under that video you can use the PCF templates for MACD histograms crossing zero to find your signals.

- Craig
Here to Help!
optionsgod
Posted : Thursday, May 31, 2007 12:37:30 PM
Registered User
Joined: 7/17/2006
Posts: 15
MACD Histogram Crossing From Negative to Positive Today
(XAVGC20-XAVGC40)>(XAVG(XAVGC30,20)-XAVG(XAVGC40,30)) AND (XAVGC20.1-XAVGC40.1)<(XAVG(XAVGC30.1,20)-XAVG(XAVGC40.1,30))

MACD Histogram Crossing From Positive to Negative Today
(XAVGC20-XAVGC40)<(XAVG(XAVGC30,20)-XAVG(XAVGC40,30)) AND (XAVGC20.1-XAVGC40.1)>(XAVG(XAVGC30.1,20)-XAVG(XAVGC40.1,30))

I added these PCFs... They are not 100% accurate to what I am looking for. Is this normal?
optionsgod
Posted : Thursday, May 31, 2007 12:55:06 PM
Registered User
Joined: 7/17/2006
Posts: 15
I am not asking for crosses above the zero line. I am asking for the crossing of the blue and red lines in my MACD settings above.

These PCFs and the other 2 I tested do not show that 100% of the time. A lot of garbage is returned.
Bruce_L
Posted : Thursday, May 31, 2007 1:09:51 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (optionsgod)
MACD Histogram Crossing From Negative to Positive Today
(XAVGC20-XAVGC40)>(XAVG(XAVGC30,20)-XAVG(XAVGC40,30)) AND (XAVGC20.1-XAVGC40.1)<(XAVG(XAVGC30.1,20)-XAVG(XAVGC40.1,30))

MACD Histogram Crossing From Positive to Negative Today
(XAVGC20-XAVGC40)<(XAVG(XAVGC30,20)-XAVG(XAVGC40,30)) AND (XAVGC20.1-XAVGC40.1)>(XAVG(XAVGC30.1,20)-XAVG(XAVGC40.1,30))

I added these PCFs... They are not 100% accurate to what I am looking for. Is this normal?

These formula are for an Exponential MACD Histogram 20,40,30. Your settings would be an Exponential MACD Histogram 12,26,9. You need to modify the formulas by replacing the 20 with 12, 40 with 26 and 30 with 9:

MACD Histogram xUp Zero:

XAVGC12 - XAVGC26 > XAVG(XAVGC12,9) - XAVG(XAVGC26,9) AND XAVGC12.1 - XAVGC26.1 <= XAVG(XAVGC12.1,9) - XAVG(XAVGC26.1,9)

MACD Histogram xDown Zero:

XAVGC12 - XAVGC26 < XAVG(XAVGC12,9) - XAVG(XAVGC26,9) AND XAVGC12.1 - XAVGC26.1 >= XAVG(XAVGC12.1,9) - XAVG(XAVGC26.1,9)

QUOTE (optionsgod)
I am not asking for crosses above the zero line. I am asking for the crossing of the blue and red lines in my MACD settings above.

As Craig (and the video) already indicated, this is the same as the Histogram crossing through zero.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
optionsgod
Posted : Friday, June 1, 2007 8:08:21 AM
Registered User
Joined: 7/17/2006
Posts: 15
Thanks a lot. It works!
Bruce_L
Posted : Friday, June 1, 2007 8:18:53 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome. Our pleasure.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ramjet777
Posted : Friday, June 1, 2007 1:45:59 PM
Registered User
Joined: 6/30/2006
Posts: 6
How would I modify this formula to get the crossover(Bullish) above the zero line only?
Bruce_L
Posted : Friday, June 1, 2007 2:02:59 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
ramjet777,
The trainers cannot give settings, interpretation or investment advice. This includes identifying which pattern is Bullish or Bearish.

MACD Histogram xUp Zero Above Zero:

XAVGC12 - XAVGC26 > XAVG(XAVGC12,9) - XAVG(XAVGC26,9) AND XAVGC12.1 - XAVGC26.1 <= XAVG(XAVGC12.1,9) - XAVG(XAVGC26.1,9) AND XAVG(XAVGC12,9) - XAVG(XAVGC26,9) > 0

MACD Histogram xDown Zero Above Zero:

XAVGC12 - XAVGC26 < XAVG(XAVGC12,9) - XAVG(XAVGC26,9) AND XAVGC12.1 - XAVGC26.1 >= XAVG(XAVGC12.1,9) - XAVG(XAVGC26.1,9) AND XAVGC12 - XAVGC26 > 0

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ramjet777
Posted : Friday, June 1, 2007 5:34:14 PM
Registered User
Joined: 6/30/2006
Posts: 6
Thanks for the pcf's.
Bruce_L
Posted : Monday, June 4, 2007 10:01:33 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
ramjet777,
You're welcome. Our pleasure.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
joywilliams1451
Posted : Friday, July 13, 2007 10:44:01 AM
Registered User
Joined: 1/22/2007
Posts: 8
Attention Bruce,

I pasted the strategy that you mentioned on 10/7/2004 to scan for a MACD crossover. It is giving me stocks that have already crossed over for a few weeks. Look at a weekly chart of csco today which now shows a MACD crossover to buy at this time. I need the scan to find stocks that have just now crossed over. Please help

Thanks
Bruce_L
Posted : Friday, July 13, 2007 10:59:27 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
joywilliams1451,
All of the formulas in this topic are Daily formulas and will not work for Weekly charts unless used as a Custom Percent True Indicator or Custom Indicator:

Visually Backtesting Specific Symbols
Plotting Custom Indicators with Examples

You could then use Indicator Sorting to find which Custom Percent True Indicators were currently True or the current values of Custom Indicators:

Sorting price and indicators by their Actual Value

It is possible to write Weekly Personal Criteria Formulas for MACD, but they will be quite a bit longer than the Daily formulas given above.

As a sidenote, I'm not sure which formulas are being referenced. You seem to have used the date I joined the forums instead of the Posted date when referencing the formulas.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
joywilliams1451
Posted : Friday, July 13, 2007 5:28:19 PM
Registered User
Joined: 1/22/2007
Posts: 8
Bruce,

Can you write a scan for the weekly MACD crossover

Thanks JW
Bruce_L
Posted : Friday, July 13, 2007 5:29:38 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
joywilliams1451,
Yes, but I would need your specific MACD settings.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
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.