ที่อัปเดต:
ZenAlgo - Control

Get this and other exclusive indicators in ZenAlgo Platinum
This indicator is part of ZenAlgo_Official's Paid Space. Subscribe for $249.00/month to use it on your charts along with the author's other exclusive indicators. You pay right on TradingView and get access straight away.
Explore ZenAlgo PlatinumZenAlgo - Control plots volume profile reference levels for several higher time windows and keeps those levels visible on the chart with labels and optional alerts. It is designed to work on intraday charts and uses the symbol's traded volume to estimate where the most activity occurred within each period.
Inputs and session alignment
Session start offset (hours) shifts the time used to decide when a new week, month, quarter, semi annual period, or year begins. This is useful when you want the period boundary to align with a specific exchange session, or when you want weekly boundaries to start at a different hour than the default.
Profile levels controls how finely the script bins price into equally sized price slices between the current period's high and low. More levels means a finer histogram (more detail, more computation).
Max rebuild bars limits how far back the script will look when it must rebuild the entire histogram (explained below).
Value Area % sets how much of the total estimated volume the value area should contain (default 0.68).
Label offsets control how far to the right the labels and lines extend, so the levels are readable without covering current candles.
Period availability and timeframe gating
The indicator conditionally runs each period engine depending on the chart timeframe to avoid heavy calculations where it is not intended.
This matters because the calculation builds a histogram from bar ranges and volumes, which becomes expensive on very low timeframes over very long history.
Core idea - building a volume by price histogram from candles
For each enabled period (weekly, monthly, quarterly, semi annual, yearly), the script maintains:
For every new bar inside the current period, the script distributes that bar's volume into the bins that overlap the candle's low to high range. The distribution is weighted by how much of the candle's range overlaps each bin, so a candle that spans many bins contributes proportionally rather than assigning all volume to a single price.
Why this works conceptually:
POC and Value Area calculation
Point of Control (POC)
Within a period, the script finds the price bin with the highest accumulated volume and uses the center of that bin as the period's POC level. This is the single price level where the histogram peaks.
Value Area High and Low (VAH, VAL)
After the POC is known, the script expands outward from the POC bin, adding neighboring bins until the cumulative included volume reaches the configured Value Area percentage of the total. It expands by comparing the volume just above and just below, including the larger side first so the chosen area reflects where volume clustered. The resulting upper and lower included bin centers become VAH and VAL.
Interpretation:
Incremental update vs rebuild logic
The histogram depends on the current period's high and low because those define the bin boundaries. When a new bar makes a new high or new low for the period, the bin boundaries would change. If you kept the old histogram, the bins would no longer correspond to the correct price slices.
To handle this, the script uses two modes:
This approach keeps levels consistent with the current period range, at the cost of occasional heavier computation when the range expands.
Current period dPOC and previous period levels
The indicator draws two categories of levels per period.
Current period dPOC (running)
For each enabled period, the script plots a dotted line at the current period's running POC and labels it as dPOC (dynamic POC). It is dynamic because it changes while the period is still forming as new volume comes in and as the period range expands.
Previous period fixed levels
When a period rolls over (for example, a new week starts), the script stores the finished period's final POC, VAH, and VAL as previous levels. It then draws those previous levels across the current chart with solid (POC) and user selected styles (VAH, VAL), plus labels. These previous levels remain fixed until the next rollover of that period.
Why both exist:
Visual plotting details
Alerts - touch and cross logic
Alerts are optional and can be configured per period and per level category.
You can enable:
You can choose to alert on:
How to interpret the plotted values
A practical reading:
Best use and workflow
Common ways to use these levels as references:
Settings guidance:
Added value compared to free alternatives
This script focuses on a specific combination that is not always available together in simpler public indicators:
Disclaimers and where it can fall short
Inputs and session alignment
Session start offset (hours) shifts the time used to decide when a new week, month, quarter, semi annual period, or year begins. This is useful when you want the period boundary to align with a specific exchange session, or when you want weekly boundaries to start at a different hour than the default.
Profile levels controls how finely the script bins price into equally sized price slices between the current period's high and low. More levels means a finer histogram (more detail, more computation).
Max rebuild bars limits how far back the script will look when it must rebuild the entire histogram (explained below).
Value Area % sets how much of the total estimated volume the value area should contain (default 0.68).
Label offsets control how far to the right the labels and lines extend, so the levels are readable without covering current candles.
Period availability and timeframe gating
The indicator conditionally runs each period engine depending on the chart timeframe to avoid heavy calculations where it is not intended.
- Weekly is available on intraday timeframes below 1D (for example 1m to 4h).
- Monthly is available on intraday timeframes at or above 15m.
- Quarterly, Semi Annual, and Yearly are available on intraday timeframes at or above 1h.
- The script disables these engines on D, W, M chart timeframes as described in the input tooltips and gating logic.
This matters because the calculation builds a histogram from bar ranges and volumes, which becomes expensive on very low timeframes over very long history.
Core idea - building a volume by price histogram from candles
For each enabled period (weekly, monthly, quarterly, semi annual, yearly), the script maintains:
- The running high and low of the current period
- A fixed number of price bins spanning that high to low range
- An array holding estimated volume per price bin
For every new bar inside the current period, the script distributes that bar's volume into the bins that overlap the candle's low to high range. The distribution is weighted by how much of the candle's range overlaps each bin, so a candle that spans many bins contributes proportionally rather than assigning all volume to a single price.
Why this works conceptually:
- Volume profile levels aim to identify prices where the market accepted a lot of trading (high participation).
- Distributing volume across the candle's traded range is a practical approximation on platforms where true tick by tick volume at price is not available to Pine in a universal way.
- Aggregating many bars over a full period produces a stable histogram where high volume areas stand out compared to low volume areas.
POC and Value Area calculation
Point of Control (POC)
Within a period, the script finds the price bin with the highest accumulated volume and uses the center of that bin as the period's POC level. This is the single price level where the histogram peaks.
Value Area High and Low (VAH, VAL)
After the POC is known, the script expands outward from the POC bin, adding neighboring bins until the cumulative included volume reaches the configured Value Area percentage of the total. It expands by comparing the volume just above and just below, including the larger side first so the chosen area reflects where volume clustered. The resulting upper and lower included bin centers become VAH and VAL.
Interpretation:
- POC is a single most traded price area proxy for the period.
- VAH and VAL bound the price region that contains the chosen fraction of the period's estimated volume.
- When price is inside VA, it is within the range where most period volume occurred. When price is outside VA, it is in the lower participation tails relative to that period's distribution.
Incremental update vs rebuild logic
The histogram depends on the current period's high and low because those define the bin boundaries. When a new bar makes a new high or new low for the period, the bin boundaries would change. If you kept the old histogram, the bins would no longer correspond to the correct price slices.
To handle this, the script uses two modes:
- Incremental update when the period high and low do not change on the new bar. It simply adds the new bar's weighted volume into the existing bins and recalculates the POC from the updated histogram.
- Rebuild when the period makes a new high or new low. It clears the histogram and reconstructs it by iterating back over bars in the current period (up to Max rebuild bars), re distributing each bar's volume into the newly defined bins.
This approach keeps levels consistent with the current period range, at the cost of occasional heavier computation when the range expands.
Current period dPOC and previous period levels
The indicator draws two categories of levels per period.
Current period dPOC (running)
For each enabled period, the script plots a dotted line at the current period's running POC and labels it as dPOC (dynamic POC). It is dynamic because it changes while the period is still forming as new volume comes in and as the period range expands.
Previous period fixed levels
When a period rolls over (for example, a new week starts), the script stores the finished period's final POC, VAH, and VAL as previous levels. It then draws those previous levels across the current chart with solid (POC) and user selected styles (VAH, VAL), plus labels. These previous levels remain fixed until the next rollover of that period.
Why both exist:
- The running dPOC reflects where trading is concentrating in the current unfinished period.
- The previous period POC and VA levels provide stable references derived from a completed distribution, which does not change retroactively.
Visual plotting details
- Each period has separate color settings for POC and dPOC, plus optional VAH and VAL with configurable line width and line style (solid, dashed, dotted).
- Labels print the formatted level value using the symbol's minimum tick formatting, and for very large numbers the label shortens the text with K, M, B, T suffixes to keep labels readable.
- Lines and labels are positioned to the right of price using the configured bar offsets. The script includes a safety limit on how far back the left anchor can be placed to avoid platform constraints when loading long history.
Alerts - touch and cross logic
Alerts are optional and can be configured per period and per level category.
You can enable:
- TOUCH: triggers when the candle's low is at or below the level and the high is at or above the level (the bar range includes the level).
- CROSS: triggers when the close crosses the level.
- HIT is defined as TOUCH or CROSS.
You can choose to alert on:
- Current running dPOC levels
- Previous period POC and, if enabled, previous period VAH and VAL
- Weekly, Monthly, Quarterly, Semi Annual, Yearly independently
How to interpret the plotted values
- dPOC (W, M, Q, S, Y): the current period's running POC estimate. It can move during the period and can shift more noticeably when the period range expands and a rebuild occurs.
- POC (W, M, Q, S, Y): the previous completed period's POC. This is fixed for the duration of the next period.
- VAH / VAL (W, M, Q, S, Y): the previous completed period's value area boundaries for the configured value area percentage.
A practical reading:
- Previous POC and VA can be used as higher timeframe reference levels on lower timeframe charts because they summarize where volume concentrated over larger windows.
- The current dPOC helps track where volume is concentrating inside the currently forming period.
Best use and workflow
Common ways to use these levels as references:
- Use previous period POC and VA as context zones, then make lower timeframe decisions with your existing execution tools.
- Treat dPOC as a live read of where the current period is building acceptance, and compare it to the fixed prior levels.
- Use alerts to reduce screen time by being notified when price interacts with selected levels (touch or close cross).
Settings guidance:
- Higher Profile levels increases detail but can be heavier on performance, especially when rebuilds occur.
- If you need lighter computation on very active charts, reduce Profile levels or reduce Max rebuild bars.
- If you want period boundaries to align with a specific session, adjust Session start offset.
Added value compared to free alternatives
This script focuses on a specific combination that is not always available together in simpler public indicators:
- Simultaneous tracking of multiple higher time windows (weekly, monthly, quarterly, semi annual, yearly) with independent enable toggles and styling.
- Side by side display of current running dPOC and previous completed period levels for each enabled window.
- A candle range weighted volume distribution into bins, rather than assigning the entire bar volume to a single price proxy.
- Built in alert conditions for touch and close cross across all supported windows and level types, so level interaction can be monitored without manual checking.
- Label formatting that respects the symbol's tick size and shortens very large values for readability on indices and aggregates.
- All supported periods are calculated using the same volume distribution model, the same binning logic, and the same rebuild rules. This ensures that weekly, monthly, quarterly, semi annual, and yearly levels are directly comparable to each other, unlike combining multiple separate indicators that may use different assumptions, aggregation methods, or update behavior. Using a single engine also enables consistent alert definitions and synchronized updates across all periods.
Disclaimers and where it can fall short
- The volume at price distribution is an approximation derived from candle ranges and bar volume. It is not a true tick level volume profile, and results can differ from exchange native volume at price data.
- On symbols where the reported volume is limited, synthetic, or not representative (some indices, some CFDs, some venues), the histogram is based on the volume series TradingView provides for that symbol, which may affect the usefulness of volume derived levels.
- The current dPOC can change within the period and can jump when the period makes a new high or low, because a rebuild recalculates the histogram using the updated range.
- Performance depends on timeframe, history loaded, Profile levels, and how often the period range expands. If you see slowness, reduce Profile levels or Max rebuild bars, or disable some periods.
- This indicator plots reference levels only. It does not determine entries, exits, position sizing, or risk limits.
Release Note
This update extends the original indicator from a small set of higher time frame reference levels into a broader framework built from the completed value area of each enabled higher time frame period.The core calculation remains unchanged. The script still constructs a volume profile for each higher time frame period, identifies the price that accumulated the largest share of activity during that period, and determines the upper and lower boundaries that contain the majority of that activity. These completed levels are then projected forward onto the chart once the next higher time frame period begins.
The main difference in this version is that the completed value area is no longer used only as a boundary reference. Instead, it now acts as the structural basis for additional levels that describe where current price sits relative to the previously accepted range.
How the higher time frame structure is built
The script groups chart bars into higher time frame periods such as weekly, monthly, quarterly, semi-annual, and yearly segments. Each enabled period is processed independently. A configurable time offset allows the user to shift the start of these periods so that the aggregation aligns with their preferred session timing.
During an active period the script continuously builds a distribution of trading activity across price. Instead of assigning the entire candle volume to a single level, each bar contributes volume across the portion of price it spans. This produces a distribution that reflects where trading activity actually occurred within the candle range.
From this distribution the script identifies the price level where the largest concentration of activity accumulated. While the period is still active this level is displayed as the developing point of control. When the period completes, the level becomes the fixed point of control of the previous higher time frame period.
The script also identifies the price boundaries that contain the majority of the distribution for that completed period. These boundaries form the completed value area. Once a new higher time frame period begins, the previous value area and previous point of control are fixed and projected forward as reference levels.
What changed in this version
The original version displayed the developing point of control for the current higher time frame period together with the point of control and value area boundaries of the previous period.
This update expands the role of the completed value area. Instead of only marking the upper and lower limits of the previously accepted range, the script now derives additional reference levels from that completed structure.
The completed value area is treated as a measurable range from which the script constructs:
- internal reference levels inside the completed value area
- a midpoint representing the center of the previous value distribution
- extension levels above and below the previous value area
These additional levels remain directly tied to the structure of the previous higher time frame distribution. They are not calculated independently from price range alone but are derived from the completed value area that resulted from the profile calculation.
How the levels relate to the previous higher time frame structure
The plotted levels represent different parts of the previous higher time frame distribution:
- the previous point of control marks the price where the highest concentration of activity occurred
- the value area boundaries mark the range where the majority of that activity was concentrated
- the midpoint marks the center of that accepted range
- internal levels divide the value area into smaller structural segments
- extension levels project the previous value area outward to show displacement from that range
Together these levels allow the chart to represent how the market organized trading activity during the previous higher time frame period and where current price is positioned relative to that structure.
The ZenAlgo team
zenalgo.com
discord.zenalgo.com
zenalgo.com
discord.zenalgo.com
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
The ZenAlgo team
zenalgo.com
discord.zenalgo.com
zenalgo.com
discord.zenalgo.com
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน