OPEN-SOURCE SCRIPT
ATR Delta

ATR Delta is a volatility oscillator that separates the Average True Range into its up- and down-move components instead of showing a single combined value. It's built for anyone who wants to see whether current volatility is being driven more by up bars or by down bars, rather than only how large that volatility is overall — for example to judge whether a rise or a drop in volatility comes from bullish or bearish price action. Each bar's true range is assigned to the up or down side depending on whether the bar closed higher or lower than the previous close, and both sides are then smoothed independently using the same RMA-based method the classic ATR uses. The smoothing length and the two fill colors can be freely adjusted.
Calculation
Length: number of bars used to smooth the directional true range.
Appearance
Bull / Bear: two colors: one for the area between the Up line and the Delta line, the other for the area between the Delta line and the Down line.

The indicator plots two smoothed lines — one for the true range on up bars, one for the true range on down bars, mirrored below the zero line — plus a delta line placed exactly between them. The delta line sits above zero when the up side currently has more true range than the down side, and below zero when the down side has more; the further it moves from zero, the larger that imbalance. The area between the upper line and the delta line is filled in Bull Color, and the area between the delta line and the lower line is filled in Bear Color. A bar with an unchanged close is always counted on the up side.

This indicator is intended solely for market analysis and does not constitute investment advice or a guarantee of success. Use it at your own discretion and risk; past results are not indicative of future performance.
Calculation
Length: number of bars used to smooth the directional true range.
Appearance
Bull / Bear: two colors: one for the area between the Up line and the Delta line, the other for the area between the Delta line and the Down line.
The indicator plots two smoothed lines — one for the true range on up bars, one for the true range on down bars, mirrored below the zero line — plus a delta line placed exactly between them. The delta line sits above zero when the up side currently has more true range than the down side, and below zero when the down side has more; the further it moves from zero, the larger that imbalance. The area between the upper line and the delta line is filled in Bull Color, and the area between the delta line and the lower line is filled in Bear Color. A bar with an unchanged close is always counted on the up side.
This indicator is intended solely for market analysis and does not constitute investment advice or a guarantee of success. Use it at your own discretion and risk; past results are not indicative of future performance.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。