Sharing investing and trading ideas. Helping traders get started.
Advertisement

Tuesday, June 30, 2009

Average Directional Movement Rating

Average Directional Movement Rating ADR
Comes with formula, calculation steps and VBA code

Introduction
The average directional movement rating ADR is based on the average directional index ADX. You might want to read about the average directional index before proceeding further. The ADR is calculated as follows:

ADR=(current ADX + ADX k periods ago)/2

As such, ADR can be seen as an approximate of the average ADX over n periods. The crossover of ADR and ADX can be seen as a signal confirming the existing of the trend. ADX is a measure of the strength of a trend, not direction. In an up or down market, the ADR and ADX values are always positive. Therefore, these indicators should be used with other trend indicators to infer the direction of the market.

VBA Code
Method A uses functions, while Method B uses sub procedures to calculate ADR. Method B is faster and more flexible.

Method A
To calculate average directional movement rating, ADR, you will need the ADX custom function in your code, which in turn needs the following custom functions from the respective pages

DM function from directional movement
TR function from average true range
DMX function from directional movement index

In addition, you will need to have calculated ADX using Method A based on the steps provided in the page on average directional index. Below is the code for the custom function ADR.

'Insert the following into the AddUDF sub which you can obtain from any of the 'other pages listed above.
Application.MacroOptions macro:="ADR", _
Description:="Returns Average Directional Movement Rating" & Chr(10) & Chr(10) & _
"Select current ADX and ADX n periods ago", _
Category:="Technical Indicators"

'Insert below into the module
Public Function ADR(ADX, ADXn)
ADR = (ADX + ADXn) / 2
End Function

Once done, you can calculate ADR by entering "=ADR([current ADX], [ADX k periods ago])" into any cell.

Method B
Method B is much more convenient, with the intermediate steps calculated for you. To run Method B, you have to copy the Runthis sub of Method B from the page on Accumulation/Distribution line. You will run the ADR_1 sub from the Runthis sub.

However, you will still need the DM_1, WWMA_1, ATR_1, DMI_1, DMX_1, ADX_1 subs of Method B from the directional movement, Welles Wilder's moving average, average true range, directional movement indicator, directional movement index and average directional index pages respectively.

'Copy the following line into the Runthis sub
'Just before the line End Sub
'Disable all other macros that Runthis will call e.g. CLV, ADL, by
'marking them out as comments with single quotes
ADR_1 high, low, close1, output, n, k

'Insert this as a new sub
Sub ADR_1(high As Range, low As Range, close1 As Range, output As Range, n As Long, k As Long)
ADX_1 high, low, close1, output, n
ADX0 = output(4 + k, 10).Address(False, False)
ADX1 = output(4, 10).Address(False, False)
output(0, 11).Value = "ADR"
output(4 + k, 11).Value = "=(" & ADX0 & "+" & ADX1 & ")/2"
output(4 + k, 11).Copy output.Offset(0, 10)
Range(output(1, 11), output(3 + k, 11)).Clear
End Sub

Other References

http://www.marketvolume.com/technicalanalysis/adxr.asp


Like what you have just read? Digg it or Tip'd it.
The objective of Finance4Traders is to help traders get started by bringing them unbiased research and ideas. Since late 2005, I have been developing trading strategies on a personal basis. Not all of these models are suitable for me, but other investors or traders might find them useful. After all, people have different investment/trading goals and habits. Thus, Finance4Traders becomes a convenient platform to disseminate my work...(Read more about Finance4Traders)

0 comments:

Post a Comment