← Script Marketplace
Open-source scriptindicator/v1

Directional Movement Index

by Kodexius·@kodexius·

Combine positive and negative directional movement with ADX to assess trend direction and strength.

#dmi#momentum#trend
Directional Movement Index chart preview

Description

The Directional Movement Index plots +DI, -DI, and the Average Directional Index together. The DI relationship describes directional pressure, while ADX focuses on the strength of the trend without identifying whether it is rising or falling.

Open-source script. Everyone can inspect the source code, use the script on a chart, and save an editable copy.

Release notes

Version history · 1 published version

Version 1CurrentChart updatedDirectional Movement Index · Aug 31, 2026
Release notes

Initial classic indicator release.

View current source ↓
Source codempl-2.0View source

indicator("Directional Movement Index", { overlay: false });
const diLength = input.int("DI Length", 14, { min: 1, max: 200 });
const adxSmoothing = input.int("ADX Smoothing", 14, { min: 1, max: 200 });
const [plusDI, minusDI, adxLine] = dmi(diLength, adxSmoothing);
plot(plusDI, { title: "+DI", color: "#26a69a", lineWidth: 2 });
plot(minusDI, { title: "-DI", color: "#ef5350", lineWidth: 2 });
plot(adxLine, { title: "ADX", color: "#2962ff", lineWidth: 2 });
hline(25, { title: "Trend Level", color: "#78909c", style: "dashed" });
  

Community discussion

0 comments

Loading…

No comments yet. Start the discussion.