OPEN-SOURCE SCRIPT
업데이트됨 Volume Profile Multi-Mode

DESCRIPTION
VP Multi-Mode builds a volume-by-price profile from REAL traded volume and lets you choose, from one dropdown, what stretch of the chart each profile covers.
WHAT A VOLUME PROFILE IS (skip if you know) A normal chart shows how much volume traded per unit of TIME — the bars along the bottom. A volume profile flips that: it shows how much volume traded at each PRICE. The result is a sideways histogram. Long bars are prices where a lot of business got done; short bars are prices the market passed through quickly. Traders use the fat areas as reference (price tends to revisit and pause there) and the thin areas as places price tends to move through fast.
Three levels come out of it:
POC (Point of Control) — the single price bin with the most volume. The fairest price of that range by traded-volume consensus.
VAH / VAL (Value Area High / Low) — the band around the POC containing a chosen share of the range's volume (70% by default, the Market Profile convention). Inside the value area = accepted price; outside = the market is exploring.
WHAT MAKES THIS ONE DIFFERENT
Real volume, not an approximation. Each chart bar is decomposed into intrabar sub-bars (1-minute by default) via request.security_lower_tf(), and each sub-bar's ACTUAL reported volume is distributed into the price grid. It does not use tick data and it does not use the up/down-tick estimate that the built-in SVP relies on. You can also choose how a sub-bar's volume is spread:
Range/Uniform (default, the honest one) — spread evenly over every bin the sub-bar's low-to-high touched.
Close — dump the whole sub-bar's volume in its closing-price bin.
Five range modes in one script. Most profile tools pick one anchoring scheme. This one lets you switch:
Time Window — any HHMM start/end, wraps past midnight.
Session Open->Close — Asia / London / US, each with editable open and close times. One profile per selected session per day.
External Swing — anchors between an external higher-high (a pivot high above the previous pivot high, i.e. liquidity taken above) and an external lower-low. Strictly point-in-time: a pivot is only used once confirmed.
Manual Drag — two click-to-place time handles, the Pine analog of dragging the built-in SVP's handles.
Weekly + N Days — anchored at the Monday 09:30 ET cash open and running to (that Monday + 7 + N) days. Rolling, so these profiles deliberately overlap.
Optional volume delta, labelled honestly. Turn on Show Volume Delta and each bin is coloured by net buying vs selling, with the profile's total delta printed on the POC label. This is a BAR-CLASSIFIED PROXY: each 1-minute sub-bar's real volume is signed by its own close-vs-open direction. It is NOT true aggressor / bid-ask delta — no tick or order-book data is used, and it cannot tell who lifted the offer from who hit the bid inside a sub-bar. It is stated that way in the tooltip too.
Placement that sits on the price action. The histogram is anchored to the range's right edge and grows LEFT across the candles by default, so it overlays the bars it was built from instead of being parked in the right margin. Anchor edge, direction, width and offset are all inputs. Everything is drawn on bar_index, so it does not drift when you zoom.
HOW TO USE
Quick start: add it to the chart and leave everything alone. You get the US cash session (09:30-16:00 ET) profiled once per day for the last 12 days, POC as a solid red line, VAH/VAL as dashed orange lines, and the value area shaded.
Then adjust in this order:
Pick the range that matches your question (Range Mode group).
"Where is value for today's session?" -> Session Open->Close, US.
"What did the overnight build?" -> Session Open->Close, Asia (or Time Window with your own hours).
"Where did volume sit across this leg up?" -> External Swing.
"Just profile this bit here" -> Manual Drag, then click the two handles on the chart when prompted.
"Where is the week's value, with carry-over into the next few days?" -> Weekly + N Days.
Set resolution and detail (Engine group).
Intrabar resolution: 1 minute is the default and works on most charts. Finer (e.g. 1S) is more faithful but TradingView only serves intrabar data for a limited number of recent bars, so finer settings shorten how far back profiles can be built.
Price bins: 25 default. More bins = finer profile, but see the limit below.
Value Area %: 70 is the convention; lower it to see a tighter core of value.
Timezone: America/New_York by default, since the session presets are ET.
Fit it to your chart (Display group). Profile extension sets how many bars wide the POC bin is drawn; the rest scale to their volume. Profile offset nudges the whole thing left or right. Extend direction flips it between overlaying the candles and sitting in the empty margin.
Optional: turn on Show Volume Delta to colour bins green/red by net direction and read the range's total delta off the POC label — bearing in mind the proxy caveat above.
READING IT
Price accepted inside the value area, POC flat and centred -> balanced/rotational; the edges (VAH/VAL) are the reference for fading.
Price leaving the value area and holding outside -> the market is seeking new value; the old VAH or VAL often becomes the level that has to hold on a retest.
A thin patch in the histogram is a price the market moved through with little business done. Revisits often travel across it quickly.
A POC that migrates day over day in one direction is a trend in where business is being done, not just in price.
The script draws levels and volume. It gives no buy/sell signals and makes no performance claims — it is a context tool.
IMPORTANT LIMIT (please read before reporting a bug)
TradingView caps a script at 500 boxes, 500 lines and 500 labels. Each profile costs roughly (bins + 1) boxes. With the defaults, 25 bins x 12 profiles is about 312 boxes. The script auto-clamps the number of profiles it draws to whichever is smaller: your "Max profiles back" setting, or floor(490 / (bins + 1)).
So: painting every session across all history is not possible in Pine, by any script. You always see the most recent N. If you raise the bin count, the number of visible profiles automatically drops to compensate.
Similarly, intrabar data is only available for a limited number of recent chart bars. Older profiles may thin out or stop — that is a data-availability limit, not a fault in the script.
Open source. Comments in the code explain the engine, the delta proxy, and the object budget.
VP Multi-Mode builds a volume-by-price profile from REAL traded volume and lets you choose, from one dropdown, what stretch of the chart each profile covers.
WHAT A VOLUME PROFILE IS (skip if you know) A normal chart shows how much volume traded per unit of TIME — the bars along the bottom. A volume profile flips that: it shows how much volume traded at each PRICE. The result is a sideways histogram. Long bars are prices where a lot of business got done; short bars are prices the market passed through quickly. Traders use the fat areas as reference (price tends to revisit and pause there) and the thin areas as places price tends to move through fast.
Three levels come out of it:
POC (Point of Control) — the single price bin with the most volume. The fairest price of that range by traded-volume consensus.
VAH / VAL (Value Area High / Low) — the band around the POC containing a chosen share of the range's volume (70% by default, the Market Profile convention). Inside the value area = accepted price; outside = the market is exploring.
WHAT MAKES THIS ONE DIFFERENT
Real volume, not an approximation. Each chart bar is decomposed into intrabar sub-bars (1-minute by default) via request.security_lower_tf(), and each sub-bar's ACTUAL reported volume is distributed into the price grid. It does not use tick data and it does not use the up/down-tick estimate that the built-in SVP relies on. You can also choose how a sub-bar's volume is spread:
Range/Uniform (default, the honest one) — spread evenly over every bin the sub-bar's low-to-high touched.
Close — dump the whole sub-bar's volume in its closing-price bin.
Five range modes in one script. Most profile tools pick one anchoring scheme. This one lets you switch:
Time Window — any HHMM start/end, wraps past midnight.
Session Open->Close — Asia / London / US, each with editable open and close times. One profile per selected session per day.
External Swing — anchors between an external higher-high (a pivot high above the previous pivot high, i.e. liquidity taken above) and an external lower-low. Strictly point-in-time: a pivot is only used once confirmed.
Manual Drag — two click-to-place time handles, the Pine analog of dragging the built-in SVP's handles.
Weekly + N Days — anchored at the Monday 09:30 ET cash open and running to (that Monday + 7 + N) days. Rolling, so these profiles deliberately overlap.
Optional volume delta, labelled honestly. Turn on Show Volume Delta and each bin is coloured by net buying vs selling, with the profile's total delta printed on the POC label. This is a BAR-CLASSIFIED PROXY: each 1-minute sub-bar's real volume is signed by its own close-vs-open direction. It is NOT true aggressor / bid-ask delta — no tick or order-book data is used, and it cannot tell who lifted the offer from who hit the bid inside a sub-bar. It is stated that way in the tooltip too.
Placement that sits on the price action. The histogram is anchored to the range's right edge and grows LEFT across the candles by default, so it overlays the bars it was built from instead of being parked in the right margin. Anchor edge, direction, width and offset are all inputs. Everything is drawn on bar_index, so it does not drift when you zoom.
HOW TO USE
Quick start: add it to the chart and leave everything alone. You get the US cash session (09:30-16:00 ET) profiled once per day for the last 12 days, POC as a solid red line, VAH/VAL as dashed orange lines, and the value area shaded.
Then adjust in this order:
Pick the range that matches your question (Range Mode group).
"Where is value for today's session?" -> Session Open->Close, US.
"What did the overnight build?" -> Session Open->Close, Asia (or Time Window with your own hours).
"Where did volume sit across this leg up?" -> External Swing.
"Just profile this bit here" -> Manual Drag, then click the two handles on the chart when prompted.
"Where is the week's value, with carry-over into the next few days?" -> Weekly + N Days.
Set resolution and detail (Engine group).
Intrabar resolution: 1 minute is the default and works on most charts. Finer (e.g. 1S) is more faithful but TradingView only serves intrabar data for a limited number of recent bars, so finer settings shorten how far back profiles can be built.
Price bins: 25 default. More bins = finer profile, but see the limit below.
Value Area %: 70 is the convention; lower it to see a tighter core of value.
Timezone: America/New_York by default, since the session presets are ET.
Fit it to your chart (Display group). Profile extension sets how many bars wide the POC bin is drawn; the rest scale to their volume. Profile offset nudges the whole thing left or right. Extend direction flips it between overlaying the candles and sitting in the empty margin.
Optional: turn on Show Volume Delta to colour bins green/red by net direction and read the range's total delta off the POC label — bearing in mind the proxy caveat above.
READING IT
Price accepted inside the value area, POC flat and centred -> balanced/rotational; the edges (VAH/VAL) are the reference for fading.
Price leaving the value area and holding outside -> the market is seeking new value; the old VAH or VAL often becomes the level that has to hold on a retest.
A thin patch in the histogram is a price the market moved through with little business done. Revisits often travel across it quickly.
A POC that migrates day over day in one direction is a trend in where business is being done, not just in price.
The script draws levels and volume. It gives no buy/sell signals and makes no performance claims — it is a context tool.
IMPORTANT LIMIT (please read before reporting a bug)
TradingView caps a script at 500 boxes, 500 lines and 500 labels. Each profile costs roughly (bins + 1) boxes. With the defaults, 25 bins x 12 profiles is about 312 boxes. The script auto-clamps the number of profiles it draws to whichever is smaller: your "Max profiles back" setting, or floor(490 / (bins + 1)).
So: painting every session across all history is not possible in Pine, by any script. You always see the most recent N. If you raise the bin count, the number of visible profiles automatically drops to compensate.
Similarly, intrabar data is only available for a limited number of recent chart bars. Older profiles may thin out or stop — that is a data-availability limit, not a fault in the script.
Open source. Comments in the code explain the engine, the delta proxy, and the object budget.
릴리즈 노트
The "Show Delta" was not included in the first publish. Added now.오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.