Volume Weighted TrendOverview
Volume Weighted Trend is a trend-following indicator that combines a Volume Weighted Moving Average (VWMA) with adaptive Average True Range (ATR) bands to identify trend direction and generate entry signals. Unlike a standard moving average, the VWMA gives greater weight to bars with higher trading volume, making the baseline more sensitive to price moves that are backed by real market participation.
How It Works
The indicator calculates a VWMA over a user-defined period. Two ATR-based bands are then plotted above and below it, creating a volatility buffer zone around the trend line.
Trend direction is determined by price position relative to the bands:
When price closes above the upper band, the trend is classified as bullish
When price closes below the lower band, the trend is classified as bearish
The indicator holds the last confirmed direction until the opposite band is breached — this prevents constant signal flipping in sideways markets
A signal is only generated on the first bar of a new trend direction, not on every bar while the trend continues.
Visualization
VWMA Line — the central trend baseline, colored green in uptrends and red in downtrends. An optional glow effect makes it easier to track across busy charts
ATR Bands — upper and lower volatility boundaries. Price must close beyond these to trigger a trend change
Band Fills — semi-transparent ribbons between the VWMA and each band, giving a visual sense of how far price is from the trend center
Bar Coloring — candles are tinted to match the current trend direction
Signal Markers — triangles appear below bars on bullish signals and above bars on bearish signals
Labels — optional price labels print the entry price at each new signal
Settings
VWMA Length — controls the sensitivity of the trend baseline. Default is 34, suitable for swing trading on 4H and Daily charts. Lower values (14–21) suit intraday timeframes. Higher values (55–89) suit position trading on Daily and Weekly charts
ATR Multiplier — controls band width. Lower values (1.0–1.2) produce tighter bands and more frequent signals. Higher values (2.0–3.0) produce wider bands and fewer, higher-conviction signals. Default is 1.5
Source — price input for the VWMA calculation. Default is close
Bullish / Bearish Color — customize signal colors to match your chart theme
Glow Effect — adds layered opacity behind the VWMA line for visual depth
Band Fills — toggles the ribbon shading between bands and the VWMA
Bar Coloring — tints candles to reflect trend direction at a glance
Signal Labels — shows entry price at each new signal
Alerts
Three alert conditions are included:
VWT Bullish — fires when a new bullish trend begins
VWT Bearish — fires when a new bearish trend begins
VWT Trend Change — fires on any direction change
Usage Notes
Works on all markets and timeframes
Best used on liquid instruments where volume data is meaningful. It is not recommended for instruments with unreliable volume data such as some forex pairs on certain brokers
Signals occur on bar close and do not repaint after the bar closes
This indicator does not include stop-loss, take-profit, or filter logic. For a version with ATR-based risk levels, multi-timeframe alignment, ADX, Choppiness Index, and volume confirmation filters, see Volume Weighted Trend Advanced
Chỉ báo Pine Script®






















