Registered User Joined: 1/21/2014 Posts: 15
|
I have a MACD (12,26,9)
I need a formula where the MACD (12,26) is equal to exponential moving average (9); the cross over
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following if you are interested in the MACD crossing up.
XAVGC12 - XAVGC26 >= XAVG(XAVGC12,9) - XAVG(XAVGC26,9) AND XAVGC12.1 - XAVGC26.1 < XAVG(XAVGC12.1,9) - XAVG(XAVGC26.1,9)
The following if you are interested in the MACD crossing down.
XAVGC12 - XAVGC26 <= XAVG(XAVGC12,9) - XAVG(XAVGC26,9) AND XAVGC12.1 - XAVGC26.1 > XAVG(XAVGC12.1,9) - XAVG(XAVGC26.1,9)
And the following if you do not carry which direction the cross happens.
SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) <> SGNXAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9))
Moving Average Convergence Divergence (MACD) and Histogram
-Bruce Personal Criteria Formulas TC2000 Support Articles
|