Monday, April 11, 2011

Divergence between the Close and an indicator

Divergence between the Close and an indicator
Use the following formula to calculate the ratio of the Close and the MACD. It is written using the "long form" MACD
so that the time periods used by the MACD may be changed. This indicator shows "divergence" between close and indicators:
In Windows versions of MetaStock formula is:
Correl (((Sum (Cum (1) * (Mov (C, 12, E)-Mov (C, 26, E)), 100)) - (Sum (Cum (1), 100) *
Sum ((Mov (C, 12, E)-Mov (C, 26, E)), 100) / 100 ))/(( Sum (Power (Cum (1), 2), 100)) -
(Power (Sum (Cum (1), 100), 2) / 100 )),(( Sum (Cum (1) * C, 100)) - (Sum (Cum (1), 100) *
Sum (C, 100) / 100 ))/(( Sum (Power (Cum (1), 2), 100)) - (Power (Sum (Cum (1), 100), 2) / 100)), 12 0)
The interpretation of the indicator output is as follows:
- 0.08 (80%) and lower is divergence between the Close and the MACD.
- 1 is very strong divergence.
+ 1 is a very strong correlation.
The formula is built this way so that most other indicators can be used in place of the MACD.
For example, here is the same indicator using the RSI (14):
Correl (((Sum (Cum (1) * (RSI (14)), 100)) - (Sum (Cum (1), 100) *
Sum ((RSI (14)), 100) / 100 ))/(( Sum (Power (Cum (1), 2), 100)) - (Power (Sum (Cum (1), 100), 2) / 100));
((Sum (Cum (1) * C, 100)) - (Sum (Cum (1), 100) * Sum (C, 100) / 100 ))/(( Sum (Power (Cum (1), 2) , 100)) -
(Power (Sum (Cum (1), 100), 2) / 100)), 12.0)

No comments:

Post a Comment

Powered by Blogger.