Registered User Joined: 10/7/2004 Posts: 51
|
Hi,
How to write the MACD Histogram(36.78.18) vs it's moving average(5)?
Thank you.
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Simple or exponential MACD? Simple or exponential 5ma?
- Craig Here to Help!
|
Registered User Joined: 10/7/2004 Posts: 51
|
Simple 5ma.
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Try this:
SGN(((AVGC36-AVGC78)-(AVG(AVGC36,18)-AVG(AVGC78,18)))- ((((AVGC36-AVGC78)-(AVG(AVGC36,18)-AVG(AVGC78,18)))+ ((AVGC36.1-AVGC78.1)-(AVG(AVGC36.1,18)-AVG(AVGC78.1,18)))+ ((AVGC36.2-AVGC78.2)-(AVG(AVGC36.2,18)-AVG(AVGC78.2,18)))+ ((AVGC36.3-AVGC78.3)-(AVG(AVGC36.3,18)-AVG(AVGC78.3,18)))+ ((AVGC36.4-AVGC78.4)-(AVG(AVGC36.4,18)-AVG(AVGC78.4,18))))/5))
It will return 1 when the histo is above the 5sma It will return -1 when it is below.
If your MACD is exponential, put an X in front of every AVG in the formula (XAVGC36)
- Craig Here to Help!
|