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

macd crossing o line Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jimmy29
Posted : Saturday, November 8, 2008 2:27:18 PM
Gold Customer Gold Customer

Joined: 3/23/2005
Posts: 3
how do I write  macd 2 5 1 crossing up through the o line . macd 12 26 9 crossing up through 0 line histogram. macd 5 11 3 crossing up through 0 line. This is for my pcf.   thanks
Bruce_L
Posted : Monday, November 10, 2008 9:52:08 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (jimmy29)
how do I write  macd 2 5 1 crossing up through the o line .

Raw Exponential MACD 2,5 xUp Zero:

XAVGC2 - XAVGC5 > 0 AND XAVGC2.1 - XAVGC5.1 <= 0

QUOTE (jimmy29)
macd 12 26 9 crossing up through 0 line histogram.

Raw Exponential MACD 12,26 xUp Zero:

XAVGC12 - XAVGC26 > 0 AND XAVGC12.1 - XAVGC26.1 <= 0

Exponential MACD Signal Line 12,26,9 xUp Zero:

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

Exponential MACD Histogram 12,26,9 xUp Zero:

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

QUOTE (jimmy29)
macd 5 11 3 crossing up through 0 line.

Exponential Raw MACD 5,11 xUp Zero:

XAVGC5 - XAVGC11 > 0 AND XAVGC5.1 - XAVGC11.1 <= 0

Exponential MACD Signal Line 5,11,3 xUp Zero:

XAVG(XAVGC5,3) - XAVG(XAVGC11,3) > 0 AND XAVG(XAVGC5.1,3) - XAVG(XAVGC11.1,3) <= 0

Exponential MACD Histogram 12,26,9 xUp Zero:

XAVGC5 - XAVGC11 - XAVG(XAVGC5,3) + XAVG(XAVGC11,3) > 0 AND XAVGC5.1 - XAVGC11.1 - XAVG(XAVGC5.1,3) + XAVG(XAVGC11.1,3) <= 0

You may wish to review the following:

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

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
doc355
Posted : Tuesday, December 9, 2008 9:06:15 PM
Registered User
Joined: 12/3/2004
Posts: 92
Craig/Bruce  et al...Trying to write a PCF  for MACD  (9 - 18 - 9)  where the lines cross below 0 and where lines cross avove 0.   Does this not mean that the bars (histogram) will also just extend above zero and just extend below zero  ?
Thanks, doc355
Bruce_L
Posted : Wednesday, December 10, 2008 10:58:08 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
doc355,
Exponential MACD 9,18,9 lines cross each other below zero (either direction):

SGN(XAVGC9 - XAVGC18 - XAVG(XAVGC9,9) + XAVG(XAVGC18,9)) <> SGN(XAVGC9.1 - XAVGC18.1 - XAVG(XAVGC9.1,9) + XAVG(XAVGC18.1,9)) AND XAVGC9 - XAVGC18 < 0 AND XAVG(XAVGC9,9) - XAVG(XAVGC18,9) < 0

Exponential MACD 9,18,9 lines cross each other above zero (either direction):

SGN(XAVGC9 - XAVGC18 - XAVG(XAVGC9,9) + XAVG(XAVGC18,9)) <> SGN(XAVGC9.1 - XAVGC18.1 - XAVG(XAVGC9.1,9) + XAVG(XAVGC18.1,9)) AND XAVGC9 - XAVGC18 > 0 AND XAVG(XAVGC9,9) - XAVG(XAVGC18,9) > 0

The Histogram should have just crossed through zero as well when this occurs.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
doc355
Posted : Thursday, December 11, 2008 12:01:41 PM
Registered User
Joined: 12/3/2004
Posts: 92
Bruce...Copied the above PCF's carefully and dbled checked, but many of my "hits" do not meet the criteria.   For example..XAVG(XAVGC9,9) - XAVG(XAVGC18,9)> 0 AND XAVG(XAVGC9,1,9) -XAVG(XAVGC18.1,9) < 0   Should have lines crossing up zero; does not give 100% hits.
Am I not matching up correctly ??
Bruce_L
Posted : Thursday, December 11, 2008 12:15:35 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
doc355,
I think I misunderstood your intent. You asked for "where the lines cross below 0 and where lines cross avove 0" and I provided formulas where the lines are crossing each other while below zero and where the lines are crossing each other while above zero. My interpretation was re-inforced by your question regarding the Histogram being near zero (the cross of the lines occurs when the Histogram crosses zero).

