erdas0

ADX and SADX, SDI

The indicator aims to analyze and visualize the Average Directional Index (ADX) and its smoothed versions, along with directional indicators (DI) to help traders identify trend strength and potential buy/sell signals.

Indicator Settings:
The indicator is named "ADX and SADX, SDI" and is set to display prices with a precision of 2 decimal places.
Users can customize the ADX smoothing length, DI length, ADX smoothing period, and DI smoothing period through input variables.

Directional Movement (DM) Calculation:
The function dirmov calculates the positive and negative directional movements (DM) and the smoothed values of the positive directional index (DI+) and negative directional index (DI-).
This is done using the average true range (ATR) to normalize the DM values.

Average Directional Index (ADX) Calculation:
The function adx calculates the ADX, which measures the strength of a trend.
It uses the DI+ and DI- values to compute the ADX value.

Smoothed ADX and DI Calculation:
The ADX values are further smoothed using a simple moving average (SMA).
The DI difference is also smoothed and used to determine the trend direction.

Buy and Sell Signals:
A buy signal is generated when the DI+ crosses above DI- and the smoothed DI difference is increasing.
A sell signal is generated when the DI- crosses above DI+ and the smoothed DI difference is decreasing.

Plotting:
The ADX, smoothed ADX, smoothed DI difference (SPM), DI+, and DI- values are plotted on the chart.
Horizontal lines are drawn to indicate threshold levels (e.g., level 22).
Background and bar colors change based on buy (lime) and sell (maroon) signals to visually indicate these conditions.

Purpose of the Code:
This Pine Script code is used to create a custom indicator on TradingView that helps traders identify the strength and direction of a trend. The Average Directional Index (ADX) is used to measure trend strength, while the Directional Indicators (DI+ and DI-) are used to determine the direction of the trend. The smoothed versions of these indicators (SADX and SDI) provide additional confirmation and smoothing to reduce noise and false signals. Traders can use the buy and sell signals generated by this indicator to make informed trading decisions based on the trend strength and direction.

Important Note:
This script is provided for educational purposes and does not constitute financial advice. Traders and investors should conduct their research and analysis before making any trading decisions.
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?