Strategy · Pine Script v6 · Own pane

PVT EMA Cross

by pineforge-4pass· code credited to PineForge contributors 2026

A minimal strategy that compares the Price Volume Trend indicator with a 21-period EMA of itself.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code26
Settings0inputs
LicenceApache-2.0
Last update6 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

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

strategy.pine
// This Pine Script® code is licensed under Apache-2.0
// SPDX-License-Identifier: Apache-2.0
// © PineForge contributors 2026
//
// PF TA-isolate probe — PVT vs its EMA(21) signal cross.
// Isolates ta.pvt (Price-Volume Trend), a cumulative volume-state SERIES
// built-in: pvt += volume * (close - close[1]) / close[1], seeded from the
// first valid bar. It is one of the running volume accumulators (alongside
// ta.obv/accdist/nvi/pvi) and its cumulative seeding + division-by-prev-close
// path has no TradingView-parity coverage in the corpus. Crossing the raw
// cumulative PVT against a 21-EMA of itself drives the only logic so any
// drift is attributable to the ta.pvt series alone.
//@version=6
strategy("PF TA isolate - PVT EMA(21) cross", shorttitle="TAI_PVT",
     overlay=false, initial_capital=1000000,
     commission_type=strategy.commission.percent, commission_value=0, slippage=0,
     default_qty_type=strategy.fixed, default_qty_value=1, pyramiding=1,
     process_orders_on_close=false)

pvt = ta.pvt
sig = ta.ema(pvt, 21)

if ta.crossover(pvt, sig)
    strategy.entry("L", strategy.long, comment="pvt cross up")
if ta.crossunder(pvt, sig)
    strategy.entry("S", strategy.short, comment="pvt cross dn")

Overview

PVT EMA Cross enters long when PVT crosses above the average and short when it crosses below, reversing the position each time. It has no adjustable inputs, no stop loss and no take profit. It is written as an isolated test of the PVT series and shows its strategy output in a separate pane.

Details

Published by

pineforge-4pass on GitHub

Code credit

PineForge contributors 2026, as written in the script's header

Type

Strategy, Pine Script v6

Draws

Separate pane below the chart

Category

Volume

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • The strategy enters trades without a stop loss

Topics

algorithmic-tradingbacktestingparitypine-scriptpinescriptquantitative-financetest-corpustradingview

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

Q-Trend + KVO Strategy

by TradersPost
218 stars

This strategy combines the ATR-banded Q-Trend indicator with the Klinger Volume Oscillator (KVO) to execute confluence trades. It enters long when a Q-Trend buy trigger aligns with a positive KVO value and a bullish candle confirmation, taking short trades und

Strategy v6 TrendVolume
Updated 3 months ago · None stated GitHub repository of Q-Trend + KVO Strategy
106 stars

This strategy calculates and plots aggregated Bitcoin volume collected across multiple exchanges, along with two volume moving averages in a separate pane. It enters long positions when price crosses above a fast EMA while remaining above a slow EMA, and enter

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Aggregate BTC Volume + EMA Strat

BTC Futures MACD

by iamrichardD
57 stars

This strategy plots a MACD oscillator in a separate pane and trades Bitcoin futures from zero-line and signal-line crosses. Optional early momentum signals, a volume filter, and a trend moving-average filter can confirm entries. It sizes positions as fixed con

Strategy v6 Oscillators & momentumMoving averages Repaints
Updated 1 year ago · Apache-2.0 GitHub repository of BTC Futures MACD

RSI-VWAP Indicator

by oguzhandilber
47 stars

This strategy calculates a Relative Strength Index (RSI) applied to the Volume Weighted Average Price (VWAP) rather than standard close values. It plots dedicated long and short RSI-VWAP lines with customizable overbought and oversold thresholds, alongside an

Strategy v4 Oscillators & momentumVolume
Updated 5 years ago · None stated GitHub repository of RSI-VWAP Indicator

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