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 |

MACD Histogram Turning Point Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tspara
Posted : Thursday, February 21, 2013 3:16:52 PM
Gold Customer Gold Customer

Joined: 12/15/2004
Posts: 34

Bruce I have been struggling trying to write a PCF that represents a possible MACD histogram turning point.  That is the histogram 2 days ago is higher than the histogram 1 day ago and the histogram today is higher than the histogram yesterday.  Seems like it should be simple but I am getting a little confused on the formulas for the MACD and that of signal line.  Can you help?

Bruce_L
Posted : Thursday, February 21, 2013 3:34:21 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The exact formula would depend on your particular MACD Histogram settings. If you are using an Exponential MACD Histogram 12,26,9 then the formula would be:

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

Understanding MACD



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tspara
Posted : Thursday, February 21, 2013 4:16:57 PM
Gold Customer Gold Customer

Joined: 12/15/2004
Posts: 34

Thank you.

favouredtrader
Posted : Monday, March 18, 2013 7:32:53 PM
Registered User
Joined: 12/31/2007
Posts: 2

Hi Bruce,

I have struggling with how to write a formula for 10 EMA, 20 EMA and 50 SMA all three crosing one another. Your reply is highly appreciated. Thanks. 

Bruce_L
Posted : Tuesday, March 19, 2013 9:19:34 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If all three moving averages have to cross each other during the same bar, then the Condition Formula is relatively straightforward:

SGN(XAVGC10 - XAVGC20) <> SGN(XAVGC10.1 - XAVGC20.1) AND SGN(XAVGC10 - AVGC50) <> SGN(XAVGC10.1 - AVGC50.1) AND SGN(XAVGC20 - AVGC50) <> SGN(XAVGC20.1 - AVGC50.1)

If the crossovers can happen over more than one bar, you would need to determine the maximum number of bars over which the crossover can occur. The simplest version of such a formula would just replace all of the .1s in the formulas with this number of bars instead.



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