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 |

Average Directional Index ADX and ADXR Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Bruce_L
Posted : Tuesday, March 7, 2017 4:31:45 PM


Worden Trainer

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

Average Directional Index ADX and ADXR

Template (v17+)

Function Version

ADX(d, s, z)

Indicator version

ADXd.s.z
Where d is the DI Period
Where s is the Smoothing Period
Where z is the number of bars ago (optional).

While TC2000 allows you to set d and s separately, most programs will use the same values for d and s. So if are trying to replicate an ADX 14, you need to set both the DI Period and smooth Period to 14.

Examples

The syntax for ADX utilizes a DI Period, a Smooth Period, and a Bars Ago parameter. In most cases you will want to set the DI Period and Smooth Period to the same setting. So a 14 period ADX would be the following.

ADX14.14

And a 10 period ADX would be the following.

ADX10.10

But if you can have different DI Period and Smooth Periods as desired. The built in indicator plotted on the chart allows you to adjust these values separately as well. So an ADX using 14 for most of its calculations but 10 for its final smoothing would be written as follows.

ADX14.10

Past Values

The third parameter for ADX is the number of bars ago for which you wish to calculate ADX.

This is useful in the calculation of ADXR because you average the current value of ADX with the value of ADX from the ADXR period ago in order to calculate ADXR.

This means if the ADXR period is 10 and is applied to a standard 14 period ADX with the DI Period and Smooth Period both set to 14 could be written as follows.

(ADX14.14 + ADX14.14.10) / 2

Relationship to Directional Movement (+DI / -DI)

The following is a basic list of the steps traditionally used to calculate ADX by hand:

d = DI Period
s = smooth Period
r = ADXR Period
TR = MAX(H-L,H-C1,C1-L)
ATRd = (Yesterday_ATRn*(d-1)+TR)/d
+DM = IF H>H1 AND H-H1>L1-L THEN H-H1 ELSE 0
-DM = IF L1>L AND L1-L>H-H1 THEN L1-L ELSE 0
+DMId = (Yesterday_+DMId*(d-1)+(+DM))/d
-DMId = (Yesterday_-DMId*(d-1)+(-DM))/d
+DId = 100*(+DMId)/ATRd
-DId = 100*(-DMId)/ATRd
DXd = 100*ABS((+DId)-(-DId))/((+DId)+(-DId))
ADXds = (Yesterday_ADXs*(s-1)+DXd)/s
ADXRdsr = (ADXds + ADXds of r bars ago) / 2

You may alternately calculate ATRd, +DMId, -DMId and ADXs as follows:

ATRd = XAVG(TR,(2*d-1))
+DMId = XAVG(+DM,(2*d-1))
-DMId = XAVG(-DM,(2*d-1))
ADXds = XAVG(DXd,(2*s-1))

Related Topics



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
limitless4646
Posted : Sunday, October 22, 2017 11:40:29 PM
Registered User
Joined: 4/3/2014
Posts: 22

Hey Bruce, first of all thanks for all that you do.

I need help, I need an indictor which has the ADX and directional movement in one. Please don't think I am lazy, I have searched all over the website and was not able to find it.

It would look something like the picture I have attached, once again thanks for everything.

https://i.imgur.com/2KqoHf1.png

Bruce_L
Posted : Monday, October 23, 2017 10:30:20 AM


Worden Trainer

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

Please try adding the Directional Movement (+DI -DI) and ADX indicators to the chart separately. Then overlay one of the indicators into the same pane and scale as the other indicator.



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