Indicator · Pine Script v6 · On the chart

Custom Session VWAP

by ryangaraygay

This indicator calculates and plots a Volume Weighted Average Price (VWAP) restricted to a user-defined trading session on the price chart.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code13
Settings2inputs
LicenceMIT
Last update1 year ago10 Apr 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

13 lines of Pine Script v6 from custom-session-vwap.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

custom-session-vwap.pine
//@version=6
indicator(title = "Custom Session VWAP", shorttitle = "CVWAP", overlay = true)

float source = input.source(hlc3, "Source", tooltip="", inline="", group="Volume Weighted Average Price")
string my_session = input.session("0830-1600", title='Custom Session')

timeinrange(res, sess) => not na(time(res, sess))

in_session = timeinrange("1", my_session)

newYorkVwap = ta.vwap(source, in_session[0] and not in_session[1])

plotNewYorkVwap = plot(in_session ? newYorkVwap  : na, "Custom Session VWAP", color.orange, 1, plot.style_linebr, false, 0, 0)

Overview

Custom Session VWAP uses the specified source (default hlc3) to compute the VWAP only while the market is in the custom session (default 0830-1600), then displays the result as an orange line on the chart. The main settings let users select a different source or adjust the session times. The plot appears solely during the active session and disappears outside it. It draws on the price chart without additional panes.

Details

Published by

ryangaraygay on GitHub

Draws

On the price chart

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.

Settings

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

SettingTypeDefaultVariable
Sourcesourcehlc3source
Custom Sessionsession0830-1600my_session
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

VP

by dearvn
257 stars

This indicator calculates and plots a session-based volume profile directly on the price chart. It maps volume distribution across price levels, highlighting key structural reference points including the Point of Control, Value Area High, and Value Area Low. C

Indicator v5 VolumeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of VP

Midnight VWAP

by TradersPost
228 stars

The Midnight VWAP indicator calculates and overlays two distinct Volume Weighted Average Price (VWAP) lines on the price chart based on customizable session timeframes. It tracks an overnight or pre-market session alongside regular trading hours, resetting cal

Indicator v6 Moving averagesSessions & time
Updated 3 months ago · None stated GitHub repository of Midnight VWAP

Moon Dev GEX Arrows

by moondevonyt
92 stars

This overlay indicator plots option strike walls and an optional session VWAP on the price chart for SPY or ES. It spaces major strikes by the selected instrument, draws a set number of strikes on each side, and marks wall-trap and sweep events after a cooldow

Indicator v5 Support & resistanceSessions & time
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Arrows

This overlay indicator draws a volume profile for a chosen trading session directly on the price chart. It plots the point of control, value area high and low, an optional value area box, a live zone, and a session box with labels. Users select Tokyo, London,

Indicator v5 Sessions & timeVolume
Updated 8 weeks ago · None stated GitHub repository of Sessions & VP with prev session VP & daily/weekly opens

LoD Intraday Entry

by ChartsLector
41 stars

This overlay indicator marks the current day's low and a suggested entry zone a fraction of daily ATR below that low. It compares daily volume with a volume moving average, plots daily SMA and EMA distance, and draws an optional ATR-width price cloud. Labels c

Indicator v6 Support & resistanceVolatility & bands
Updated 4 days ago · None stated GitHub repository of LoD Intraday Entry

RS: Market Profile

by agejevasv
12 stars

This indicator plots a Market Profile on the price chart using time-price opportunity letters or symbols. It marks the point of control, a configurable value area, and the initial balance, and it can highlight a volume-profile point of control and session VWAP

Indicator v5 VolumeSupport & resistance
Updated 2 years ago · None stated GitHub repository of RS: Market Profile

More Volume scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

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

Compare brokers