Based on your most recent post, I think you want the lines to be crossing through zero and not each other.

A formula for the raw Exponential MACD 9,18 xUp zero would be:

XAVGC9 - XAVGC18 > 0 AND XAVGC9.1 - XAVGC18.1 <= 0

A formula for the Exponential MACD 9,18,9 Moving Average Signal xUp zero would be:

XAVG(XAVGC9,9) - XAVG(XAVGC18,9) > 0 AND XAVG(XAVGC9.1,9) - XAVG(XAVGC18.1,9) <= 0

A formula for the raw Exponential MACD 9,18 xDn zero would be:

XAVGC9 - XAVGC18 < 0 AND XAVGC9.1 - XAVGC18.1 >= 0

A formula for the Exponential MACD 9,18,9 Moving Average Signal xDn zero would be:

XAVG(XAVGC9,9) - XAVG(XAVGC18,9) < 0 AND XAVG(XAVGC9.1,9) - XAVG(XAVGC18.1,9) >= 0

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
doc355
Posted : Thursday, December 11, 2008 1:05:58 PM
Registered User
Joined: 12/3/2004
Posts: 92
Bruce..Apologize for confusing the issue.  I shall copy your new PFC's and hopefully they will do the trick.
I'll try again... Wished a PFC for (9-18-9) MACD where the MACD line crossed its mov avg (9) DOWN only when Hist Bars were > 0.  In addition wished that  macd line crossed its mov avg UP when Hist Bars were < 0.
Raw MACD  ??   Not clear ??  Sorry.  Bruce, thanks for your patience and interests in supporting me.  Without you I'd be lost.  Hope you and the family enjoy the vacations
doc355
Bruce_L
Posted : Thursday, December 11, 2008 1:15:48 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (doc355)
I'll try again... Wished a PFC for (9-18-9) MACD where the MACD line crossed its mov avg (9) DOWN only when Hist Bars were > 0.  In addition wished that  macd line crossed its mov avg UP when Hist Bars were < 0.

You might want to review the Understanding MACD video. That's not possible. When the MACD is above its Moving Average Signal Line, the Histogram is above zero. That's what the Histogram represents.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
doc355
Posted : Thursday, December 11, 2008 2:06:15 PM
Registered User
Joined: 12/3/2004
Posts: 92
Thanks Bruce.  Copied & updated 2 each of Raw and signal line PCF's.  All worked beautifully as you knew and every hit was on target.  So glad you are there.
Have reviewed the Understanding MACD many times, but will watch again.
doc355
Bruce_L
Posted : Thursday, December 11, 2008 2:12:40 PM


Worden Trainer

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

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
doc355
Posted : Thursday, December 11, 2008 5:31:33 PM
Registered User
Joined: 12/3/2004
Posts: 92
Bruce...Yes, Understand lines could not cross down if Hist. > o.  Wasn't thinking, sorry.  I feel with your help that I am nearly where I want to be.   One last request....PFC 9-18-9  where  macd line X's signal line up regardless of His Bars and inverse where they cross down.
Trust this request is clear.
doc355.
doc355
Posted : Thursday, December 11, 2008 6:49:29 PM
Registered User
Joined: 12/3/2004
Posts: 92

 Bruce...Sorry that I'm not the brightest light in the gym, but when I  load the PFC you gave me eg 
