opmt

Directional Movement Index DE

opmt تم تحديثه   
This script uses the existing built-in DMI indicator but adds two lines indicating strength of the ADX trend. The original author J. Welles Wilder, indicated a ADX trending strongly above 25 (yellow by default), and ADX trending weaker at a threshold of 20 or below (dashed yellow by default).

The default colours have been changed so that ADX is yellow, +DI is green, and -DI is red.


Calculation

Calculating the DMI can actually be broken down into two parts. First, calculating the +DI and -DI, and second, calculating the ADX. To calculate the +DI and -DI you need to find the +DM and -DM (Directional Movement). +DM and -DM are calculated using the High, Low and Close for each period. You can then calculate the following:

Current High - Previous High = UpMove
Previous Low - Current Low = DownMove

If UpMove > DownMove and UpMove > 0, then +DM = UpMove, else +DM = 0
If DownMove > Upmove and Downmove > 0, then -DM = DownMove, else -DM = 0

Once you have the current +DM and -DM calculated, the +DM and -DM lines can be calculated and plotted based on the number of user defined periods.

+DI = 100 times Exponential Moving Average of (+DM / Average True Range)
-DI = 100 times Exponential Moving Average of (-DM / Average True Range)

Now that -+DX and -DX have been calculated, the last step is calculating the ADX.

ADX = 100 times the Exponential Moving Average of the Absolute Value of (+DI - -DI) / (+DI + -DI)

The basics

DMI has a value between 0 and 100 and is used to measure the strength of the current trend. +DI and -DI are then used to measure direction. When combined, the indicator can provide some valuable insight. A general interpretation would be that during a strong trend (ADX above 25 but dependent on the analyst's interpretation), when the +DI is above the -DI, then a Bullish Market is defined. When -DI is above +DI, then a Bearish Market is at hand.
One thing to be considered is that what DMI values determine, strength or a potential signal, is up to the trader's interpretation. Acceptable values may change depending on the financial instrument being examined, therefore some historical analysis of the instrument in question would be prudent. A technical analyst can make better decisions based on what has occurred in historical examples.

All credit goes to the original script.
ملاحظات الأخبار:
Updated area background shade for bullish or bearish +/-DI.
Added configurable symbols at bullish and bearish crosses.

Run Jimmy boy he cried!!
ملاحظات الأخبار:
Shout out to Jackie La Tits and the Tits Gang!
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