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.
|
|
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
|
|
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.
|
|
Registered User Joined: 7/17/2006 Posts: 15
|
MACD histogram = unchecked
|
|
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!
|
|
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?
|
|
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.
|
|
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
|
|
Registered User Joined: 7/17/2006 Posts: 15
|
Thanks a lot. It works!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/30/2006 Posts: 6
|
How would I modify this formula to get the crossover(Bullish) above the zero line only?
|
|
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
|
|
Registered User Joined: 6/30/2006 Posts: 6
|
Thanks for the pcf's.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
ramjet777, You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
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
|
|
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
|
|
Registered User Joined: 1/22/2007 Posts: 8
|
Bruce,
Can you write a scan for the weekly MACD crossover
Thanks JW
|
|
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
|
|
Guest-1 |