Indicator · Pine Script v5 · On the chart

Marketman Intraday Profile Indicator

by brandonking078-boop

An indicator for the price chart aimed at index futures such as ES and NQ.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code123
Settings0inputs
LicenceMIT
Last update4 months ago20 Jun 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 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

123 lines of Pine Script v5 from marketman_intraday_profile_indicator.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

marketman_intraday_profile_indicator.pine
//@version=5
indicator("Marketman Intraday Profile Indicator", overlay=true, shorttitle="Mktm Profile Ind", max_labels_count=500)

// --- Compatibility notes -----------------------------------------------------
// TradingView only indicator version.
// Use this script to display session VWAP, VWAP bands, POC/VAH/VAL, PDH/PDL, and session phase shading.
// Adapt for Tradovate / TradeLocker by consuming plotted levels and exported session data.

var string SYMBOL_ROOT = syminfo.root_symbol
bool isES = str.contains(SYMBOL_ROOT, "ES")
bool isNQ = str.contains(SYMBOL_ROOT, "NQ")

float tickSize = isES or isNQ ? 0.25 : syminfo.mintick
float tickValue = isES ? (str.contains(SYMBOL_ROOT, "M") ? 5.0 : 50.0) : isNQ ? (str.contains(SYMBOL_ROOT, "M") ? 0.5 : 20.0) : 1.0

string nySession = "0930-1600"
string lunchSession = "1130-1330"
string pmSession = "1530-1600"

bool inSession = not na(time(timeframe.period, nySession, "America/New_York"))
bool inLunch = not na(time(timeframe.period, lunchSession, "America/New_York"))
bool inPM = not na(time(timeframe.period, pmSession, "America/New_York"))

bool sessionOpen = inSession and not inSession[1]

float pdh = request.security(syminfo.tickerid, "D", high[1], lookahead=barmerge.lookahead_off)
float pdl = request.security(syminfo.tickerid, "D", low[1], lookahead=barmerge.lookahead_off)

float sessionVWAP = ta.vwap
float ema21 = ta.ema(close, 21)
float ema8 = ta.ema(close, 8)
float atr14 = ta.atr(14)
float rsi14 = ta.rsi(close, 14)

bool lowVolatility = atr14 < ta.sma(atr14, 20) * 0.75
int rsiUpper = lowVolatility ? 60 : 70
int rsiLower = lowVolatility ? 40 : 30

var float[] profilePrices = array.new_float()
var float[] profileVolumes = array.new_float()

if sessionOpen
    array.clear(profilePrices)
    array.clear(profileVolumes)

if inSession
    array.push(profilePrices, hlc3)
    array.push(profileVolumes, volume)

f_profile(_prices, _vols, _bins) =>
    float[] bins = array.new_float(_bins, 0.0)
    float priceMin = array.size(_prices) > 0 ? array.min(_prices) : na
    float priceMax = array.size(_prices) > 0 ? array.max(_prices) : na
    if na(priceMin) or na(priceMax) or priceMax == priceMin
        [na, na, na]
    else
        float width = priceMax - priceMin
        float step = width / _bins
        for i = 0 to array.size(_prices) - 1
            float p = array.get(_prices, i)
            float v = array.get(_vols, i)
            int index = int(math.floor((p - priceMin) / step))
            index := math.min(_bins - 1, math.max(0, index))
            array.set(bins, index, array.get(bins, index) + v)
        int pocIndex = 0
        float maxVol = 0.0
        for i = 0 to _bins - 1
            float currentVol = array.get(bins, i)
            if currentVol > maxVol
                maxVol := currentVol
                pocIndex := i
        float totalVol = 0.0
        for i = 0 to _bins - 1
            totalVol += array.get(bins, i)
        float targetVol = totalVol * 0.7
        int lowIndex = pocIndex
        int highIndex = pocIndex
        float running = array.get(bins, pocIndex)
        while running < targetVol and (lowIndex > 0 or highIndex < _bins - 1)
            float leftVol = lowIndex > 0 ? array.get(bins, lowIndex - 1) : -1.0
            float rightVol = highIndex < _bins - 1 ? array.get(bins, highIndex + 1) : -1.0
            if leftVol >= rightVol and lowIndex > 0
                lowIndex -= 1
                running += leftVol
            else if highIndex < _bins - 1
                highIndex += 1
                running += rightVol
            else
                break
        float pocPrice = priceMin + (pocIndex + 0.5) * step
        float vahPrice = priceMin + (highIndex + 1) * step
        float valPrice = priceMin + lowIndex * step
        [pocPrice, vahPrice, valPrice]

float sessionPOC = na
float sessionVAH = na
float sessionVAL = na
if array.size(profilePrices) > 0
    [sessionPOC, sessionVAH, sessionVAL] = f_profile(profilePrices, profileVolumes, 24)

float devSD = ta.stdev(hlc3, 20)
float vwapUpper1 = sessionVWAP + devSD
float vwapUpper2 = sessionVWAP + devSD * 2
float vwapLower1 = sessionVWAP - devSD
float vwapLower2 = sessionVWAP - devSD * 2

plot(sessionVWAP, title="Session VWAP", color=color.blue, linewidth=2)
plot(vwapUpper1, title="VWAP +1σ", color=color.new(color.blue, 80))
plot(vwapLower1, title="VWAP -1σ", color=color.new(color.blue, 80))
plot(vwapUpper2, title="VWAP +2σ", color=color.new(color.blue, 90), linewidth=1)
plot(vwapLower2, title="VWAP -2σ", color=color.new(color.blue, 90), linewidth=1)
plot(sessionPOC, title="Session POC", color=color.orange, linewidth=2)
plot(sessionVAH, title="Session VAH", color=color.green, linewidth=2)
plot(sessionVAL, title="Session VAL", color=color.red, linewidth=2)
plot(pdh, title="Previous Day High", color=color.gray, linewidth=1)
plot(pdl, title="Previous Day Low", color=color.gray, linewidth=1)

bgcolor(inSession ? (inPM ? color.new(color.teal, 90) : inLunch ? color.new(color.yellow, 90) : color.new(color.green, 95)) : na)

var label infoLbl = na
if barstate.islast
    label.delete(infoLbl)
    infoLbl := label.new(bar_index, high, "POC:" + str.tostring(sessionPOC, format.price) + " VAH:" + str.tostring(sessionVAH, format.price) + " VAL:" + str.tostring(sessionVAL, format.price), xloc=xloc.bar_index, yloc=yloc.price, color=color.new(color.black, 90), textcolor=color.white, style=label.style_label_left)

Overview

Marketman Intraday Profile Indicator tracks the New York session, building a session volume profile from price and volume to derive the point of control and value area, and shows session VWAP with bands, previous day high and low, and shading for session phases like lunch. It also computes EMAs, ATR and RSI with thresholds that adapt to low volatility.

Details

Published by

brandonking078-boop on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Volume, Sessions & time, Support & resistance

Markets

Indices

Timeframes

M15-H1

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

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 6 weeks ago · None stated GitHub repository of VP

Midnight VWAP

by TradersPost
218 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 7 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 3 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 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