BackQuant

DEMA Adjusted Average True Range [BackQuant]

The use of the Double Exponential Moving Average (DEMA) within your Adjusted Average True Range (ATR) calculation serves as a cornerstone for enhancing the indicator's responsiveness to market changes. To delve deeper into why DEMA is employed specifically in the context of your ATR calculation, let's explore the inherent qualities of DEMA and its impact on the ATR's performance.

DEMA and Its Advantages
As previously mentioned, DEMA was designed to offer a more responsive alternative to the traditional Exponential Moving Average (EMA). By giving more weight to recent price data, DEMA reduces the lag typically associated with moving averages. This reduction in lag is especially beneficial for short-term traders looking to capitalize on trend reversals and other market movements as swiftly as possible.

The calculation of DEMA involves the following steps:
Calculate EMA1: This is the Exponential Moving Average of the price.
Calculate EMA2: This is the Exponential Moving Average of EMA1, thus it is a smoothing of a smoothing, leading to a greater lag.
Formulate DEMA: The formula
EMA1 = EMA of price
EMA2 = EMA of EMA1
DEMA = (2 x EMA1) - EMA2
effectively doubles the weighting of the most recent data points by subtracting the lagged, double-smoothed EMA2 from twice the single-smoothed EMA1.
This process enhances the moving average's sensitivity to recent price movements, allowing the DEMA to adhere more closely to the price bars than either EMA1 or EMA2 alone.

Integration with ATR
In the context of your ATR calculation, the integration of DEMA plays a crucial role in defining the indicator's core functionality. Here's a detailed explanation of how DEMA affects the ATR calculation:

Initial Determination of DEMA: By applying the DEMA formula to the chosen source data (which can be adjusted to use Heikin Ashi candle close prices for an even smoother analysis), you set a foundation for a more reactive trend-following mechanism within the ATR framework.
Application to ATR Bands: The calculated DEMA serves as the central line from which the ATR bands are derived. The ATR value, multiplied by a user-defined factor, is added to and subtracted from the DEMA to form the upper and lower bands, respectively. This dynamic adjustment not only reflects the volatility based on the ATR but does so in a way that is closely aligned with the most recent price action, thanks to the utilization of DEMA.
Enhanced Signal Quality: The responsiveness of DEMA ensures that the ATR bands adjust more promptly to changes in market conditions. This quality is vital for traders who rely on the ATR bands to identify potential entry and exit points, trend reversals, or to assess market volatility.

By employing DEMA as the core component in calculating the Adjusted Average True Range, your indicator leverages DEMA's reduced lag and increased weight on recent data to provide a more timely and accurate measure of market volatility. This innovative approach enhances the utility of the ATR by making it not only a tool for assessing volatility but also a more reactive indicator for trend analysis and trading signal generation.

The main concept of combining these is to reduce lag, get a more robust signal and still capture clear trends over medium time horizons.
For me, this is best used in confluence with other indicators, it can be made faster in order to get fasters response time, or slower. This is all depending on the needs of you as a trader.

User Inputs:
The script offers several user-configurable inputs, such as the period lengths for DEMA and ATR calculations, the multiplication factor for the ATR, and options to use Heikin Ashi candles or standard price data. Additionally, it allows for the toggling of visual features, like the plotting of the DEMA ATR and its moving average, and the application of color-coded trends on price bars.

Additional Features:
Moving Average Confluence: Traders can opt to display a moving average of the DEMA ATR, choosing from various types (e.g., SMA, EMA, HMA). This feature provides a layer of confluence, aiding in the identification of trend direction and strength.

Trend Identification:
The script employs logical conditions to ascertain the trend direction based on the movement of the DEMA ATR. It assigns colors to represent bullish or bearish trends, which are reflected in the plotted lines and the coloring of price bars.

Alerts:
Customizable alert conditions for trend reversals enhance the utility of the indicator for active trading, notifying users of significant changes in trend direction.

1D Backtests
We include these backtests as a general proxy for how they work.
Please do your own calibrating to suit it to your own needs and backtest.
Past results don't = future results but they can help you understand how it functions.
BTCUSD
ETHUSD
SOLUSD

오픈 소스 스크립트

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

면책사항

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

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