Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

BULLISH & BEARISH MACD CROSSINGS Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tradingfreedom
Posted : Tuesday, February 26, 2008 12:21:14 PM
Registered User
Joined: 11/25/2007
Posts: 28
What would be the PCF for:

1) A bullish crossover of the MACD (12,26.9) today where the MACD is crossing up from below the trigger line, and

2) A bearish crossover of the MACD (12,26,9) today where the MACD is crossing down from above the trigger line
Bruce_L
Posted : Tuesday, February 26, 2008 12:24:16 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Please try the following:

Raw Exponential MACD 12,26,9 xUp Trigger:

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

Raw Exponential MACD 12,26,9 xDn Trigger:

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

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
Quiktdr
Posted : Monday, March 3, 2008 10:53:25 AM
Registered User
Joined: 10/7/2004
Posts: 794
Bruce,

Are these PCF's for the crossing of the two lines ?

Bruce_L
Posted : Monday, March 3, 2008 11:00:07 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Quiktdr,
Yes (or the Histogram crossing through zero - it's the same thing).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
Posted : Monday, March 3, 2008 11:30:35 AM
Registered User
Joined: 10/7/2004
Posts: 794
Bruce,

I am not looking for a cross of zero line I am looking for a crossover of short over long.

also, is there a way of getting a numeral factor rather than a true false?

thank you in advance!
Bruce_L
Posted : Monday, March 3, 2008 11:39:19 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Quiktdr,
As aleady stated when I answered yes, it is exactly that. Please review Understanding MACD.

If you want to plot the difference between the raw MACD (fast) and its Moving Average Trigger (slow) instead of the crossover, please try the following (its the value of the MACD Histogram):

Exponential MACD Histogram 12,26,9:

XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
statstock
Posted : Monday, March 3, 2008 1:11:26 PM
Registered User
Joined: 3/1/2008
Posts: 2
I know I can use a pcf to scan for stocks where the MACD crossed up or down through 0 in the past X days, but is it possible to 'automatically' annotate a chart with each instance that the MACD crosses 0?  Also, is it possible to show more detail in the units on the x-axis (time axis)? When I pulled up a daily chart, it showed labels for the months but not the individual days.
Bruce_L
Posted : Monday, March 3, 2008 1:25:14 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
statstock,
Welcome to the forums. A very good foundation for learning how to use TeleChart can be gained by reviewing the following:

If you are new to TeleChart READ THIS FIRST!

You could create a Custom Percent True Indicator returning True when MACD crosses zero in either direction:

Exponential MACD Histogram 12,26,9 crossing zero (either direction):

Select Chart Template | Add Indicator | Percent True.
- Visible: Checked
- Smoothing Average: 1
- Average Type: Doesn't matter (because the Smoothing Average is 1)
- Boolean Formula: SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) <> SGN(XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9))

You could change the Boolean Formula to test for other MACD crosses through zero:

Exponential raw MACD 12,26 crossing zero (either direction):

SGN(XAVGC12 - XAVGC26) <> SGN(XAVGC12.1 - XAVGC26.1)

Exponential MACD Trigger 12,26,9 crossing zero (either direction):

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

I do not know of a way to manually adjust the time annotations in TeleChart. You may wish to review the following:

Visually Backtesting Specific Symbols

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
statstock
Posted : Monday, March 3, 2008 1:43:47 PM
Registered User
Joined: 3/1/2008
Posts: 2
Thanks Bruce.  I'll give it a shot.  I have looked at some of the videos on "If you're new to Telechart READ THIS FIRST".
bustermu
Posted : Monday, March 3, 2008 1:44:52 PM
Registered User
Joined: 1/1/2005
Posts: 2,645

Bruce,

I believe you read Quiktdr's request incorrectly.  He said, "I am looking for a crossover of short over long."  That, as you know, is equivalent to the MACD Line crossing zero, or, in the case at hand, the EMA12 (short) crossing the EMA26 (long).  At least, that is the terminology used in TeleChart.

Thanks,
Jim Murphy

Quiktdr
Posted : Monday, March 3, 2008 1:54:06 PM
Registered User
Joined: 10/7/2004
Posts: 794
Jim,

You are correct with respect to my query. I was looking for a crossing of the short over the long not necessarily above the zero line.
Bruce_L
Posted : Monday, March 3, 2008 1:54:37 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
You could be right, but I never would have interpreted it that way (and still don't) despite the fact that it might actually be Quiktdr's intent. The original question asked by Quiktdr was, " Are these PCF's for the crossing of the two lines ?" If there are two lines displayed in a MACD, those two lines are the raw MACD and its Moving Average Trigger, not the underlying Moving Averages upon which the MACD is based.

Quiktrdr,
The raw MACD is based on two Moving Averages, but these Moving Averages are not displayed and do not visibly cross when plotting a MACD. You can test for these moving Averages crossing each other as follows:

EMA12 xUp EMA26:

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

EMA12 xDn EMA26:

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

EMA12 crossing EMA26 (either direction):

SGN(XAVGC12 - XAVGC26) <> SGN(XAVGC12.1 >= XAVGC26.1)

This is exactly the same as the raw MACD crossing zero. I've already provided the formulas for the raw MACD crossing its Moving Average Trigger (which is exactly the same as the Histogram crossing zero). You may wish to review the following:

Moving Average PCF Templates
Things to check if your moving averages don't "seem right" or "seem to match"

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