DX

Modified on 2008/04/14 10:36 by Administrator — Categorized as: Standard Indicators

Syntax

public static DX Series(Bars bars, int period)

Parameter Description

Bars The Bars object
period Indicator period

Description

DX is a component of the Directional Movement System developed by Welles Wilder. This system attempts to measure the strength of price movement in positive and negative directions, as well as the overall strength of the trend. The DX is used in calculating the ADX indicator which is normally used with the DIPlus and DIMinus] indicators. Typically it uses 14 periods in its calculations. Normally you would not use the DX indicator as it whipsaws, use the ADX or ADXR.

Interpretation


Calculation

DX = Round( 100 * |DIPlus - DIMinus| / |DIPlus + DIMinus| )

Example

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // Show how Average Directional Movement (ADX) relates to DX on the chart ChartPane ADXPane = CreatePane( 50, true, true ); PlotSeries( ADXPane, DX.Series( Bars, 20 ), Color.DarkGray, WealthLab.LineStyle.Histogram, 3 ); PlotSeries( ADXPane, ADX.Series( Bars, 20 ), Color.Blue, WealthLab.LineStyle.Solid, 3 ); } } }