PROTECTED SOURCE SCRIPT

T21 Market Profile + VP

100
Description

T21 Market Profile + Volume Profile is a session-based profiling indicator that combines TPO Market Profile, an independently configurable Volume Profile, Developing POC / Value Area, a fixed-duration Initial Balance (IB), and Session VWAP into a single, integrated tool.

The indicator is designed to help traders understand price acceptance, balance vs. imbalance, and auction structure within each session, while keeping TPO and Volume Profile calculations logically separated and independently configurable.

Core Concepts
TPO Market Profile

The TPO profile is built using lower-timeframe price data.

Each price row represents how many lower-TF bars traded through that price level (TPO count).

The vertical resolution of the TPO profile is controlled by TPO Ticks Per Row, allowing fine or coarse profiles depending on market conditions.

The TPO profile is drawn as a time-scaled shape, where wider areas represent higher price acceptance.

Point of Control (POC) and Value Area

POC is derived from the TPO distribution as the price level with the highest TPO count.

Value Area High (VAH) and Value Area Low (VAL) are calculated by expanding outward from the POC until the selected Value Area percentage is reached.

Developing POC, VAH, and VAL lines update dynamically during the session.

Independent Volume Profile (Key Feature)

The Volume Profile uses its own price-row resolution, controlled by VP Ticks Per Row, completely independent from the TPO grid.

This allows traders to:

Keep a smooth, readable TPO profile

While simultaneously running a high-detail or low-detail Volume Profile, without increasing TPO complexity

Volume is aggregated from lower-timeframe bars and distributed across the price range traded during each bar.

The Volume Profile can be aligned to the right or left side of the session and scaled proportionally to session duration.

This separation between TPO resolution and Volume Profile resolution is intentional and represents a core design feature of the indicator.

Initial Balance (IB)

The Initial Balance is calculated using a fixed time duration in minutes, not a fixed number of bars.

High and Low values are updated only during the defined IB window.

After the IB period ends, the IB range remains fixed and is displayed as a box extending through the session.

This approach ensures consistent IB behavior across different chart timeframes and instruments.

Historical Context

Previous sessions’ POC, VAH, VAL, and Initial Balance boxes can be displayed for contextual reference.

The number of historical sessions retained is user-configurable.

This allows traders to identify prior acceptance levels, balance zones, and structural references.

Session VWAP

A session-anchored VWAP is included.

VWAP resets automatically at each new session defined by the Profile Timeframe.

Useful for contextual alignment between auction structure and volume-weighted price.

How to Use

Set Profile Timeframe to define the session (e.g., Daily).

Adjust TPO Ticks Per Row to control TPO profile detail.

Adjust VP Ticks Per Row independently to fine-tune Volume Profile resolution.

Select lower-timeframe inputs based on market volatility and instrument liquidity.

Use Developing POC, VAH, VAL, IB, and VWAP together to assess balance, acceptance, and potential directional bias.

Limitations and Notes

The Volume Profile distributes bar volume across the price range traded during each lower-timeframe bar.
It is an approximation and not true tick-by-tick volume-at-price.

Results depend on the selected lower-timeframe resolution and data quality.

The script does not use lookahead or future data.

Higher resolution settings increase computational load.

Why the Script Is Closed-Source

This indicator implements a custom architecture that separates TPO and Volume Profile resolution, combines fixed-duration Initial Balance logic, and manages dynamic session-based drawing and historical context within a single framework.
The source code is protected to preserve this implementation while still allowing full public use of the indicator.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.