Indicator · Pine Script v6 · On the chart

SUMMARY

by ryangaraygay· code credited to swoozshies

This indicator aggregates multiple technical signals into an on-chart summary table.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code121
Settings9inputs
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

121 lines of Pine Script v6 from summary-table.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

summary-table.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © swoozshies

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

atr_length = input.int(14, "ATR Length")

var string GP2 = "Display"
string  tableYposInput = input.string("top", "Panel position", inline = "11", options = ["top", "middle", "bottom"], group = GP2)
string  tableXposInput = input.string("right", "", inline = "11", options = ["left", "center", "right"], group = GP2)
var table panel = table.new(tableYposInput + "_" + tableXposInput, 2, 13, border_color = color.new(color.gray, 80), border_width = 1)

atr = ta.atr(atr_length)

// below or above custom VWAP - unfortunately best way to recalculate
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])
vwapValue = in_session ? newYorkVwap  : na

// price-volume
bv = (close-open) * volume // body x volume
bv_length = 21 // TODO input
bvema1 = ta.ema(bv, bv_length)
bvema2 = ta.ema(bvema1, bv_length)
bvema3 = ta.ema(bvema2, bv_length)
bvout = 3 * (bvema1 - bvema2) + bvema3

b = math.abs(bvout)
b2 = math.abs(bvout[1])
b3 = math.abs(bvout[2])

messy = 1500 // TODO input messy
isMessy = b < messy and b2 < messy and b3 < messy

pricevolume_color = bvout > 0 ? color.green : color.red

// ema-band
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)

// donchian
length = input(20, title="Channel Length")
lower_tf = input.timeframe("1", title="Lower Timeframe")

[lower_tf_upper, lower_tf_lower] = request.security(syminfo.tickerid, lower_tf, [ta.highest(high, length), ta.lowest(low, length)])

var string lastSignalType = ""
if (lower_tf_upper > lower_tf_upper[1])
    lastSignalType := "long"
else if (lower_tf_lower < lower_tf_lower[1])
    lastSignalType := "short"

vwap_diff = close - vwapValue
vwap_score = na(vwap_diff) ? 0 : (vwap_diff > 0 ? 1 : -1)
vwap_color = vwap_score == 0 ? color.black : (vwap_score > 0 ? color.green : color.red)

emaband_diff = ema9 - ema21
emaband_score = emaband_diff > 0 ? 1 : -1
emaband_color = emaband_score == 1 ? color.green : color.red

pricevolume_score = (isMessy or bvout ==0) ? 0 :(bvout > 0 ? 1 : -1)

// donchian relative position and score
A = lower_tf_lower
B = lower_tf_upper
C = close
rng = B - A
relative_position = (C - A) / rng
percentage = relative_position * 100
donchian_diff = percentage
donchian_score = (lastSignalType == "long" ? 1 : -1)
donchian_color = donchian_score == 1 ? color.green : color.red

string openrange_session = input.session("0830-0845", title='Opening Range Session')
in_openrange_session = timeinrange(timeframe.period, openrange_session)

string post_openrange_session = input.session("0846-1600", title='Opening Range Session')
in_post_openrange_session = timeinrange(timeframe.period, post_openrange_session)

is_new_session(res, sess) =>
    t = time(res, sess)
    na(t[1]) and not na(t) or t[1] < t

new_openrange_session = is_new_session("1440", openrange_session)

var float reg_high = close
var float reg_low = close
reg_high := new_openrange_session ? high : in_openrange_session ? math.max(high, reg_high[1]) : reg_high[1]
reg_low := new_openrange_session ? low : in_openrange_session ? math.min(low, reg_low[1]) : reg_low[1]

ref_close = close
openrange_diff = ref_close > reg_high[0] ? (ref_close - reg_high[0]) : (ref_close < reg_low[0] ? ref_close - reg_low[0] : na)
openrange_score = na(openrange_diff) ? 0 : (openrange_diff > 0 ? 1 : -1)
openrange_color = (openrange_score == 0 or not in_post_openrange_session) ? color.black : (openrange_score == 1 ? color.green : color.red)

trend_score = vwap_score + emaband_score + pricevolume_score + donchian_score + (in_post_openrange_session ? openrange_score : 0)
trend_color = trend_score == 0 ? color.black : trend_score > 0 ? color.from_gradient(trend_score, 0, 4, color.white, color.green) : color.from_gradient(trend_score, -4, 0, color.red, color.white)
trend_text = (trend_score == 0 ? "" : (trend_score > 0 ? "+" : "-")) + str.tostring(math.abs(trend_score), "#")

