Skip to content
All library documents

Directional Movement and ADX-Based Long-Short Signals

Article Strategy library · Author: ChaoZhang

Summary

This document implements the Directional Movement Index and Average Directional Index from price highs, lows, and prior closes. It calculates true range and positive and negative directional movement, smooths each series over a configurable length, and derives DI+ and DI− as percentages of smoothed true range. Their difference, scaled by their sum, forms DX; a simple moving average of DX produces ADX. The indicator plots both directional lines and ADX.

The included trading rule enters long when DI+ exceeds DI− and short when DI− exceeds DI+, so direction is determined by the relative directional movement lines rather than by an ADX threshold. Although a threshold parameter is defined, it is not used in the entry logic. The published settings describe a BTC/USDT futures backtest spanning a year with daily chart bars and hourly base data, but no performance results are provided. The document is a compact indicator and signal example, not evidence that the rule is profitable; it does not explain costs, position sizing, or exit management.

Key ideas

  • True range and directional movement are smoothed to calculate DI+ and DI−.
  • The ADX is calculated as a moving average of the normalized difference between the directional lines.
  • The example enters long or short according to which directional line is higher.
  • A threshold parameter is present but does not affect the displayed entry conditions.
  • Backtest settings are given without performance results or a complete risk-management plan.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.