Indicator · Pine Script v5 · On the chart

Naked Intrabar POC

by regalouisei· code credited to rumpypumpydumpy

Naked Intrabar POC is a price-chart indicator that estimates each bar's point of control from lower-timeframe samples.

View on GitHub

GitHub stars2on the repository
Pine versionv5runs as is
Lines of code144
Settings13inputs
LicenceNone statedfile: MPL-2.0
Last update8 months ago25 Feb 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

144 lines of Pine Script v5 from pinescript/editors_picks/naked-intrabar-poc.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

naked-intrabar-poc.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © rumpypumpydumpy

//@version=5
indicator("Naked Intrabar POC", overlay = true, max_lines_count = 500)

// -----------------------------------------------------------------------------

inp_tf =            input.timeframe("1",        title = "Sampling lower timeframe")
inp_num_bins =      input.int(250,              title = "Sample bins")
inp_type =          input.string("Time",        title = "POC Type",                 options = ["Time", "Volume"])
inp_hide_hit =      input.bool(false,           title = "Only Display Naked POCs?")
inp_hit_col =       input.color(color.gray,     title = "POC Hit color")
inp_naked_col =     input.color(color.blue,     title = "Naked POC color")
inp_linewidth =     input.int(1,                title = "POC line width")
inp_linestyle =     input.string("Dashed",      title = "POC Line style",           options = ["Solid", "Dotted", "Dashed"])
inp_extend_poc =    input.bool(true,            title = "Extend Naked POCs?")
inp_poc_dot_color = input.color(color.yellow,   title = "Intrabar POC dot color")
inp_show_hv_npoc =  input.bool(false,           title = "Display highest volume Naked POC?")
inp_hv_npoc_lb =    input.int(30,               title = "Highest Volume Naked POC lookback", maxval = 500)
inp_hv_npoc_col =   input.color(color.red,      title = "Highest Volume Naked POC color")

// -----------------------------------------------------------------------------

[intrabar_highs, intrabar_lows, intrabar_vol] = request.security_lower_tf(syminfo.tickerid, inp_tf, [high, low, volume])

poc_linestyle = switch inp_linestyle
    "Solid" =>  line.style_solid
    "Dotted" => line.style_dotted
    "Dashed" => line.style_dashed

float intrabar_poc = na

// -----------------------------------------------------------------------------

size = array.size(intrabar_highs)

if size > 0

    float[] tpo_bins = array.new_float()

    for i = 0 to inp_num_bins - 1
        array.push(tpo_bins, 0)

    inc = (high - low) / inp_num_bins
    num_vals = array.size(intrabar_highs)
    for i = 0 to inp_num_bins - 1
        bin_bottom = low + i * inc
        bin_top = bin_bottom + inc

        for j = 0 to num_vals - 1
            intrabar_high = array.get(intrabar_highs, j)
            intrabar_low = array.get(intrabar_lows, j)
            intrabar_volume = inp_type == "Time" ? 1 : array.get(intrabar_vol, j)
            
            inside_bin = intrabar_high <= bin_top and intrabar_low >= bin_bottom
            spans_bin = intrabar_high > bin_top and intrabar_low < bin_bottom
            up_bin = intrabar_high > bin_bottom and intrabar_high < bin_top and intrabar_low < bin_bottom
            dn_bin = intrabar_low < bin_top and intrabar_low > bin_bottom and intrabar_high > bin_top
            
            if inside_bin
                current = array.get(tpo_bins, i)
                array.set(tpo_bins, i, current + (1 * intrabar_volume))
            else if spans_bin
                current = array.get(tpo_bins, i)
                val = (bin_top - bin_bottom) / (intrabar_high - intrabar_low) * intrabar_volume
                array.set(tpo_bins, i, current + val)
            else if up_bin
                current = array.get(tpo_bins, i)
                val = (intrabar_high - bin_bottom) / (intrabar_high - intrabar_low) * intrabar_volume
                array.set(tpo_bins, i, current + val)
            else if dn_bin
                current = array.get(tpo_bins, i)
                val = (bin_top - intrabar_low) / (intrabar_high - intrabar_low) * intrabar_volume
                array.set(tpo_bins, i, current + val)
    
    poc_val = array.max(tpo_bins)
    poc_index = array.indexof(tpo_bins, poc_val)
    
    intrabar_poc := low + inc * (poc_index + 0.5)

// -----------------------------------------------------------------------------
    
plot(intrabar_poc, color = inp_poc_dot_color, linewidth = 2, style = plot.style_circles, title = "Intrabar POC")

var line[]  poc_lines = array.new_line()
var bool[]  poc_hit = array.new_bool()
var int[]   poc_index = array.new_int()
var float[] volume_vals = array.new_float()


if array.size(poc_lines) > 0
    for i = array.size(poc_lines) - 1 to 0
        temp_line = array.get(poc_lines, i)
        temp_poc_price = line.get_y1(temp_line)
        if low <= temp_poc_price and high >= temp_poc_price and not array.get(poc_hit, i)
            if inp_hide_hit
                array.remove(poc_hit, i)
                line.delete(temp_line)
                array.remove(poc_lines, i)
                array.remove(poc_index, i)
                array.remove(volume_vals, i)
            else
                array.set(poc_hit, i, true)
                line.set_color(temp_line, color = inp_hit_col)
                line.set_extend(temp_line, extend = extend.none)
                line.set_x2(temp_line, x = bar_index)

array.unshift(poc_lines, line.new(x1 = bar_index, y1 = intrabar_poc, x2 = bar_index + 1, y2 = intrabar_poc, color = inp_naked_col, style = poc_linestyle, width = inp_linewidth, extend = inp_extend_poc ? extend.right : extend.none))
array.unshift(poc_hit, false)
array.unshift(poc_index, bar_index)
array.unshift(volume_vals, volume)

if array.size(poc_lines) > 500
    temp_line = array.pop(poc_lines)
    line.delete(temp_line)
    array.pop(poc_hit)
    array.pop(poc_index)
    array.pop(volume_vals)

if array.size(poc_lines) > 0
    for i = 0 to array.size(poc_lines) - 1
        temp_line = array.get(poc_lines, i)
        if array.get(poc_hit, i) == false
            line.set_x2(temp_line, x = bar_index + 1)

float highest_npoc_volume = 0.0
float hv_npoc = na

if array.size(poc_index) > 0
    for i = 0 to array.size(poc_index) - 1
        temp_index = array.get(poc_index, i)
        temp_volume = array.get(volume_vals, i)
        if temp_index >= bar_index - inp_hv_npoc_lb
            if temp_volume > highest_npoc_volume and not array.get(poc_hit, i)
                highest_npoc_volume := temp_volume
                hv_npoc := intrabar_poc[bar_index - temp_index]
        else
            break

plot(inp_show_hv_npoc ? hv_npoc : na, linewidth = 2, style = plot.style_circles, color = inp_hv_npoc_col, title = "Highest Volume Naked POC")

// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------

Overview

Naked Intrabar POC splits the bar range into bins and accumulates either time or volume from those samples, then draws the resulting level as a line. Hit and naked levels use different colors, and naked lines can be hidden or extended forward. Settings change the sample timeframe, bin count, line style, and an optional highest-volume naked level over a lookback. Yellow dots mark the intrabar point of control.

Details

Published by

regalouisei on GitHub

Code credit

rumpypumpydumpy, as written in the script's header

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Volume, Support & resistance

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
Sampling lower timeframetimeframe1inp_tf
Sample binsint250inp_num_bins
POC TypestringTimeinp_type
Only Display Naked POCs?boolfalseinp_hide_hit
POC Hit colorcolorcolor.grayinp_hit_col
Naked POC colorcolorcolor.blueinp_naked_col
POC line widthint1inp_linewidth
POC Line stylestringDashedinp_linestyle
Extend Naked POCs?booltrueinp_extend_poc
Intrabar POC dot colorcolorcolor.yellowinp_poc_dot_color
Display highest volume Naked POC?boolfalseinp_show_hv_npoc
Highest Volume Naked POC lookbackint30inp_hv_npoc_lb
Show all 13 settings
SettingTypeDefaultVariable
Highest Volume Naked POC colorcolorcolor.redinp_hv_npoc_col
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

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

MGIC-tracker

by Allen1212
303 stars

The MGIC-tracker is a TradingView indicator that overlays ARK Invest trade records onto stock price charts. It plots buy and sell labels at the exact timestamp of each transaction, showing share volume and ETF weight. Users select a specific ETF type via setti

Indicator v4 Support & resistanceVolume
Updated 2 years ago · None stated GitHub repository of MGIC-tracker
218 stars

Comprehensive Volume Profile is an overlay indicator that calculates and plots volume distribution across specified time ranges such as daily sessions, weekly, monthly, or custom bar lengths. It identifies key structural price levels including the Point of Con

Indicator v6 VolumeSupport & resistance
Updated 3 months ago · None stated GitHub repository of Comprehensive Volume Profile

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 8 weeks ago · Custom licence GitHub repository of Moon Dev GEX Arrows

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