ADX Calculation

morphtrade

Newbie
Messages
3
Likes
0
Just wanted to doble check whether this is a right way of calculating +DI, -DI and ADX for intraday data data. Problem is I am calculating it on minute bars so I have replaced yesterday and today with previous and current min bars. But if I do that, then for lots of bars, I get positive +DM and -DM or negative +DM and -DM. Could some one advise on how to get it right?


Calculate the Directional movement for today
+DM = Today's High - Yesterday's High (when price moves upward)
-DM = Yesterday's Low - Today's Low (when price moves downward)

You cannot have both +DM and -DM on the same day. If there is an outside day (where both calculations are positive) then the larger of the two results is taken. An inside day (where both calculations are negative) will always equal zero.

Calculate the true range for the day. True range is the largest of:
Today's High - Today's Low,
Today's High - Yesterday's Close, and
Yesterday's Close - Today's Low

+DM14 = exponential moving average* of +DM

-DM14 = exponential moving average* of -DM

TR14 = exponential moving average* of True Range

Next, calculate the Directional Indicators:

+DI14 = +DM14 divided by TR14

-DI14 = -DM14 divided by TR14

Then, calculate the components of the Average Directional Movement Index (ADX):

Calculate the DI Difference:
Record the difference between +DI14 and -DI14 as a positive number.

Calculate the Directional Index (DX):
DX = DI Difference divided by the sum of +DI14 and -DI14

ADX = the exponential moving average* of DX
 
Top