Strategy · Pine Script v6 · On the chart

PineForge Plumbline PVT VWMA

by pineforge-4pass· code credited to PineForge

The strategy calculates a volume-weighted moving average of close prices as the volume-weighted center and a price-volume trend smoothed by EMA as the signal line.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code35
Settings4inputs
LicenceApache-2.0
Last update5 days ago23 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

35 lines of Pine Script v6 from validation/ta-plumbline-pvt-vwma-01/strategy.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.

strategy.pine
//@version=6
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 PineForge
// PineForge Owned Strategy: Plumbline PVT VWMA
// Price-volume accumulation confirms movement above a volume-weighted center.
strategy("PineForge — Plumbline PVT VWMA", overlay=true,
     initial_capital=100000,
     default_qty_type=strategy.fixed, default_qty_value=2,
     pyramiding=0, commission_type=strategy.commission.percent,
     commission_value=0.05, slippage=1,
     margin_long=100, margin_short=100,
     process_orders_on_close=false, calc_on_order_fills=false)

vwmaLength = input.int(33, "VWMA Length", minval=3, group="Trend")
pvtSignalLength = input.int(41, "PVT Signal Length", minval=3, group="Volume Flow")
atrLength = input.int(21, "ATR Length", minval=2, group="Risk")
maximumAtrLoss = input.float(2.2, "Maximum ATR Loss", minval=0.5, step=0.1, group="Risk")

volumeWeightedCenter = ta.vwma(close, vwmaLength)
priceVolumeTrend = ta.pvt
pvtSignal = ta.ema(priceVolumeTrend, pvtSignalLength)
atrValue = ta.atr(atrLength)

confirmedTrend = close > volumeWeightedCenter and priceVolumeTrend > pvtSignal
enterLong = confirmedTrend and not confirmedTrend[1]
trendEnded = close < volumeWeightedCenter or priceVolumeTrend < pvtSignal
riskExceeded = strategy.position_size > 0 and close < strategy.position_avg_price - atrValue * maximumAtrLoss

if strategy.position_size == 0 and enterLong
    strategy.entry("Plumbline Long", strategy.long)
else if strategy.position_size > 0 and (trendEnded or riskExceeded)
    strategy.close("Plumbline Long", comment=riskExceeded ? "ATR risk" : "Weighted trend")

plot(volumeWeightedCenter, "Volume-Weighted Center", color=color.teal)
plot(priceVolumeTrend - pvtSignal, "PVT Distance", color=color.blue, display=display.data_window)

Overview

PineForge Plumbline PVT VWMA plots the VWMA and PVT distance on the price chart. The strategy enters long positions when price exceeds the VWMA and PVT exceeds its signal with no prior confirmation. It exits on trend reversal when price falls below VWMA or PVT falls below signal, or when price reaches ATR-based risk limit below average entry by maximum ATR loss. Position size is fixed at two units with no pyramiding allowed. Primary settings adjust VWMA length, PVT EMA length, ATR length, and maximum ATR loss percentage.

Details

Published by

pineforge-4pass on GitHub

Code credit

PineForge, as written in the script's header

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Trend, Volume, Volatility & bands

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • The strategy enters trades without a stop loss

Topics

algorithmic-tradingbacktestingparitypine-scriptpinescriptquantitative-financetest-corpustradingview

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
VWMA Lengthint33vwmaLength
PVT Signal Lengthint41pvtSignalLength
ATR Lengthint21atrLength
Maximum ATR Lossfloat2.2maximumAtrLoss
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

106 stars

This Pine v4 strategy draws on the price chart and filters breakouts with a fixed Supertrend, ATR length, volume moving-average markup, and moving-average alignment, plus short and long high-low periods. Trade direction defaults to long and can include shorts.

Strategy v4 BreakoutTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Trading - V1

This strategy enters long or short when eight conditions align over the last two bars. It requires EMA 10 and EMA 55 alignment on the one-hour, four-hour and daily charts, a positive ADX slope, matching monitor direction, and price relative to a 400-bar point

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino B002
9 stars

VSA Pro: Trend and Rejection is an overlay strategy combining SuperTrend trend filtering with Volume Spread Analysis principles. It calculates SuperTrend direction to enter long positions when a new bullish trend starts and exits all positions when the trend t

Strategy v5 TrendVolume
Updated 4 months ago · MIT GitHub repository of VSA Pro: Trend and Rejection
8 stars

This overlay strategy combines three distinct SuperTrend levels with multiple moving averages and volume profile analytics on the main price chart. It calculates trend directions using three configurable ATR periods and multipliers alongside SMA, EMA, and HMA

Strategy v5 TrendVolatility & bands
Updated 4 years ago · None stated GitHub repository of ATR 3Lvls VP Strategy
6 stars

Capital41 Fusion Core Strategy is an overlay trading strategy that combines an exponential moving average trend filter, RSI, Williams %R, and volume/ATR expansion into a composite momentum oscillator. It executes long trades when the smoothed oscillator crosse

Strategy v6 TrendOscillators & momentum
Updated 8 weeks ago · MIT GitHub repository of Capital41 Fusion Core Strategy
4 stars

This trend-following strategy generates long and short entries when a fast EMA crosses a slow EMA, overlaying directly on the price chart. To reduce false signals, it applies four configurable fakeout filters: volume moving average threshold, consecutive bar c

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Fakeout-Confirmed Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers