Skip to content
All library documents

Filtering Moving Average Crossovers with ADX and DMI

Article Strategy library · Author: ChaoZhang

Summary

This trend-following method combines fast and slow simple moving averages with ADX and DMI. A fast average above the slow average, positive directional imbalance, and ADX above a threshold trigger a long entry; the reverse conditions trigger a close. The published parameters use 7- and 14-period averages, a 14-period DI calculation, and an ADX threshold of 20. The code also includes date-range inputs, although its window function always returns true, so the described time filtering is not actually implemented.

The document explains that ADX is intended to filter out weak or ranging conditions, while DMI helps align entries with trend direction. Both indicators can lag and miss early moves, and moving average signals can be whipsawed. A short BTC/USDT futures backtest interval is listed, but no performance results are supplied. Parameter testing, additional filters, and stop losses are suggested; the strategy as written only enters and closes long positions.

Key ideas

  • A fast and slow moving average relationship supplies the basic trend signal.
  • ADX filters for stronger trends, while the DMI directional difference gates entries and exits.
  • The strategy enters and closes long positions; it does not open short positions in the provided code.
  • ADX and DMI can lag, and the listed backtest settings include no reported performance results.

Tags

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