OPEN-SOURCE SCRIPT
ที่อัปเดต: TPO Auction & Value Profile

TPO Auction & Value Profile
Overview
A complete intraday auction-profile engine. For each session it counts how much time price spent at each level — the Time-Price-Opportunity (TPO) distribution — and reads off what an auction cares about: Point of Control (most-traded price), Value Area (central band holding ~70% of activity, with VAH/VAL edges), Initial Balance (the open's framing range), excess tails vs poor unfinished extremes, single prints, and naked POCs (prior fair-value magnets price hasn't revisited). It then layers what a profile alone can't show: the volume POC beside the time POC, an optional buy/sell delta tint per level, prior-day value projected forward, a rolling composite (multi-day) value, and a decision dashboard that turns it all into one at-a-glance verdict. Sessions auto-detect from the instrument's own trading day — no setup.
What makes it different — why these pieces are ONE engine (mashup rationale)
This is the part TradingView asks publishers to justify, so here it is explicitly. Every component answers a different question about the same auction, and each is only meaningful in the presence of the others:
The TPO distribution is the substrate (where did the auction spend time?). POC + Value Area summarise agreed value; Initial Balance frames the open; excess / poor / single prints read the auction's completeness at the edges; naked POCs carry unfinished value forward.
The volume POC is laid over the time POC because time and volume don't always agree on fair value — their divergence is information a pure TPO profile cannot show.
The delta-per-level tint adds who was active (buyers vs sellers) at each price — the order-flow dimension behind the time distribution, reconstructed from lower-timeframe bars.
Prior-day and composite (multi-day) value place today in context: initiative vs responsive, value migration (higher/lower/overlapping) and failed auctions are only definable relative to those references.
The dashboard fuses location, migration, range extension, open type, day type and the rotational TPO count into one bias — the synthesis a stack of separate indicators leaves you to do by eye.
Split apart, each piece is a fragment; together they describe one thing — the shape, location and completeness of the auction. That interdependence is why it's a single engine, not a bundle.
What this adds over a standard TPO / Market Profile script
Most profile scripts stop at drawing the TPO letters/rows, POC, value area and IB. This engine goes well beyond that, and these additions are what make it original:
Auto-session that works where others break. New-session detection keys off a calendar-day change in the instrument's own timezone, so it resets correctly on feeds that have no out-of-session bars (NSE index futures only print 09:15–15:30) — where edge-detection-based scripts silently fail and pile every day into one profile. Zero setup, adapts to any market.
Time POC vs Volume POC divergence. It overlays the volume point of control on the time POC and flags when they disagree — a tradeable tell a time-only profile can't surface.
Delta-per-level (order flow at price). An optional row-colour mode tints each level by net buy/sell delta, reconstructed from lower-timeframe signed volume — showing who was active at each price, not just how long. Rare on TPO tools.
Excess vs poor, done rigorously. A single-print run of ≥ N rows at an extreme is flagged excess (strong rejection / completed auction); a flat multi-TPO extreme is flagged poor (unfinished). Most scripts conflate the two; here they're distinct and coloured differently.
Prior-day value, projected forward. Yesterday's POC/VAH/VAL extend into today as labelled reference lines — the levels every auction trader marks pre-session.
Rolling composite (multi-day) value. A composite POC/VAH/VAL across the last N sessions shows the longer-timeframe balance single-day profiles miss.
Fused decision dashboard. Open type (drive / reject-reverse / auction), day type (balanced … trend), value migration vs prior, range extension vs IB, the rotational TPO count, failed-auction state and a colour-coded bias headline — turning raw structure into one at-a-glance verdict, theme-adaptive to your chart.
Failed-auction detection + alerts. Fires when price breaks prior-day value and closes back inside — the high-probability fade auction theory points to.
Split-profile time colouring. Rows tinted by the bracket that first reached them, exposing migration and double distributions at a glance.
How it works
Session: Auto groups each profile by the instrument's trading day in its native timezone (first/last bars = detected open/close); Manual pins a window. Rows: price is binned (tick multiple, ATR fraction, or fixed step); each bar adds a TPO + its volume + its delta to every row it covered; rows can be coloured by time bracket (split profile), delta, or value area. Value Area grows from the POC to the richer neighbour until the chosen % is enclosed. Structure: a single-print run ≥ N rows at an extreme is excess (strong rejection); a flat multi-TPO extreme is poor (unfinished); TPO count sums TPOs above vs below POC (singles excluded). Analytics: open type, day type, value migration, range extension, failed auctions. Developing vs completed: the live session updates on the forming bar and settles on close; finished sessions are drawn once; naked POCs extend until filled.
How to use
Lead with the dashboard's bias headline, then confirm with structure: value-area edges are acceptance/rejection levels; POC, volume POC and naked POCs are magnets; excess marks completed auctions, poor extremes mark unfinished business price tends to revisit; prior-day and composite value say where today sits; a failed auction back inside value is a high-odds fade. Context for your decisions — not a standalone trigger.
Originality
The auction concepts are public (credited below); the original work is the assembly and the code — auto-session detection that works on instruments with no out-of-session bars, the time-vs-volume POC divergence read, an original delta-per-level reconstruction, the rolling composite, the excess-vs-poor logic, and the fused decision dashboard. No third-party code is reused.
Concept credit
The auction / Market-Profile framework (time-price opportunities, value area, point of control, initial balance, excess, single prints, day/open types) originates with J. Peter Steidlmayer at the Chicago Board of Trade and was developed for traders by James Dalton. Volume-at-price is standard volume-profile practice. Buy/sell classification uses the tick rule (Lee & Ready, 1991).
Honesty / limitations
A TPO profile measures time at price, not size; the volume POC and delta add the volume view, but the delta is a tick-rule estimate from lower-timeframe bars, not true bid/ask data. The composite is a rolling window that refreshes periodically, not a fixed calendar range. Open type and day type are transparent heuristics. Row size changes the picture. Descriptive auction context — it does not predict price.
Disclaimer
Research / educational only. NOT financial advice; no guarantee of profitability. Indicators describe past behaviour. Trading carries risk of loss. Test out-of-sample. The author accepts no liability.
Overview
A complete intraday auction-profile engine. For each session it counts how much time price spent at each level — the Time-Price-Opportunity (TPO) distribution — and reads off what an auction cares about: Point of Control (most-traded price), Value Area (central band holding ~70% of activity, with VAH/VAL edges), Initial Balance (the open's framing range), excess tails vs poor unfinished extremes, single prints, and naked POCs (prior fair-value magnets price hasn't revisited). It then layers what a profile alone can't show: the volume POC beside the time POC, an optional buy/sell delta tint per level, prior-day value projected forward, a rolling composite (multi-day) value, and a decision dashboard that turns it all into one at-a-glance verdict. Sessions auto-detect from the instrument's own trading day — no setup.
What makes it different — why these pieces are ONE engine (mashup rationale)
This is the part TradingView asks publishers to justify, so here it is explicitly. Every component answers a different question about the same auction, and each is only meaningful in the presence of the others:
The TPO distribution is the substrate (where did the auction spend time?). POC + Value Area summarise agreed value; Initial Balance frames the open; excess / poor / single prints read the auction's completeness at the edges; naked POCs carry unfinished value forward.
The volume POC is laid over the time POC because time and volume don't always agree on fair value — their divergence is information a pure TPO profile cannot show.
The delta-per-level tint adds who was active (buyers vs sellers) at each price — the order-flow dimension behind the time distribution, reconstructed from lower-timeframe bars.
Prior-day and composite (multi-day) value place today in context: initiative vs responsive, value migration (higher/lower/overlapping) and failed auctions are only definable relative to those references.
The dashboard fuses location, migration, range extension, open type, day type and the rotational TPO count into one bias — the synthesis a stack of separate indicators leaves you to do by eye.
Split apart, each piece is a fragment; together they describe one thing — the shape, location and completeness of the auction. That interdependence is why it's a single engine, not a bundle.
What this adds over a standard TPO / Market Profile script
Most profile scripts stop at drawing the TPO letters/rows, POC, value area and IB. This engine goes well beyond that, and these additions are what make it original:
Auto-session that works where others break. New-session detection keys off a calendar-day change in the instrument's own timezone, so it resets correctly on feeds that have no out-of-session bars (NSE index futures only print 09:15–15:30) — where edge-detection-based scripts silently fail and pile every day into one profile. Zero setup, adapts to any market.
Time POC vs Volume POC divergence. It overlays the volume point of control on the time POC and flags when they disagree — a tradeable tell a time-only profile can't surface.
Delta-per-level (order flow at price). An optional row-colour mode tints each level by net buy/sell delta, reconstructed from lower-timeframe signed volume — showing who was active at each price, not just how long. Rare on TPO tools.
Excess vs poor, done rigorously. A single-print run of ≥ N rows at an extreme is flagged excess (strong rejection / completed auction); a flat multi-TPO extreme is flagged poor (unfinished). Most scripts conflate the two; here they're distinct and coloured differently.
Prior-day value, projected forward. Yesterday's POC/VAH/VAL extend into today as labelled reference lines — the levels every auction trader marks pre-session.
Rolling composite (multi-day) value. A composite POC/VAH/VAL across the last N sessions shows the longer-timeframe balance single-day profiles miss.
Fused decision dashboard. Open type (drive / reject-reverse / auction), day type (balanced … trend), value migration vs prior, range extension vs IB, the rotational TPO count, failed-auction state and a colour-coded bias headline — turning raw structure into one at-a-glance verdict, theme-adaptive to your chart.
Failed-auction detection + alerts. Fires when price breaks prior-day value and closes back inside — the high-probability fade auction theory points to.
Split-profile time colouring. Rows tinted by the bracket that first reached them, exposing migration and double distributions at a glance.
How it works
Session: Auto groups each profile by the instrument's trading day in its native timezone (first/last bars = detected open/close); Manual pins a window. Rows: price is binned (tick multiple, ATR fraction, or fixed step); each bar adds a TPO + its volume + its delta to every row it covered; rows can be coloured by time bracket (split profile), delta, or value area. Value Area grows from the POC to the richer neighbour until the chosen % is enclosed. Structure: a single-print run ≥ N rows at an extreme is excess (strong rejection); a flat multi-TPO extreme is poor (unfinished); TPO count sums TPOs above vs below POC (singles excluded). Analytics: open type, day type, value migration, range extension, failed auctions. Developing vs completed: the live session updates on the forming bar and settles on close; finished sessions are drawn once; naked POCs extend until filled.
How to use
Lead with the dashboard's bias headline, then confirm with structure: value-area edges are acceptance/rejection levels; POC, volume POC and naked POCs are magnets; excess marks completed auctions, poor extremes mark unfinished business price tends to revisit; prior-day and composite value say where today sits; a failed auction back inside value is a high-odds fade. Context for your decisions — not a standalone trigger.
Originality
The auction concepts are public (credited below); the original work is the assembly and the code — auto-session detection that works on instruments with no out-of-session bars, the time-vs-volume POC divergence read, an original delta-per-level reconstruction, the rolling composite, the excess-vs-poor logic, and the fused decision dashboard. No third-party code is reused.
Concept credit
The auction / Market-Profile framework (time-price opportunities, value area, point of control, initial balance, excess, single prints, day/open types) originates with J. Peter Steidlmayer at the Chicago Board of Trade and was developed for traders by James Dalton. Volume-at-price is standard volume-profile practice. Buy/sell classification uses the tick rule (Lee & Ready, 1991).
Honesty / limitations
A TPO profile measures time at price, not size; the volume POC and delta add the volume view, but the delta is a tick-rule estimate from lower-timeframe bars, not true bid/ask data. The composite is a rolling window that refreshes periodically, not a fixed calendar range. Open type and day type are transparent heuristics. Row size changes the picture. Descriptive auction context — it does not predict price.
Disclaimer
Research / educational only. NOT financial advice; no guarantee of profitability. Indicators describe past behaviour. Trading carries risk of loss. Test out-of-sample. The author accepts no liability.
Release Note
TPO Auction & Value Profile — upgrade noteThree auction-native upgrades, built purely from the profile's own data (no VWAP, no foreign overlays):
Profile-shape grammar — auto-classifies the distribution as Normal/D, P (short-covering), b (long-liquidation), or Double (trend).
Rotation factor — Dalton's directional conviction, scoring each bracket's higher/lower high-and-low across the session.
Value-edge acceptance harness — the suite's honest Hit/Base/Edge calibration on prior-VAH/VAL tags: how often value rejects to POC before accepting beyond, on your instrument. New rejection alert.
Dashboard now 21 rows (shape / rotation / VA-edge fade added), joining the earlier volume value area, HVN/LVN nodes and 80% rule. Title stays universal-terms, all toggles default ON, NIFTY defaults, adaptive table
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน