Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

Python: Average Directional Index (ADX) 3 Directional Movement System Calculation

3.8K views
•
November 24, 2013
by
sentdex
YouTube video player
Python: Average Directional Index (ADX) 3 Directional Movement System Calculation

TL;DR

This video explains how to calculate the directional movement in Python using the Average True Range (ATR) and exponential moving averages (EMA).

Transcript

hello hello welcome back to our ATX in python tutorial video where we left off we did the calculation of directional movement now we need to do the directional indexes or indicators rather so to do that we're going to go ahead and define a few variables right out of the gate we want to because we know to do this we have this slide already down but ... Read More

Key Insights

  • 📈 The calculation of directional movement is an important step in technical analysis for determining trends in financial markets.
  • 😒 The use of exponential moving averages helps to smooth out the data and identify the overall direction of the trend.
  • 🫰 The ATR is used in the calculation to account for volatility and adjust the directional indexes accordingly.
  • 🫵 Iterating through the data allows for the calculation of directional movement for each data point, providing a comprehensive view of the trend.
  • 📶 The PDI and NDI provide insights into the strength of positive and negative price movements, respectively.
  • ❓ The calculated directional movement can be used in conjunction with other technical indicators to make informed trading decisions.
  • ❓ The Python programming language provides a flexible and efficient platform for implementing the calculation of directional movement.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is the purpose of calculating the directional movement in Python?

Calculating the directional movement helps to determine the strength and direction of a trend in financial markets, which can be useful for making trading decisions.

Q: How is the positive directional index (PDI) calculated?

The PDI is calculated by multiplying the exponential moving average (EMA) of the positive directional movement (PDM) by 100 and dividing it by the ATR.

Q: Why is it necessary to iterate through the data using a while loop?

The while loop allows us to calculate the directional movement for each data point, taking into account the previous day's prices and values.

Q: How is the negative directional index (NDI) calculated?

Similar to the PDI, the NDI is calculated by multiplying the EMA of the negative directional movement (NDM) by 100 and dividing it by the ATR.

Summary & Key Takeaways

  • The video covers the calculation of directional indexes, specifically the positive directional index (PDI) and negative directional index (NDI) using the ATR and EMAs.

  • Variables are defined, including arrays for dates, true ranges, positive directional movements, and negative directional movements.

  • A while loop is used to iterate through the data and calculate the true ranges, directional movements, and append them to the respective arrays.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from sentdex 📚

Parsing XML - Go Lang Practical Programming Tutorial p.11 thumbnail
Parsing XML - Go Lang Practical Programming Tutorial p.11
sentdex
Python: How to Program the Chaikin Money Flow Trading Indicator thumbnail
Python: How to Program the Chaikin Money Flow Trading Indicator
sentdex
How to Parse Twitter for Twitter Analysis: Part 1 thumbnail
How to Parse Twitter for Twitter Analysis: Part 1
sentdex
How to Train a Chatbot Using TensorFlow and Python thumbnail
How to Train a Chatbot Using TensorFlow and Python
sentdex
Python: How to Graph the Chaikin Money Flow Trading Indicator in Matplotlib thumbnail
Python: How to Graph the Chaikin Money Flow Trading Indicator in Matplotlib
sentdex
Python Generator Functions for massive Performance Improvements with Lists thumbnail
Python Generator Functions for massive Performance Improvements with Lists
sentdex

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.