Type/to search

Directional Movement Index (DMI) Trading Strategy

Cryptocurrency
Created: 2023-09-18 14:11:21
Last modified: 3 years ago
1
Follow
1781
Followers

Overview

This strategy implements trend trading based on the Directional Movement Index (DMI). DMI consists of three lines: ADX, +DI and -DI. ADX shows trend strength, values above a threshold indicate a trend; +DI and -DI show upward and downward trend strength. Go long when +DI crosses above -DI, and short when -DI crosses above +DI.

Strategy Logic

Calculate the ADX, +DI and -DI lines. Set a reasonable threshold for ADX to determine if a trend is present, such as 25. When ADX is above this level, if +DI is greater than -DI, an upward trend is identified, go long. If -DI is greater than +DI, a downward trend is identified, go short. Hold the position until a reverse signal appears.

Advantage Analysis

  • DMI accurately identifies trend direction with fewer signals
  • ADX filters insignificant breakouts to avoid meaningless trades
  • Trading in trend direction avoids whipsaws
  • Large parameter tuning space - ADX threshold, DI period etc.

Risk Analysis

  • Trend reversal can lead to losses
  • ADX has lag in determining trend strength
  • Long holding periods increase drawdown risk

Mitigate by shortening holding period or adding other indicators to determine trend reversal.

Optimization Directions

  • Optimize ADX parameters to balance responsiveness and noise filtering
  • Test impact of different holding period settings
  • Consider adding moving averages etc. to identify trend reversal
  • Test robustness across different products

Conclusion

DMI strategy accurately determines trend direction with controlled drawdown. Further improvements possible through parameter optimization. A simple and practical trend following strategy.

Source
Pine
/*backtest
start: 2023-09-10 00:00:00
end: 2023-09-17 00:00:00
period: 30m
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// ©wojak_bogdanoff
// @version=5
// Directional Movement Index (DMI)
Strategy parameters
Strategy parameters
ADX Smoothing
DI Length
Consolidation ADX
Trading Settings
Testing Start Date
Testing End Date
Signals Style - Setting
Long Entry
Long Exit
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)