if barstate.isconfirmed
    table.cell(panel, 0, 0, "trend", text_size = size.normal, text_color = trend_color, text_halign = text.align_right)
    table.cell(panel, 1, 0, trend_text, text_color = trend_color, text_size = size.huge)
    table.cell(panel, 0, 1, "price-volume", text_size = size.small, text_color = pricevolume_color, text_halign = text.align_right)
    table.cell(panel, 1, 1, str.tostring(bvout, "####"), text_size = size.small, text_color = pricevolume_color)
    table.cell(panel, 0, 2, "donchian %", text_size = size.small, text_color = donchian_color, text_halign = text.align_right)
    table.cell(panel, 1, 2, str.tostring(donchian_diff, "#"), text_size = size.small, text_color = donchian_color)
    table.cell(panel, 0, 3, "ema diff", text_size = size.small, text_color = emaband_color, text_halign = text.align_right)
    table.cell(panel, 1, 3, str.tostring(emaband_diff, "#0"), text_size = size.small, text_color = emaband_color)
    table.cell(panel, 0, 4, "vwap diff", text_size = size.small, text_color = vwap_color, text_halign = text.align_right)
    table.cell(panel, 1, 4, str.tostring(vwap_diff, "#0"), text_size = size.small, text_color = vwap_color)
    table.cell(panel, 0, 5, "openrange diff", text_size = size.small, text_color = openrange_color, text_halign = text.align_right)
    table.cell(panel, 1, 5, str.tostring(openrange_diff, "#0"), text_size = size.small, text_color = openrange_color)
    table.cell(panel, 0, 6, "atr", text_size = size.normal, text_halign = text.align_right)
    table.cell(panel, 1, 6, str.tostring(atr, "#0.00"), text_color = color.black, text_size = size.large)

trend_changed = trend_score != trend_score[1]
alertcondition(barstate.isconfirmed and trend_changed, "Trend Change alert", "A change in cumulative trend has been detected.")

Overview

SUMMARY calculates a session-based VWAP, a triple-EMA-smoothed price-volume oscillator, an EMA 9/21 trend spread, multi-timeframe Donchian channel breakouts, and an opening range high/low structure. Each metric generates directional scores and color codes that display within the dashboard table. Inputs allow configuration of panel placement, ATR length, session hours, channel periods, and the reference lower timeframe.

Details

Published by

ryangaraygay on GitHub

Code credit

swoozshies, as written in the script's header

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Screeners & dashboards, Sessions & time, Trend, Volume

Markets

Stocks, Indices

Timeframes

M1-M5, 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.

Settings

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

SettingTypeDefaultVariable
ATR Lengthint14atr_length
Panel positionstringtoptableYposInput
tableXposInputstringrighttableXposInput
Sourcesourcehlc3source
Custom Sessionsession0830-1600my_session
Channel Lengthint20length
Lower Timeframetimeframe1lower_tf
Opening Range Sessionsession0830-0845openrange_session
Opening Range Sessionsession0846-1600post_openrange_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

Equity Intraday Analyst

by chris-c-thomas
14 stars

Equity Intraday Analyst is a comprehensive intraday overlay indicator for US equities and ETFs. It evaluates multi-EMA ribbons, session-anchored VWAP bands, OBV trends, momentum oscillators, TTM Squeeze, and optional market breadth indicators like NYSE TICK an

Indicator v6 TrendVolume
Updated 6 months ago · MIT GitHub repository of Equity Intraday Analyst
257 stars

This indicator overlays an intraday SPX and ES chart with a midnight session range, regular-trading-hours opening levels, and a VWAP projection box. It draws the midnight high, mid, and low, flags edge rejections within an absolute tolerance, and plots optiona

Indicator v6 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of SPX Midnight Box + Snag Logic
92 stars

This indicator classifies the market into gamma regime types (negative gamma trend, positive gamma mean-reversion, or transition) by calculating a composite score based on daily ATR ratios, session VWAP crossover frequencies, and opening range displacement. It

Indicator v5 Volatility & bandsTrend
Updated 8 weeks ago · Custom licence GitHub repository of Moon Dev GEX Regime & Trap
9 stars

Peak Trading Activity Graphs displays historical market activity across cyclical timeframes directly on the main chart using an on-screen dashboard table. It evaluates volume or volatility across selected periods, including hours of the day, days of the week,

Indicator v6 VolumeVolatility & bands
Updated 4 months ago · MIT GitHub repository of Peak Trading Activity Graphs [LuxAlgo]
9 stars

Smart Money Dashboard plots key Smart Money Concepts on the price chart, including Order Blocks with mitigation tracking, Fair Value Gaps, and Equal Highs or Lows sweeps. It analyzes Cumulative Volume Delta for divergence and combines multi-timeframe structure

Indicator v6 SMC / ICT / price actionVolume
Updated yesterday · MIT GitHub repository of Smart Money Dashboard

This indicator overlays a market structure dashboard on the price chart. It reads up to seven user-selected timeframes, each with an on/off switch and a trend weight, and shows columns for EMA trend, swing highs and lows, structure, order blocks, and fair valu

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 3 months ago · None stated GitHub repository of Market Structure Dashboard | Flux Charts

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