OPEN-SOURCE SCRIPT

DWMA & Normalized DWMA St. Dev.

The Distance Weighted Moving Average With Standard Deviations enhanced by Normalizing it (DWMA & NDWMA) is an advanced technical indicator designed to identify trends, potential breakouts, and reversals while accounting for market volatility. By combining a weighted approach to moving averages with dynamic standard deviations and a normalized component, this tool offers a robust framework for both short-term traders and long-term investors. It brings together several layers of trend analysis to provide clearer signals and minimize market noise.

1. DWMA (Distance Weighted Moving Average)
At its core, the DWMA assigns more weight to price points that are closer in value to the current price. Unlike traditional moving averages that focus on time-based proximity, DWMA highlights price similarity, making it more adaptive to sudden changes in the market. This helps to smooth out erratic price movements while staying responsive to meaningful shifts.

2. DWMA SD (Standard Deviation)
The DWMA SD measures how much the DWMA fluctuates from its mean over a specified period. By analyzing these fluctuations, the DWMA SD provides a volatility assessment of the DWMA itself, offering insights into the stability or turbulence of the current trend. This is a critical aspect for traders who want to gauge whether a trend is steady or losing momentum.

3. DWMA WSD (Weighted Standard Deviations)
The DWMA WSD introduces a volatility-based channel around the DWMA by multiplying the standard deviation with user-defined weights. This creates dynamic upper and lower bands, allowing traders to identify potential overbought and oversold conditions. When the price crosses these bands, it signals possible trend reversals or breakout opportunities, helping traders make more informed decisions on entry and exit points.

4. NDWMA (Normalized DWMA)
The Normalized DWMA takes the DWMA one step further by adjusting it relative to the current price level. This normalization ensures that the DWMA remains comparable across different price ranges, whether the asset’s price is high or low. This component is particularly useful for analyzing assets with volatile or widely varying price levels, as it makes trends easier to spot and interpret.

5. NDWMA SD (Standard Deviation)
The NDWMA SD works similarly to the DWMA SD, but it focuses on the volatility of the normalized DWMA. It reflects how much the normalized DWMA fluctuates around its average, providing an additional perspective on market conditions. Traders can use this to detect shifts in the strength of the trend and to anticipate potential changes in direction.

6. Signals
The Signals generated by this indicator combine insights from both the DWMA and NDWMA:

Long Signals (L) occur when the price moves above the DWMA’s upper band and the NDWMA confirms a positive trend. This suggests that the market is gaining momentum, making it a potential buy signal.
Short Signals (S) are triggered when the price falls below the DWMA’s lower band, and the NDWMA shows weakness. This indicates a possible bearish trend, signaling traders to consider selling or shorting.
These signals are designed to filter out false signals and provide more reliable trend confirmations by leveraging the combined power of both moving averages and their volatility bands.


The DWMA & NDWMA indicator provides a sophisticated approach to trend analysis by merging price-weighted moving averages with volatility bands and normalization. Its multi-layered structure offers a detailed perspective on price movements and trends, helping traders identify potential opportunities with greater accuracy.
Trend Analysis

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

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

면책사항