PROTECTED SOURCE SCRIPT
Updated TriWMA (Rolling)

TriWMA (Rolling)
Compute rolling volume-weighted, time-weighted, and TrueRange-weighted moving averages plus dynamic bands over a specified lookback window.
Metrics
• VWMA: Rolling volume-weighted moving average (hlc3 × volume) over the lookback window
• TWMA: Rolling time-weighted moving average (ohlc4) over the lookback window
• TrueWMA: Rolling TrueRange-weighted moving average (TrueMid × TrueRange) over the lookback window
• Bands: Upper and lower envelopes at ±mult × volatility (or ±mult % of WMA in percent mode)
• Lagged SMA: SMA from lookback bars ago
Toggle Options
• Show VWMA | Show V-Bands
• Show TWMA | Show T-Bands
• Show TrueWMA | Show True-Bands
• Show Lagged SMA | Bold Lagged SMA | Shade Between Bands
Underlying Calculations
VWMA
• hlc3 = (high + low + close) ÷ 3
• VWMA = sum(hlc3 × volume, lookback) ÷ sum(volume, lookback)
TWMA
• ohlc4 = (open + high + low + close) ÷ 4
• TWMA = sum(ohlc4, lookback) ÷ lookback
TrueWMA
• range = TrueRange
• mid = TrueMid
• TrueWMA = sum(mid × range, lookback) ÷ sum(range, lookback)
Volatility & Lookback
• Method: Std Dev, MAD, ATR-scaled, Percent
• Lookback bars: number of bars for volatility lookback
Band Widths & Edges
• width = multiplier × volatility (or WMA × mult / 100 in percent mode)
• upper = WMA + width
• lower = WMA − width
Compute rolling volume-weighted, time-weighted, and TrueRange-weighted moving averages plus dynamic bands over a specified lookback window.
Metrics
• VWMA: Rolling volume-weighted moving average (hlc3 × volume) over the lookback window
• TWMA: Rolling time-weighted moving average (ohlc4) over the lookback window
• TrueWMA: Rolling TrueRange-weighted moving average (TrueMid × TrueRange) over the lookback window
• Bands: Upper and lower envelopes at ±mult × volatility (or ±mult % of WMA in percent mode)
• Lagged SMA: SMA from lookback bars ago
Toggle Options
• Show VWMA | Show V-Bands
• Show TWMA | Show T-Bands
• Show TrueWMA | Show True-Bands
• Show Lagged SMA | Bold Lagged SMA | Shade Between Bands
Underlying Calculations
VWMA
• hlc3 = (high + low + close) ÷ 3
• VWMA = sum(hlc3 × volume, lookback) ÷ sum(volume, lookback)
TWMA
• ohlc4 = (open + high + low + close) ÷ 4
• TWMA = sum(ohlc4, lookback) ÷ lookback
TrueWMA
• range = TrueRange
• mid = TrueMid
• TrueWMA = sum(mid × range, lookback) ÷ sum(range, lookback)
Volatility & Lookback
• Method: Std Dev, MAD, ATR-scaled, Percent
• Lookback bars: number of bars for volatility lookback
Band Widths & Edges
• width = multiplier × volatility (or WMA × mult / 100 in percent mode)
• upper = WMA + width
• lower = WMA − width
Release Notes
updated chartProtected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.