SGN(XAVGC9-XAVGC18..... -XAVG(XAVGC19,9) < 0 whose 9.18.9 lines should have crossed  below 0 does not work for me.  Many hits have several bars far below 0.   According to video when lines cross Hist bar should have just dropped below 0.  Am I misinterpreting  the video ??
doc355

Bruce_L
Posted : Friday, December 12, 2008 9:23:01 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (doc355)
One last request....PFC 9-18-9  where  macd line X's signal line up regardless of His Bars and inverse where they cross down.

Exponential raw MACD 9,18 xUp EMA9 Signal:

XAVGC9 - XAVGC18 > XAVG(XAVGC9,9) - XAVG(XAVGC18,9) AND XAVGC9.1 - XAVGC18.1 <= XAVG(XAVGC9.1,9) - XAVG(XAVGC18.1,9)

Exponential raw MACD 9,18 xDn EMA9 Signal:

XAVGC9 - XAVGC18 < XAVG(XAVGC9,9) - XAVG(XAVGC18,9) AND XAVGC9.1 - XAVGC18.1 >= XAVG(XAVGC9.1,9) - XAVG(XAVGC18.1,9)

Exponential raw MACD 9,18 crossing EMA9 Signal (either direction):

SGN(XAVGC9 - XAVGC18 - XAVG(XAVGC9,9) + XAVG(XAVGC18,9)) <> SGN(XAVGC9.1 - XAVGC18.1 - XAVG(XAVGC9.1,9) + XAVG(XAVGC18.1,9))

QUOTE (doc355)
Bruce...Sorry that I'm not the brightest light in the gym, but when I  load the PFC you gave me eg
SGN(XAVGC9-XAVGC18..... -XAVG(XAVGC19,9) < 0 whose 9.18.9 lines should have crossed  below 0 does not work for me.  Many hits have several bars far below 0.   According to video when lines cross Hist bar should have just dropped below 0.  Am I misinterpreting  the video ??

Are your Charts Daily? Is your MACD Exponential?

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
doc355
Posted : Friday, December 12, 2008 10:50:17 AM
Registered User
Joined: 12/3/2004
Posts: 92

Bruce....Yes, definitely charts are DAILY and MACD is Exponental.
doc355

Bruce_L
Posted : Friday, December 12, 2008 12:14:04 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I've checked them and they seem to work. Did you notice that the direction of the cross does not matter?

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
doc355
Posted : Wednesday, December 31, 2008 12:54:39 PM
Registered User
Joined: 12/3/2004
Posts: 92
Need some help......Trying to write PCF for MACD 9-18-9 where bars < 0  and today's bar is longer than yesterday's.  Here's my take:   XAVGC9-XAVGC18-XAVG(XAVGC9,9) + XAVG(XAVGC18,9)<0  AND XAVGC9-XAVGC18-XAVG(XAVGC9,9)+XAVG(XAVGC18,9) < XAVGC9.1-XAVGC18.1-XAVG(XAVGC9.1,9)+XAVG(XAVGC18.1,9)
My results do not meet my crierion
doc355
Bruce_L
Posted : Monday, January 5, 2009 8:24:59 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
doc355,
Your Personal Criteria Formula is for the Exponential MACD 9,18,9 Histogram being below zero during the current period and less than it was during the previous period. If the MACD Histogram was below zero during the previous period, this means the MACD Histogram Bar will be longer today than it was the previous day. If the MACD Histogram was not below zero during the previous bar, no check is made to determine if the current Bar is longer than the previous Bar or not.

If both values need to be below zero, you just need to adjust the first check to verify that the previous bar is below zero instead of the current bar:

XAVGC9.1 - XAVGC18.1 - XAVG(XAVGC9.1,9) + XAVG(XAVGC18.1,9) < 0 AND XAVGC9 - XAVGC18 - XAVG(XAVGC9,9) + XAVG(XAVGC18,9) < XAVGC9.1 - XAVGC18.1 - XAVG(XAVGC9.1,9) + XAVG(XAVGC18.1,9)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
doc355
Posted : Monday, January 5, 2009 4:29:36 PM
Registered User
Joined: 12/3/2004
Posts: 92
Bruce...Sure thank you for your help on the 9,18,9 MACD where both bars need to be < 0.  I see what you mean  by needing  only  yesterday's < 0.  Didn't get it tho until you pointed it out.
doc355.
Bruce_L
Posted : Monday, January 5, 2009 4:40:29 PM


Worden Trainer

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

-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.