Indicator · Pine Script v6 · On the chart

Trade Value

by barnett-yuxiang· code credited to yuli-kamakura

This indicator calculates a trade value for each bar by multiplying volume by the average of open, high, low, and close.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code17
Settings0inputs
LicenceNone statedfile: MPL-2.0
Last update1 year ago3 Mar 2025

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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

17 lines of Pine Script v6 from Trade-Value-Display.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

Trade-Value-Display.pine
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © yuli-kamakura

//@version=6
indicator("Trade Value", overlay=true)

// Using ohlc4 (open+high+low+close)/4 for a more comprehensive average price calculation
// ohlc4 is a built-in variable that equals (open + high + low + close) / 4
tradeValue = volume * ohlc4

plot(
     tradeValue,
     title   = "Trade Value",
     format  = format.volume,
     color   = color.new(color.red, 100),  // 100% transparent
     style   = plot.style_line,
     linewidth = 1)

Overview

Trade Value plots that series on the price chart with a fully transparent line so the chart stays visually clear while the value remains readable in the Data Window. The plot uses volume formatting. There are no user inputs, signals, or trading rules.

Details

Published by

barnett-yuxiang on GitHub

Code credit

yuli-kamakura, as written in the script's header

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Volume

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

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

Calculates an Elastic Volume Weighted Moving Average (EVWMA), incorporating trading volume to dynamically adjust moving average responsiveness over a specified lookback length. It plots directly on the price chart as a single moving average line. Optional colo

Indicator v4 Moving averagesVolume
Updated 10 days ago · GPL-3.0 GitHub repository of Elastic Volume Weighted Moving Average

This overlay indicator screens a pasted list of up to forty symbols and draws a table on the price chart. It classifies bullish or bearish setups from the percent change between the current candle and the candle 250 bars back, then shows RSI with a simple movi

Indicator v5 Oscillators & momentumVolume
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - Ankush Bajaj Momentum Investing Setup

This overlay indicator draws a fixed-range volume profile on the price chart, splitting traded activity into up and down volume at each price level. It also plots a sentiment profile, a developing point of control, and value-area high and low around a configur

Indicator v5 VolumeSupport & resistance
Updated 2 months ago · MIT GitHub repository of Volume Profile and Indicator by DGT

META-tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest buy and sell events for META on the price chart. It places green labels below bars for purchases and red labels above bars for sales, with a same-day count of how many selected ARK ETFs traded the stock. The ETF in

Indicator v4 Volume
Updated 2 years ago · None stated GitHub repository of META-tracker
219 stars

An educational Pine Script v4 indicator demonstrating how to plot volume histograms on the main price chart using unscaled axes. The code includes examples and commented templates for creating vertical line markers at specific dates or time zones, such as mark

Indicator v4 Sessions & timeVolume
Updated 5 years ago · None stated GitHub repository of 教學-畫垂直線1

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers