PineCodersTASC

TASC 2021.12 Directional Movement w/Hann

█ OVERVIEW

Presented here is code for the "Directional Movement w/Hann" indicator originally conceived by John ​Ehlers. The code is also published in the December 2021 issue of Trader's Tips by Technical Analysis of Stocks & ​Commodities (TASC) magazine.

Ehlers continues here his exploration of the application of Hann windowing to conventional trading indicators.


█ FEATURES

The rolling length can be modified in the script's inputs, as well as the width of the line.


█ NOTES

Calculations
The calculation starts with the classic definition of PlusDM and MinusDM. These directional movements are summed in an exponential moving average (EMA). Then, this EMA is further smoothed in a finite impulse response (FIR) filter using Hann window coefficients over the calculation period.

Background
The DMI and ADX indicators were designed by J. Welles Wilder and presented in his "New Concepts in Technical Trading Systems" book published in 1978.


Join TradingView!

Tools and ideas for all Pine coders: www.tradingview.com/u/PineCoders/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
TASC: traders.com/
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?