HTF Floating Candles w/ Volume Footprint [theUltimator5]This indicator is designed to pull higher-timeframe candles outside of the chart, and add the footprint volume data to give a complete snapshot of the Higher Timeframe (HTF) trading range and volume data without cluttering your view.
IMPORTANT!
This uses the new request.footprint() call, which may make this indicator only available to premium TradingView users.
The request.footprint() doesn't assume all buy volume or all sell volume based on the direction of a candle, but instead uses actual footprint information to construct the volume footprints.
Instead of forcing you to mentally reconstruct the most recent daily (or weekly/monthly) candle(s) while watching lower-timeframe price action, this script draws floating HTF candles to the right side of the chart and updates it live as the higher-timeframe bar develops. The default number of HTF candles is 1, but you can add up to 10 HTF candles.
It also builds a row-by-row volume distribution across the active HTF candle price range and separates it into buy-side vs sell-side volume, displayed on opposite sides of the candle. This gives you a quick visual read on where volume has been concentrated inside the higher-timeframe structure — not just where price traveled.
If you don't like seeing buy and sell volume on separate sides of the candles, you can stack them all on the left side like traditional volume footprint indicators.
You can also plot the horizontal lines backwards on the chart to show where the high and low points for the candle occurred.
If you want more than 1 HTF candle, you can plot multiple. The volume footprint shows the volume profile of the entire plotted HTF candle range.
You can configure the following display options:
Position and size of HTF candles
Number of HTF candles
HTF timeframe
Volume profile layout style
Number of volume profile bars
Width of volume profile bars
Colors & transparency
Horizontal high/low toggle
This indicator isn't a standalone trading indicator, but it is a visualization enhancement tool to give you a clean picture of the higher timeframe's price and volume data without the clutter.
成交量分佈圖
Volume Flow Analysis [UAlgo]Volume Flow Analysis is a market profile style volume study that builds a session anchored volume distribution, extracts key reference levels from the previous profile, and generates institutional style context signals based on Auction Market Theory concepts. The script combines several workflows in one tool: previous session volume profile levels (POC, VAH, VAL), liquidity void detection through LVN valleys, acceptance versus rejection logic around value, and Initial Balance with open type classification.
The indicator runs on price ( overlay=true ) and is designed for intraday or swing traders who want a structured read of where value formed in the prior profile and how the current session is interacting with it. Instead of only plotting static lines, the script actively interprets behavior when price moves outside the previous value area. It checks whether the move is rejected quickly (failed auction) or sustained with time and volume (acceptance), which helps distinguish responsive activity from initiative activity.
Another major component is the profile shape and liquidity void framework. The script identifies previous profile shape as P, b, or D based on POC location within the profile range, and it scans for LVN valleys that can act as low participation zones where price may travel quickly. This gives the user both structural context and event based signals from the same indicator.
The result is a comprehensive volume flow dashboard that merges profile levels, session behavior, and AMT inspired signal logic into a single chart layer.
🔹 Features
🔸 1) Anchored Session Volume Profile (Daily, Weekly, Monthly or Custom Anchor)
The script builds a volume profile for each anchor period selected by the user through the Profile Period (Anchor) input. Common choices include Daily, Weekly, and Monthly anchors. When a new anchor session begins, the current session profile is finalized and promoted to the previous profile, then a new profile begins.
This allows the indicator to continuously reference the fully calculated previous profile while the current session is developing.
🔸 2) Price Range Binning with User Defined Resolution
Each session profile is divided into a configurable number of rows (bins). The script maps price activity into these bins and distributes volume proportionally based on the overlap between each candle range and each volume bin.
This creates a more realistic histogram than assigning all candle volume to a single price level, especially for wide range candles.
🔸 3) Previous Profile Core Levels (POC, VAH, VAL)
Once a session completes, the script calculates and stores the key profile levels:
POC (Point of Control), the price bin with the highest volume
VAH (Value Area High)
VAL (Value Area Low)
Value Area is computed by expanding outward from the POC until the chosen percentage of total profile volume is covered. These levels are then plotted on the chart as dynamic reference lines for the next session.
🔸 4) Acceptance vs Rejection Logic Around Previous Value Area
The indicator monitors current session behavior relative to the previous VAH and VAL and classifies behavior as either rejection (failed auction) or acceptance (initiative drive).
Failed Auction (Rejection):
Price trades outside the previous value area but returns back inside before meeting acceptance criteria. This is treated as a failed attempt to establish new value.
Acceptance (Initiative Drive):
Price stays outside the previous value area for a user defined number of bars and accumulates enough volume relative to average volume. This suggests successful acceptance of higher or lower value.
This framework is useful for separating temporary probes from meaningful value migration.
🔸 5) Institutional Style Signal Labels
The script can display signal labels for:
Failed Auction Bullish and Bearish
Acceptance Bullish and Bearish
LVN Traversal Bullish and Bearish
These labels appear directly on price and use user defined bullish and bearish colors for quick interpretation.
🔸 6) LVN Traversal (Liquidity Void / Vacuum) Detection
The script detects low volume nodes as true local valleys in the previous profile histogram. A bin qualifies as an LVN when surrounding bins on both sides have higher volume for a chosen valley depth.
If current price enters one of these prior LVN zones from above or below, the script marks a potential traversal event. This can help identify zones where price may move faster due to lower prior participation.
🔸 7) Previous Profile Shape Classification (P, b, D)
The script classifies the previous profile shape based on where the POC sits within the full profile range:
P shape if POC is near the upper portion of the profile
b shape if POC is near the lower portion
D shape if POC is near the middle
This gives quick context about the prior session structure, which can support directional bias interpretation and session planning.
🔸 8) Initial Balance (IB) Tracking
The indicator tracks the Initial Balance range using a user defined duration in minutes. During the IB window, it records session high and low. After the IB period ends, it can draw an IB box on the chart for visual reference.
This is useful for intraday frameworks where the IB range is used as a key reference for breakout, reversal, and auction development.
🔸 9) Open Type Classification and Daily Bias
At the start of each new anchor session, the script compares the new open to the previous value area and assigns a basic daily bias such as initiative bullish, initiative bearish, or responsive inside. After the IB period completes, it classifies the open type using rule based conditions, including:
Open Drive Bullish / Bearish
Open Rejection Reverse Bullish / Bearish
Open Test Drive Bullish / Bearish
This adds a session narrative layer on top of the profile levels.
🔸 10) Previous Profile Histogram Visualization on Last Bar
On the last bar, the script can render the previous profile histogram as a horizontal bar style distribution using boxes. Bins inside the previous value area can be colored differently from bins outside value.
This provides an at a glance visual summary of where prior volume concentrated, without needing a separate profile tool.
🔸 11) Extensive Visual Customization
Users can configure colors for:
Previous POC
Previous VA levels
Histogram bins
Value area histogram bins
Bullish signals
Bearish signals
This makes it easy to integrate the indicator into existing chart themes and workflows.
🔸 12) Structured Object Based Design
The script uses custom types ( VolumeBin and SessionProfile ) to store profile state, bins, levels, shape, and LVN zones. This object based approach keeps the logic modular and easier to maintain as features are added.
🔹 Calculations
1) Session Detection and Profile Lifecycle
A new profile session is detected with:
bool isNewSession = timeframe.change(i_anchor)
When a new session begins:
The current profile is finalized (end bar, profile calculations)
The current profile becomes the previous profile
A fresh session profile starts from the current bar
This design ensures that current session logic can reference a fully completed previous profile with stable POC, VAH, VAL, shape, and LVN data.
2) Volume Profile Bin Initialization
Each session profile is divided into i_rows equal price bins between session low and session high:
float step = (this.highestPrice - this.lowestPrice) / rows
for i = 0 to rows - 1
float bottom = this.lowestPrice + (i * step)
float top = bottom + step
this.bins.push(VolumeBin.new(top, bottom, 0.0))
As the current session high or low changes, the script rebuilds the current profile bins and repopulates volume from session start to the current bar. This keeps the current profile geometry aligned with the latest session range.
3) Proportional Volume Distribution Across Bins
For each candle, the script distributes volume across all bins according to candle range overlap:
float overlapTop = math.min(h, bin.priceTop)
float overlapBottom = math.max(l, bin.priceBottom)
if overlapTop > overlapBottom
float overlapRatio = (overlapTop - overlapBottom) / barRange
float volToAdd = v * overlapRatio
bin.volumeTotal += volToAdd
this.totalVolume += volToAdd
Interpretation:
Volume is allocated proportionally to the fraction of the candle range overlapping each price bin. This is a practical approximation of intrabar volume distribution across price.
Special handling exists for zero range candles, where volume is assigned to the bin containing the candle price.
4) POC Detection and Profile Max Volume
After session completion, the script scans all bins to find the highest volume bin:
for i = 0 to this.bins.size() - 1
VolumeBin bin = this.bins.get(i)
if bin.volumeTotal > maxVol
maxVol := bin.volumeTotal
pocIndex := i
The POC price is set to the midpoint of that bin:
this.pocPrice := (pocBin.priceTop + pocBin.priceBottom) / 2
The script also stores maxVolume , which is later used to scale histogram width display on the chart.
5) Value Area Calculation (VAH / VAL)
The Value Area is built by expanding outward from the POC until the target percentage of session volume is reached:
float targetVol = this.totalVolume * (vaPct / 100.0)
float currentVol = pocBin.volumeTotal
int upperIndex = pocIndex
int lowerIndex = pocIndex
At each step, the script compares the next upper and lower bin volumes and expands toward the larger volume side first. This continues until the cumulative value area volume reaches the target percentage.
Final levels:
this.vahPrice := this.bins.get(upperIndex).priceTop
this.valPrice := this.bins.get(lowerIndex).priceBottom
This is a standard volume profile style value area expansion method centered on POC.
6) Previous Profile Shape Classification (P, b, D)
The profile shape is inferred from the POC position inside the profile range:
float profileRange = this.highestPrice - this.lowestPrice
float pocPosPct = (this.pocPrice - this.lowestPrice) / profileRange
Classification logic:
P shape if POC is at or above 70 percent of the range
b shape if POC is at or below 30 percent
D shape otherwise
This is a simplified but practical shape proxy based on volume concentration location.
7) LVN (Liquidity Void) Valley Detection
The script identifies LVNs as local volume minima among profile bins, using a user defined valley depth i_lvnDepth . A bin is treated as an LVN if the bins on both sides for the specified depth all have greater volume:
for j = 1 to lvnDepth
if this.bins.get(i - j).volumeTotal <= currentBin.volumeTotal or this.bins.get(i + j).volumeTotal <= currentBin.volumeTotal
isValley := false
break
Only non zero volume bins are considered. Detected LVNs are stored in this.lvnZones for use in later traversal signals.
8) Initial Balance (IB) Calculation
At the start of a new session, the script resets IB state and starts tracking the session open, session start time, and current IB high and low. While the market is still inside the IB duration:
ibHigh := math.max(ibHigh, high)
ibLow := math.min(ibLow, low)
IB tracking ends once the elapsed time exceeds the configured duration in minutes:
if (time - sessionStartTime) >= i_ibMins * 60000
inIb := false
This produces the opening range used for later visualization and open type classification.
9) Daily Bias and Open Type Classification
At each new session open, the script sets a basic bias by comparing the session open to the previous value area:
Open above previous VAH suggests initiative bullish
Open below previous VAL suggests initiative bearish
Open inside previous value suggests responsive / inside
After the IB period ends, the script classifies the open type using rule based comparisons among:
Open location relative to previous VAH / VAL
Close relative to IB highs and lows
Intraday test and rejection behavior around prior value
Examples from the code include:
"Open-Drive Bullish"
"Open-Rejection-Reverse Bearish"
"Open-Test-Drive Bullish"
This gives a structured session narrative that aligns with many profile and AMT workflows.
10) Acceptance vs Failed Auction Logic (Above VAH)
The script tracks consecutive bars and cumulative volume when price closes above the previous VAH:
if close > prevVah
barsAboveVah += 1
volAboveVah += volume
If price returns inside value before acceptance is confirmed, it prints a failed auction bearish signal (fade breakout logic):
if barsAboveVah > 0 and not acceptedAbove and i_sigFailedAuc
isFailedAucBear := true
Acceptance bullish is confirmed only if both time and volume thresholds are satisfied:
if barsAboveVah >= i_accBars and volAboveVah >= (avgVol * i_accVolMult) and not acceptedAbove and i_sigAccept
acceptedAbove := true
isAcceptBull := true
This is a practical combination of time and participation filters, which reduces false acceptance signals from brief low volume excursions.
11) Acceptance vs Failed Auction Logic (Below VAL)
The same framework is applied below the previous VAL:
Tracking closes below VAL:
if close < prevVal
barsBelowVal += 1
volBelowVal += volume
Failed auction bullish if price returns inside before acceptance:
if barsBelowVal > 0 and not acceptedBelow and i_sigFailedAuc
isFailedAucBull := true
Acceptance bearish if time and volume thresholds are met:
if barsBelowVal >= i_accBars and volBelowVal >= (avgVol * i_accVolMult) and not acceptedBelow and i_sigAccept
acceptedBelow := true
isAcceptBear := true
This creates a symmetric AMT style signal model for both sides of value.
12) LVN Traversal Signal Logic
If LVN traversal signaling is enabled, the script checks whether price enters a previous LVN zone from outside:
Bullish traversal candidate when price enters the LVN from below
Bearish traversal candidate when price enters the LVN from above
Code logic example:
if close > lvn.priceBottom and close < lvn.priceTop and close < lvn.priceBottom
isLvnTravBull := true
This flags the moment price enters a potential liquidity void zone where faster movement may occur.
13) Previous Profile Histogram Rendering on Last Bar
On the last chart bar, the script draws the previous session histogram using boxes. Width is normalized by each bin volume relative to the profile max volume:
float widthRatio = bin.volumeTotal / previousProfile.maxVolume
int boxRight = bar_index + math.round((rightBar - bar_index) * widthRatio)
Bins inside VAH and VAL are colored using the value area histogram color, while other bins use the general histogram color. This gives a compact visual profile snapshot without external tools.
14) Dynamic Plots for Previous POC, VAH, and VAL
The previous profile reference levels are continuously plotted as line break style plots:
plot(plotPoc, "Prev POC", color=i_colPoc, linewidth=2, style=plot.style_linebr)
plot(plotVah, "Prev VAH", color=i_colVa, linewidth=1, style=plot.style_linebr)
plot(plotVal, "Prev VAL", color=i_colVa, linewidth=1, style=plot.style_linebr)
These lines provide stable reference levels throughout the current session and form the basis for the acceptance, rejection, and open type logic.
指標
Quantum Adaptive Session Profile v4Quantum Adaptive Session Profile (SVP) - The Dynamic Roadmap
Overview Traditional Volume Profiles and anchored VWAPs are incredibly useful, but they suffer from rigidity. When a market abruptly accelerates—like the New York session open on Gold or the Nasdaq—standard VWAP levels lag behind the true mean, leaving traders looking for pullbacks that never arrive. The Quantum Adaptive Session Profile (SVP) solves this by calculating a "Dynamic VWAP" using an Efficiency Ratio engine. The Point of Control (POC) and Value Areas automatically speed up to track explosive momentum, giving you real-time structural levels that actually respect the current market velocity.
Key Highlights
• The Adaptive Point of Control (POC): This acts as the session's dynamic fair value. During chop, it remains steady. When a breakout occurs, the alpha logic catches the volatility shift and aggressively pulls the POC to trail the new trend.
• Dynamic Value Areas (VAH / VAL): The Value Area High and Value Area Low expand and contract around the POC based on real-time standard deviations, mapping out the true "value" zone of the active session.
• Session Automation: Set your custom session hours in the inputs (e.g., London Open to NY Close). The indicator will automatically draw, track, and cleanly reset itself at the start of each new session to prevent historical data from polluting your current intraday levels.
• Fully Customizable Visuals: Take complete control over the colors and thickness of the POC, VAH, VAL, and background fill to match your personal chart aesthetic perfectly.
How to Trade It
1. The Range Market (Mean Reversion): When the Value Area bands are relatively flat, treat the VAH as resistance and the VAL as support. Fade the edges back toward the POC.
2. The Trend Market (Break & Retest): When price breaks strongly outside the VAH or VAL and the bands begin to aggressively angle upward/downward, the market is in price discovery mode. Do not fade this. Instead, wait for a pullback to the VAH (in an uptrend) or the VAL (in a downtrend) for continuation entries.
3. The Session Shift: Pay close attention to how price reacts to the POC during the first hour of your defined session. Staying above it implies buyer control for the day; staying below implies seller dominance.
The Quantum Ecosystem Integration
The Adaptive SVP is your structural roadmap on the main chart. It is designed to be paired with the Quantum sub-chart indicators for absolute precision:
1. Quantum Confluence : When price retraces to your Adaptive POC, look at Trendilo. If Trendilo flashes a Regular Divergence or glows Neon in the direction of the macro trend, you have a high-probability entry right off the structural level.
2. Quantum Z-Score : Combine VAH/VAL touches with extreme Z-Score readings (+2.0 / -2.0) to validate true exhaustion and snipe the reversal.
3. Quantum Main Chart Divergence: Use this to spot immediate structural momentum shifts exactly as price taps your SVP levels.
⚠️ DISCLAIMER: STRICTLY FOR EDUCATIONAL PURPOSES The information, scripts, and concepts provided in this publication are for educational and informational purposes only and do not constitute financial, investment, or trading advice. Trading in financial markets (including Forex, Crypto, Stocks, and Commodities) carries a high level of risk and may not be suitable for all investors. You could lose some or all of your initial investment. Past performance is not indicative of future results. Always conduct your own due diligence, backtest any strategy thoroughly, and consult with a certified financial advisor before making any trading decisions. By using this script, you acknowledge that you are solely responsible for your own trading actions and outcomes.
指標
BK AK-Ghost Ladder👻 BK AK–Ghost Ladder — FVG Zones, Volume Profile, Confluence, Lifecycle 👻
🙏 All glory to G-d.
Built with standards and discipline passed down by my mentor — thank you for the relentless insistence on structure over noise, and for sharing real knowledge with generosity — no gatekeeping, no cheapness, no games.
Update / Record
A previous version of this publication was hidden due to insufficient description. This republish is a complete explanation of what the script does, how it works, how to use it, and what its limits are.
What this script does
Ghost Ladder is an overlay indicator that detects Fair Value Gaps (FVGs) and manages them as “living” support/resistance zones. It doesn’t just draw rectangles — it tracks each zone’s behavior (touches, breaks, role flips), grades strength (0–100), optionally builds an in-zone volume profile with POC, and adds confluence layers like pivots, MTF alignment, Fibonacci proximity, delta imbalance, sessions, and divergence warnings.
The goal is not prediction — it’s structured context: which zones matter, why they matter, and how price is interacting with them now.
Core features (what you’ll see on chart)
1) FVG detection (bull + bear)
Uses classic 3-bar gap logic:
Bullish FVG: low > high and gap size > ATR threshold
Bearish FVG: high < low and gap size > ATR threshold
Includes timeframe-adaptive distance filters (different settings under 1H vs ≥1H).
2) Zone lifecycle management
Each zone is stored and managed over time:
Expiration by max age (bars)
Optional “reset age on touch”
Optional overlap prevention / “keep strongest”
Optional proximity rules (minimum bars between zones)
“Clean mode” display (shifts/extends boxes for cleaner viewing)
3) Strength score (0–100) + ★ rating
Each zone gets a composite Strength Score that can include:
Volume vs average (optionally using lower timeframe volume aggregation)
Gap size vs ATR
Pivot confluence count
MTF confluence (additional timeframes)
Session weighting (Asia / London / NY / overlap)
Order block + imbalance checks
VWAP proximity/extreme bonus
Fib confluence
Delta divergence
Clustering / consolidation bonus
Role reversal bonus (support flips to resistance and confirms)
The star label displays score tiers (configurable thresholds):
★★, ★★★, ★★★★, ★★★★★
4) In-zone Volume Profile + POC (optional)
For each zone, Ghost Ladder can compute a lower-TF volume profile proxy inside the zone:
Configurable bins (resolution)
POC line (most volume concentration in-zone)
Optional total zone volume label
Optional delta coloring on POC (buy vs sell pressure)
Note: this is a practical proxy using lower-TF bar volumes/close locations — it is not exchange-level true volume-at-price.
5) Smart positioning / role logic (S/R behavior)
Optional “Smart Positioning” modes:
Show All
Hide Wrong Side
Auto Role Flip (support ↔ resistance based on price location + buffer)
Role reversal tracking:
Break detection (body break optional)
Break confirmation bars
Broken-zone persistence for N bars
Reactivation badge when zone becomes relevant again
6) Real-time divergence warnings (optional)
When price is interacting with a zone, it can flag divergence/weakness conditions using:
RSI divergence thresholding
OBV divergence (optional)
ADX weak-momentum check (optional)
You can choose how it displays:
Border only / icon only / both / color change
7) Fibonacci confluence (optional)
Computes fib levels from a lookback swing (highest/lowest over period), then counts if fib levels fall inside/near a zone (tolerance %). Optional fib lines + labels (with “only current fib” cleanup).
8) Adaptive learning + backtesting (optional)
Zones can be evaluated after touches:
“Success” if price moves away by a threshold
“Failure” if price violates beyond a threshold
Tracks wins/losses per zone
Updates an adaptive weight periodically
Optional ML-style confidence badge when sample size is meaningful
This is not a machine-learning model in the academic sense — it’s a performance-based weighting and confidence heuristic.
9) Info Table (optional)
A compact “war room” table on the last bar summarizing:
Active zone counts (bull vs bear)
Current market posture (near support/resistance, above/below, neutral)
Nearest S/R levels
Bias estimate
Active session
Risk assessment
10) Alerts
Built-in alert conditions include:
Magnetic pull active (price entering magnetic range of a strong zone)
Strong bullish FVG / strong bearish FVG (high strength score)
Divergence detected while price touches a zone
How to use (simple workflow)
Start with the stars: focus on ★★★★–★★★★★ zones first.
Trade the edges, not the middle: entries are usually better at zone boundaries with defined invalidation.
Respect role flips: a broken zone that flips and confirms can become a higher-quality level than a fresh gap.
Use divergence as a brake: divergence-at-zone = reduce size, wait for confirmation, or stand down.
Let filters remove excuses: tune distance filters, minimum stars, institutional-only mode, session weighting to match your market + timeframe.
Badge / icon legend (labels)
Depending on enabled features, labels may include:
🔥 = cluster / stacked zones
🎯 = pivot confluence
⚡ = MTF confluence
📐 = fib confluence
⚠ = delta divergence / warning
🔗 = merged / consolidated
📈 = upgraded to “institutional” classification
🤖 = confidence badge (sample-size based)
🔄 = reactivated zone
Repaint / reliability notes (important)
FVG zones: detected from past bars ( reference) → does not require future bars.
Pivot markers: use ta.pivothigh/ta.pivotlow → pivots confirm after pivotPeriod bars. That’s normal and means pivot signals are delayed/confirmed, not “future-looking.”
Lower-TF volume profile: depends on available lower timeframe data; can be heavier and may vary slightly by broker/feed.
Scores/labels: update as new touches, breaks, and confirmations occur (expected “living” behavior).
Performance / chart limits
This script uses many drawing objects (boxes/lines/labels) and can be resource-heavy:
Reduce profile bins, disable volume profile, or increase filters if you hit object limits or slowdowns.
“Clean Mode” can simplify the on-chart clutter.
Disclaimer
This indicator is for educational and analytical purposes only. It does not provide financial advice and does not guarantee outcomes. All “institutional / smart money / confidence” terminology is heuristic scoring, not a claim of certainty.
🙏 All glory to G-d — may He bless your vision, patience, and discipline at the boundary.
指標
HTF Candle Profile [UAlgo]HTF Candle Profile is a higher timeframe candle visualization tool that rebuilds each selected HTF candle from the lower timeframe bars that form it, then projects a horizontal volume profile inside that HTF candle range. The goal is to make intrabar participation visible directly on the price chart, so you can see where volume concentrated within the candle, where it was thin, and where the dominant traded price level emerged.
Instead of treating a daily or four hour candle as a single block, the script aggregates the lower timeframe bars as they arrive and distributes their volume across price bins covering the HTF candle’s high to low range. The result is a compact profile drawn from the start time of the HTF candle toward the right, with width proportional to relative volume per bin and color intensity driven by a gradient. This provides a fast read of internal structure: balanced candles, directional candles, rejection wicks, and consolidation pockets become easier to interpret because you can see the volume distribution inside the candle.
The indicator draws on the main chart and keeps a small rolling history of recent HTF candles to stay responsive and to respect object limits.
🔹 Features
1) Multi Timeframe HTF Candle Reconstruction
The script listens for a new HTF candle event using the selected timeframe input. When a new HTF candle begins, the previous one is finalized and drawn. During the active HTF candle, each incoming lower timeframe bar updates the running OHLC and stores its high, low, and volume for profiling.
This approach enables a live building profile for the current HTF candle while preserving completed profiles for recent candles.
2) Intrabar Volume Profile Built from LTF Data
For each HTF candle, the price range from low to high is divided into a user defined number of bins. Each lower timeframe bar contributes volume into all bins it spans. Volume is distributed evenly across the spanned bins to approximate participation within that bar’s range. This produces a per bin volume distribution that is stable and visually interpretable even when lower timeframe candles have large ranges.
3) Gradient Based Profile Intensity
Each bin is drawn as a horizontal box. Its color comes from a gradient that maps low volume to a softer profile color and high volume to a stronger profile color. This makes it easy to spot high participation nodes and low participation voids within the HTF candle.
Inputs allow independent control for bullish and bearish candle coloring and for the low volume and high volume profile colors.
4) POC Line Option
The script can optionally plot a POC line representing the price level of maximum volume within the HTF candle. This is drawn as a dashed horizontal line that spans the candle’s start time to end time. POC is often used as a reference for acceptance, fair value, or a magnet level during retracements.
5) Candle Body, Wick, and Time Boundaries
To keep the profile anchored and readable, the script also draws:
A translucent body box from HTF open to HTF close
A vertical wick line from HTF high to HTF low
A dotted start boundary and a dotted end boundary for the HTF candle window
These elements provide context so the profile is always interpreted within the candle structure that produced it.
6) Object Management and Rolling History
To keep charts clean and avoid exceeding platform limits, the script maintains a small history of HTF candles and deletes drawings for older ones. Each candle owns its objects and can fully clear them when removed from the rolling window.
🔹 Calculations
1) New HTF Candle Detection
A new candle event is detected using timeframe change on the selected timeframe:
isNew = timeframe.change(tf)
When isNew is true:
The previous HTF candle is finalized by setting its end time and drawing it
A new HTF candle object is created and added to the array
Old candles beyond the history limit are removed and their drawings deleted
2) HTF Candle Aggregation from LTF Bars
Each incoming lower timeframe bar updates the active HTF candle:
method addLtf(HtfCandle this, float h, float l, float c, float v) =>
this.ltfData.push(LtfBar.new(h, l, v))
this.h := math.max(this.h, h)
this.l := math.min(this.l, l)
this.c := c
Interpretation:
High is updated to the maximum seen so far within the HTF candle window
Low is updated to the minimum seen so far
Close is updated to the most recent close
Each LTF bar is stored with its high, low, and volume for later bin distribution
3) Bin Construction Across the HTF Candle Range
When drawing a candle, the script divides the HTF range into binCount segments:
float step = (this.h - this.l) / bCount
for i = 0 to bCount - 1
this.bins.push(ProfileData.new(this.l + i * step, this.l + (i + 1) * step, 0.0, na))
Each bin stores:
minP and maxP boundaries
accumulated volume for that price segment
a box handle for drawing
4) Volume Distribution from Each LTF Bar into Bins
For each stored LTF bar, the script determines which bins the bar spans and distributes volume evenly across them:
int startIdx = int((ltf.l - this.l) / step)
int endIdx = int((ltf.h - this.l) / step)
startIdx := math.max(0, math.min(startIdx, bCount - 1))
endIdx := math.max(0, math.min(endIdx, bCount - 1))
int spanned = endIdx - startIdx + 1
float vPerBin = ltf.v / spanned
for j = startIdx to endIdx
ProfileData b = this.bins.get(j)
b.vol += vPerBin
Interpretation:
The bar range is mapped to bin indexes
Indexes are clamped so they remain inside the array
Volume is divided by the number of spanned bins
Each spanned bin receives an equal share of that bar’s volume
This is a robust approach for intrabar profiling without tick data.
5) POC Computation
The script finds the bin with the maximum accumulated volume and sets the POC price at the midpoint of that bin:
float maxVol = 0.0
float pocP = na
for b in this.bins
if b.vol > maxVol
maxVol := b.vol
pocP := math.avg(b.minP, b.maxP)
If enabled, a dashed POC line is drawn across the HTF candle window:
if sPoc and not na(pocP)
this.lPoc := line.new(x1=this.st, y1=pocP, x2=this.et, y2=pocP, xloc=xloc.bar_time, color=cPoc, style=line.style_dashed, width=2)
6) Profile Box Width Scaling
Each bin’s box width scales by its volume relative to the maximum volume bin. Width is capped as a fraction of the candle’s time duration:
int duration = math.max(this.et - this.st, 1)
int volWidth = int((duration * 0.40) * (b.vol / maxVol))
int boxRight = this.st + volWidth
Interpretation:
duration represents the HTF candle time width
0.40 is the maximum profile width fraction of the candle duration
b.vol / maxVol converts volume to a normalized ratio
boxRight is calculated so all profile boxes start at the candle start time and extend rightward based on volume
7) Gradient Coloring of the Profile
Each bin color is mapped from low volume to high volume using a gradient:
color gradColor = color.from_gradient(b.vol, 0, maxVol, cLow, cHigh)
This keeps low participation zones visually lighter and high participation zones more prominent.
8) Candle Body and Wick Drawing
The script draws an HTF candle body box and a wick line for context:
float topP = math.max(this.o, this.c)
float botP = math.min(this.o, this.c)
this.bBody := box.new(left=this.st, top=topP, right=this.et, bottom=botP, xloc=xloc.bar_time, bgcolor=color.new(c, 85))
this.lWick := line.new(x1=midTime, y1=this.h, x2=midTime, y2=this.l, xloc=xloc.bar_time, color=color.new(c, 30), width=2)
It also draws start and end boundary lines so the candle window is clearly defined in time.
指標
Delta Ladder Order Flow [UAlgo]Delta Ladder Order Flow is an overlay order flow visualizer that builds a per bar delta ladder using lower timeframe candles as an intrabar proxy. For each recent bar, the script pulls the underlying lower timeframe open, high, low, close, and volume arrays, then distributes volume into discrete price buckets. Each bucket accumulates estimated buy volume and sell volume, producing a ladder that resembles a footprint style view.
The display focuses on three core outputs:
A delta heatmap ladder where each price level is colored by net delta dominance
A Point of Control highlight that marks the highest total volume level inside the bar
A stacked imbalance detector that scans diagonally across levels to identify aggressive one sided participation and optionally projects that stack forward
The system is designed with stability controls for real world chart conditions. It includes dynamic scaling to prevent excessive level counts on high range bars, object budgeting through bars to draw limits, and text filtering to reduce clutter.
🔹 Features
1) Intrabar Resolution via Lower Timeframe Data
The ladder is constructed using request.security_lower_tf. You select an Intrabar Resolution timeframe that must be lower than the chart timeframe. The script then receives arrays of LTF candles for each chart bar and uses them as a proxy for footprint style aggregation.
This approach provides a practical order flow approximation on TradingView charts without requiring native tick level data.
2) Ladder Aggregation with Tick Size Multiplier
Price levels are aggregated using the symbol mintick multiplied by a user multiplier. Increasing the multiplier produces thicker ladder steps and fewer levels. Decreasing it produces finer granularity but increases the number of boxes drawn.
This control is critical for balancing detail versus performance across different symbols and volatility regimes.
3) Dynamic Scaling to Prevent High Range Bar Overload
A single volatile bar can contain too many price steps if the granularity is too fine. To prevent crashes, the script estimates how many steps would be required for the bar and increases the effective step size when the raw step count exceeds Max Levels per Bar.
This keeps rendering stable even during high volatility events while still maintaining a consistent ladder representation.
4) Buy, Sell, and Neutral Volume Attribution
Each LTF candle’s direction is inferred from its open and close:
Close above open is treated as buy side volume
Close below open is treated as sell side volume
Close equal open is treated as neutral and split evenly between buy and sell
Volume is then distributed across the price buckets covered by the LTF candle range so that wide candles spread their influence across multiple levels.
5) Delta Heatmap Ladder with Intensity Scaling
Each price bucket computes delta as buy volume minus sell volume and total volume as the sum of both. Ladder cells are colored positive or negative based on delta sign, and transparency is scaled by how dominant the delta is relative to the maximum total volume level inside that bar. This yields a compact heatmap where strong imbalances visually stand out.
A square root curve is applied to intensity to improve mid tone visibility without making everything fully opaque.
6) Point of Control Highlight
The ladder tracks the price level with the highest total volume and marks it as the Point of Control. When enabled, the POC row uses a dedicated border color and a stronger border width so the acceptance anchor is immediately visible.
7) Stacked Imbalance Detection and Projection
The script can detect stacked diagonal imbalances. It compares volume across adjacent price levels using a diagonal logic similar to footprint tools:
Bullish diagonal checks buy volume at a level versus sell volume at the level below
Bearish diagonal checks sell volume at a level versus buy volume at the level above
An imbalance requires the winning side to exceed the losing side by the configured Imbalance Ratio and also exceed a minimum volume threshold to filter low volume noise. When consecutive imbalanced levels reach the Stacked Levels count, the stack is marked and optionally extended forward as a zone.
Stack members also override normal heatmap coloring and are rendered more solid for emphasis.
8) Clean Visual Controls
Several options support readability:
Bars to Draw limits workload and object count
Show Delta Values can be toggled on or off
Min Delta to Show Text filters small prints
Ladder Width percent controls how wide the ladder is relative to the bar space
Text size can be adjusted for different chart zoom levels
Box outline can be hidden by default for a cleaner footprint aesthetic
🔹 Calculations
1) Intrabar data acquisition (lower timeframe arrays)
The script requests arrays of LTF OHLCV values for each chart bar using request.security_lower_tf.
ltf_open = request.security_lower_tf(syminfo.tickerid, tf_input, open)
ltf_close = request.security_lower_tf(syminfo.tickerid, tf_input, close)
ltf_high = request.security_lower_tf(syminfo.tickerid, tf_input, high)
ltf_low = request.security_lower_tf(syminfo.tickerid, tf_input, low)
ltf_vol = request.security_lower_tf(syminfo.tickerid, tf_input, volume)
These arrays contain the lower timeframe candles that make up each chart bar. Each chart bar index has its own embedded array.
2) Base tick step (bucket size control)
Bucket size starts from mintick multiplied by Tick Size Multiplier.
var float base_tick_step = syminfo.mintick * tick_size_mult
This is the baseline price increment used to build the ladder levels.
3) Last bar execution model (performance design)
The script only builds and draws ladders when barstate.islast is true. It then reconstructs the last N bars using an index offset.
if barstate.islast
int start_idx = math.max(0, bar_index - bars_to_draw + 1)
for i = start_idx to bar_index
int offset = bar_index - i
float arr_o = ltf_open
float arr_c = ltf_close
float arr_h = ltf_high
float arr_l = ltf_low
float arr_v = ltf_vol
This design dramatically reduces CPU and memory load compared to updating every bar.
4) Dynamic scaling per bar (anti crash protection)
For each bar, the script estimates how many price steps would be needed using the current bucket size. If that count exceeds Max Levels per Bar, it increases the step size only for that bar.
float bar_h = high
float bar_l = low
float bar_range = bar_h - bar_l
float raw_steps = bar_range / base_tick_step
int scaler = 1
if raw_steps > max_levels_per_bar
scaler := int(math.ceil(raw_steps / max_levels_per_bar))
float current_tick_step = base_tick_step * scaler
Result:
Calm bars use fine granularity
High range bars are automatically compressed into fewer buckets
5) LTF candle direction classification (buy, sell, neutral)
Each LTF candle is classified using its open and close. Neutral candles split volume evenly.
bool is_buy = c > o
bool is_sell = c < o
bool is_neutral = c == o
This is a heuristic proxy for aggressor side. It is not true bid ask data.
6) Align LTF candle range to bucket grid
The candle low and high are rounded to the current tick step so bucket prices align cleanly.
float low_aligned = math.round(l / current_tick_step) * current_tick_step
float high_aligned = math.round(h / current_tick_step) * current_tick_step
7) Step counting and volume per step
The script computes how many bucket levels the candle touches and divides volume equally across them.
int steps = int(math.round((high_aligned - low_aligned) / current_tick_step)) + 1
if steps > 500
steps := 500
float vol_per_step = v / steps
This means wide candles distribute volume across more ladder cells, while tight candles concentrate volume into fewer cells.
8) Writing volume into the ladder map (PriceLevel storage)
Each chart bar owns a DeltaLadder with a map of price to PriceLevel. Each PriceLevel stores buy and sell volume. Volume is added step by step.
type PriceLevel
float price
float buy_vol = 0.0
float sell_vol = 0.0
type DeltaLadder
int bar_idx
map levels
float min_price = 10000000.0
float max_price = 0.0
float max_vol_level = 0.0
float poc_price = na
float poc_vol = 0.0
The add method updates volumes and also tracks max volume and POC:
method add_volume(DeltaLadder this, float price, float vol, bool is_buy, bool is_neutral) =>
if not this.levels.contains(price)
this.levels.put(price, PriceLevel.new(price))
PriceLevel lvl = this.levels.get(price)
if is_neutral
lvl.buy_vol += vol * 0.5
lvl.sell_vol += vol * 0.5
else if is_buy
lvl.buy_vol += vol
else
lvl.sell_vol += vol
float t = lvl.total()
if t > this.max_vol_level
this.max_vol_level := t
if t > this.poc_vol
this.poc_vol := t
this.poc_price := price
The main loop calls this method for each bucket level touched by each LTF candle:
for p = 0 to steps - 1
float level_price = low_aligned + (p * current_tick_step)
ladder.add_volume(level_price, vol_per_step, is_buy, is_neutral)
9) Delta and total volume formulas
Delta and total are defined as methods on PriceLevel.
method delta(PriceLevel this) =>
this.buy_vol - this.sell_vol
method total(PriceLevel this) =>
this.buy_vol + this.sell_vol
These values drive both coloring and POC selection.
10) Stacked imbalance detection (diagonal footprint logic)
Prices are sorted so neighbor comparisons are correct. A stack_map stores whether each price belongs to a bullish or bearish stacked run.
float prices = ladder.levels.keys()
array.sort(prices)
map stack_map = map.new()
Diagonal comparisons:
Bullish diagonal compares BuyVol at level i with SellVol at level below i minus 1
Bearish diagonal compares SellVol at level i with BuyVol at level above i plus 1
Bullish check includes a zero handling rule:
if i > 0
float p_below = array.get(prices, i-1)
PriceLevel lvl_below = ladder.levels.get(p_below)
if lvl_below.sell_vol == 0
if lvl.buy_vol > imb_min_vol
direction := 1
else
if lvl.buy_vol > lvl_below.sell_vol * imb_ratio and lvl.buy_vol > imb_min_vol
direction := 1
Bearish check includes symmetric logic:
if i < array.size(prices) - 1
float p_above = array.get(prices, i+1)
PriceLevel lvl_above = ladder.levels.get(p_above)
if lvl_above.buy_vol == 0
if lvl.sell_vol > imb_min_vol
direction := -1
else
if lvl.sell_vol > lvl_above.buy_vol * imb_ratio and lvl.sell_vol > imb_min_vol
direction := -1
Runs are tracked and only accepted if the number of consecutive levels meets the stacked requirement:
if math.abs(i - run_start_idx) >= stack_count
for k = run_start_idx to i - 1
stack_map.put(array.get(prices, k), run_dir)
The script also draws a projected zone for the detected stack band:
box.new(right_time, p_top + current_tick_step/2, right_time + 1000 * 60 * 60 * 24, p_bot - current_tick_step/2,
xloc=xloc.bar_time, border_width=0, bgcolor=color.new(c_stack, 85), extend=extend.right)
11) Heatmap intensity and transparency mapping
For each price level, intensity is computed as abs(delta) relative to the maximum total volume level in the bar, then curved and mapped into transparency.
float intensity = ladder.max_vol_level > 0 ? math.abs(delta) / ladder.max_vol_level : 0
intensity := math.min(intensity, 1.0)
float curved_intensity = math.sqrt(intensity)
float transp = 97 - (curved_intensity * 57)
Stacked members force stronger visibility:
if stack_map.contains(p)
intensity := 1.0
transp := 30
12) POC marking in the drawing pass
POC is detected during volume accumulation, then used in rendering to upgrade the border style for that cell.
bool is_poc = show_poc and (p == ladder.poc_price)
color border_c = is_poc ? col_poc : col_outline
int border_w = is_poc ? 2 : 1
13) Delta text rendering filter
Text labels are optional and can be filtered by a minimum absolute delta threshold.
if show_text and math.abs(delta) >= text_threshold
string txt = str.tostring(delta, format.volume)
label.new(int((left_time + right_time)/2), p, txt,
xloc=xloc.bar_time, style=label.style_none,
textcolor=txt_col, size=text_size)
指標
Accumulation Zone Profiles [UAlgo]Accumulation Zone Profiles is an overlay indicator that detects low volatility accumulation phases and automatically builds a fixed range volume profile for each confirmed zone. The script uses a statistical volatility model based on log returns, identifies periods where volatility compresses into an unusually quiet regime, then verifies that price action remains sufficiently sideways before confirming the zone.
When a zone is confirmed, the indicator draws two complementary views:
A highlighted accumulation range on the chart
A fixed range volume profile drawn to the right of the zone, including Point of Control and Value Area levels
The intent is to turn consolidation into a structured map. Instead of treating ranges as vague rectangles, the script assigns a volume distribution to the range so you can see where the market accepted price, where it rejected price, and which levels are most likely to matter during expansion.
🔹 Features
1) Statistical Accumulation Detection Using Log Volatility
The detection engine starts from log returns r = ln(C / C ) and builds an EWMA based volatility estimate. Volatility is converted into log space and evaluated with a rolling distribution model. A z score determines whether the current volatility is unusually low relative to its own history.
Zones begin when the z score falls below a configurable entry threshold and they end after volatility recovers above an exit threshold for a configurable number of confirmation bars.
2) Sideways Quality Filter With Trend Score
Not every low volatility period is true accumulation. The script measures drift using a trend score defined as:
absolute sum of returns divided by sum of absolute returns
Lower values indicate more rotation and less directional drift. A maximum trend score filter ensures zones remain meaningfully sideways before a profile is created.
3) Non Repainting Option Using Confirmed Bars
When enabled, the system only updates on confirmed bars. This reduces repainting behavior and makes zone start and zone end decisions more stable for live trading workflows.
4) Fixed Range Volume Profile Per Zone
For each confirmed accumulation zone, the script builds a histogram of volume across a user selected number of price rows. Each bar’s volume is distributed into bins according to how much of that candle range overlaps each bin. This produces a true fixed range profile for the zone.
The profile is drawn to the right of the zone so it does not cover price action.
5) Point of Control and Value Area Levels
The highest volume row is treated as the Point of Control. Value Area High and Value Area Low are computed by expanding outward from POC until a target percent of total volume is captured. This creates a practical acceptance framework inside the zone.
Optional plotting allows:
Highlighting the POC row
Drawing VAH and VAL lines
Drawing zone boundary guides
Showing an information label that summarizes zone statistics
6) Tick Alignment For Clean Levels
If enabled, the zone range, bin step size, and derived levels are aligned to the instrument tick size. This produces cleaner price levels and reduces floating point noise in labels and lines.
7) Object Budget Management
Volume profiles use many boxes. The script computes an effective rows value based on the number of profiles you choose to keep, then limits total box usage so you are less likely to hit platform object limits. Older profiles are deleted automatically when new ones are created.
8) Alerts
Two alerts are available:
Accumulation Zone Started
Accumulation Zone Confirmed and Profile Created
This supports automation such as watchlist monitoring and breakout preparation.
🔹 Calculations
1) Log Return and EWMA Variance
The script defines log return as ln(C / C ) and uses an EWMA of squared returns as a variance proxy.
Alpha for EWMA:
f_alpha(int len) =>
2.0 / (len + 1.0)
Log return:
lr = math.log(close / close )
lr := na(close ) or close == 0.0 ? 0.0 : lr
EWMA variance and volatility:
alphaFast = f_alpha(fastLen)
var float ewmaVarR = na
ewmaVarR := na(ewmaVarR ) ? lr * lr : alphaFast * (lr * lr) + (1.0 - alphaFast) * ewmaVarR
vol = math.sqrt(math.max(ewmaVarR, 0.0))
2) Log Volatility Distribution and z Score
Volatility is transformed into log space to stabilize distribution behavior. The script maintains EWMA estimates of mean and second moment, then computes standard deviation and z score.
eps = 1e-10
logVol = math.log(vol + eps)
alphaDist = f_alpha(distLen)
var float m1 = na
var float m2 = na
m1 := na(m1 ) ? logVol : alphaDist * logVol + (1.0 - alphaDist) * m1
m2 := na(m2 ) ? logVol * logVol : alphaDist * (logVol * logVol) + (1.0 - alphaDist) * m2
sigma = math.sqrt(math.max(m2 - m1 * m1, eps))
z = (logVol - m1) / sigma
Interpretation:
Negative z means volatility is below its typical level
More negative z means stronger compression
3) Zone Start and Zone End Conditions
Entry and exit logic uses the z score relative to thresholds:
Start when z is less than or equal to minus Enter Threshold
End when z is greater than or equal to minus Exit Threshold for Exit Confirm Bars
lowNow = not na(z) and z <= -enterZ
highNow = not na(z) and z >= -exitZ
Exit confirmation counter:
zb.exitCount := highNow ? zb.exitCount + 1 : 0
bool exitByConfirm = zb.exitCount >= exitBars
A maximum zone duration also forces closure:
bool exitByMax = zb.barCount() >= maxZoneBars
If exit is triggered via confirmation bars, the script removes those last bars from the zone before profiling to avoid contaminating the accumulation range with the volatility recovery phase.
4) Sideways Drift Score Filter
During zone building, returns are accumulated:
sumR is the signed drift
sumAbsR is total movement magnitude
Trend score:
method driftScore(ZoneBuilder this) =>
math.abs(this.sumR) / math.max(this.sumAbsR, 1e-10)
A zone is accepted only if:
Bar count is at least Min Zone Bars
Drift score is less than or equal to Max Trend Score
5) Profile Range and Row Step
Once accepted, the profile range is built from the min low and max high of the zone. The range is optionally aligned to tick.
Step size equals range divided by rows, with optional tick alignment:
float stepRaw = (hi - lo) / rows
float step = stepRaw
if alignTick
step := math.max(syminfo.mintick, f_roundToTick(stepRaw))
6) Volume Histogram Construction
For each bar in the zone, volume is assigned into bins.
If the candle range is very small, volume goes to a single nearest bin.
Otherwise, volume is distributed proportionally by overlap between candle range and each bin range.
Core proportional distribution logic:
float overlap = math.max(0.0, math.min(bh, binHi) - math.max(bl, binLo))
if overlap > 0
float frac = overlap / br
array.set(binVol, b, array.get(binVol, b) + bv * frac)
This produces binVol, a per row volume distribution.
7) POC Calculation
POC is the index of the maximum bin volume. POC price is the center of that row.
if v > maxV
maxV := v
pocIdx := b
float poc = lo + (pocIdx + 0.5) * step
8) Value Area Computation
Value Area is derived by expanding outward from POC until the cumulative volume reaches Value Area percent of total volume.
Target volume:
float target = totV * (valueAreaPct / 100.0)
Expand left and right by choosing the side with higher next volume until the target is met. This creates a contiguous value area band.
VAL and VAH mapping to prices:
float valP = lo + left * step
float vahP = lo + (right + 1) * step
9) Rendering Logic
Zone highlight is drawn directly over the accumulation period using a box with configurable fill and border transparency.
The volume profile is drawn as a stack of boxes to the right of the zone. Each row width is proportional to row volume relative to max row volume. Transparency is mapped so high volume rows appear more prominent.
POC row can be highlighted using a dedicated color and transparency configuration.
VAH and VAL can be drawn as horizontal lines across the profile region, and optional boundary lines can mark the start and end of the detected zone.
10) Profile Retention and Cleanup
Profiles are stored in an array. When the number of stored profiles exceeds Keep Last Profiles, the oldest profile is deleted and all of its objects are removed. This keeps the chart responsive and prevents reaching the platform maximum object counts.
指標
KDE Value Clouds [LuxAlgo]The KDE Value Clouds indicator is a quantitative tool that uses Kernel Density Estimation (KDE) to visualize the statistical distribution of price action, identifying high-density "Value Clouds" where the market has spent the most time.
🔶 USAGE
The indicator highlights areas of price " fair value " by calculating the probability density of price across a user-defined lookback period. Traders can use these density clusters to identify significant support and resistance levels that are often invisible to standard trend-following indicators.
🔹 Value Clouds
The " Value Clouds " appear directly on the price chart as gradient boxes. These clouds highlight regions where the density of price action exceeds the 50th percentile of the total distribution.
High Density (Bright Colors): Indicates a "Balance Area" where the market has reached a temporary equilibrium. These often act as magnets for price.
Low Density (Gaps): Indicates "Inefficiency" or fast moves where the market did not spend much time. These areas are often revisited or "filled" later.
🔹 KDE Profile & POC
On the right side of the chart, a smooth horizontal profile represents the continuous density function. The KDE POC (Point of Control) is the single price level with the highest calculated density within the lookback period, serving as the ultimate "anchor" for the current market regime.
🔹 How to use
Traders can look for price to "stall" or range within the bright Value Clouds, as these represent accepted price levels. When price moves into a "Gap" (a low-density area), it often moves quickly until it reaches the next cloud.
The KDE POC can be used as a primary support or resistance level; a breakout above a high-density cloud often signals a shift in market sentiment, while a rejection at the edge of a cloud suggests the market is still in a balanced state.
🔶 DETAILS
🔹 KDE vs. Volume Profile
A standard Volume Profile relies on "bins" (rectangles) to count volume at specific price steps. This can create "jagged" profiles that change drastically depending on the chosen row size.
The KDE Value Clouds approach is different because it uses a continuous probability function. Every price point in the lookback period contributes a small "bell curve" of influence to the total profile. This allows for a much smoother and more mathematically sound representation of where " Value " actually resides, regardless of arbitrary bin sizes.
The core of this indicator relies on two primary mathematical concepts:
Gaussian Kernel Estimation: Instead of simply counting occurrences, the script applies a Gaussian weight to every price point. This results in a "smooth" profile that captures the true shape of the price distribution.
Silverman’s Rule of Thumb: To prevent the clouds from being too noisy or too blurry, the indicator uses Silverman’s rule to calculate an optimal " Bandwidth ." This bandwidth adapts based on the standard deviation of the price data, ensuring the visualization stays relevant across different volatility regimes.
🔶 SETTINGS
🔹 Main Settings
Lookback Period: The number of bars used to calculate the price density. A higher lookback provides a "macro" view of value, while a lower lookback focuses on recent rotations.
Bandwidth Multiplier: Adjusts the "smoothness" of the KDE curve. Increasing this value will make the clouds broader and smoother; decreasing it will make them more granular.
Precision (Steps): Defines the vertical resolution of the density calculation. Higher values result in a more detailed profile.
🔹 Visualization
High/Low Density Colors: Customizes the gradient used for both the side profile and the on-chart clouds.
Profile Width (%): Controls how far the KDE profile extends horizontally across the right side of the chart.
Show Value Cloud on Chart: Toggles the visibility of the background "clouds" that highlight high-density price zones.
指標
Anchored Clusters Volume Profile [LuxAlgo]The Anchored Clusters Volume Profile indicator utilizes K-Means clustering to categorize historical price action into distinct groups within a user-defined range and generates individual volume profiles for each detected cluster. This tool provides a unique perspective on volume distribution by isolating price behaviors based on proximity rather than strictly chronological order.
🔶 USAGE
The indicator identifies "clusters" of price activity within a selected range defined by a starting and ending date. Each cluster is assigned a unique color and its own horizontal volume profile, allowing traders to see where liquidity is most concentrated within specific price regimes.
🔹 Identifying Institutional Zones
Traders can use the Point of Control (POC) of high-volume clusters to identify significant institutional interest. Because the K-Means algorithm groups price action by density rather than time, a cluster's POC often represents a "fair value" level where significant exchange occurred. These dashed POC lines frequently act as robust support or resistance levels when price returns to them in the future.
🔹 Market Regime Detection
By observing the vertical distribution and overlap of clusters, traders can identify market phases. Overlapping clusters with high volume often indicate accumulation or distribution phases (sideways markets), whereas distinct, vertically separated clusters with lower volume gaps between them suggest a trending environment. A shift from multiple overlapping clusters to a new, isolated cluster can signal a breakout or the start of a new trend.
🔹 Precision Entry & Exits
Cluster boundaries and POC lines provide concrete levels for trade management. An entry can be sought when price retests a high-volume cluster POC, while stops can be placed outside the total price range of that specific cluster (the area covered by its volume profile). Conversely, targets can be set at the POC of the next major cluster above or below current price action.
🔹 Volume Conviction
The tool provides specific volume metrics that allow traders to gauge conviction. By comparing the "Total" volume label of one cluster against another, a trader can determine which price regime had more participation. A breakout into a price zone with a high-volume cluster suggests stronger conviction and a higher probability of the level holding compared to a zone with low total volume.
🔶 DETAILS
Unlike traditional anchored volume profiles that provide a single histogram, this script employs a K-Means clustering algorithm to segment the range. This process involves:
Identifying the specific range of bars between the user-selected Start Time and End Time .
Initializing "centroids" across the price range of that period.
Iteratively assigning each price bar to the nearest centroid based on the HLC2 (median) price.
Recalculating centroids based on the volume-weighted average price of the assigned bars.
Finalizing assignments after the specified number of iterations to ensure stable clusters.
By separating price action into these clusters, the tool helps identify high-interest zones that might be obscured by a single, traditional Volume Profile.
🔶 SETTINGS
🔹 Anchor Settings
Start Time / End Time : Sets the beginning and end of the analysis range. These use the "Confirm" feature, allowing you to select the range directly on the chart after adding the indicator or changing settings.
Range Highlight : Adjusts the color and transparency of the background shading that identifies the analyzed range.
🔹 Clustering Settings
Number of Clusters : Sets how many distinct price groups the algorithm should attempt to find (2 to 10).
K-Means Iterations : Controls the number of times the algorithm refines the cluster centers. Higher values can lead to more stable results.
🔹 Volume Profile Settings
Rows per Cluster VP : Defines the vertical resolution (number of bins) for each individual cluster's profile.
Max VP Width (Bars) : Sets the maximum horizontal length of the volume profile histograms.
VP Offset : Adjusts the horizontal spacing between the current bar and the start of the volume profiles.
Highlight Price Dots : Toggles the visibility of the colored dots on the price action to identify cluster assignments.
Dot Size : Adjusts the size of the cluster assignment dots on the chart, ranging from tiny to huge.
指標
Volume Anchored Price Map [LuxAlgo]The Volume Anchored Price Map indicator is a sophisticated institutional-grade tool designed to visualize where the highest concentration of trading activity is occurring relative to current price action.
By combining statistical volume analysis through dynamic "Bubbles" with a retrospective Volume Profile, it allows traders to identify high-interest liquidity zones and potential institutional support/resistance levels.
🔶 USAGE
The indicator provides a multi-layered view of market activity, helping traders distinguish between standard price movement and high-conviction institutional participation.
🔹 Identifying Institutional S/R
The projected dashed lines with TIER labels act as a roadmap for liquidity. Institutions often defend positions at these high-volume price points. When price returns to a TIER I level, traders should expect a significant reaction, either in the form of a strong reversal or a high-momentum breakout.
🔹 Spotting Absorption and Exhaustion
Large bubbles often signal the end of a move or the beginning of a major shift:
Exhaustion : Large red bubbles at the end of a downtrend suggest sellers are throwing in the towel (climax).
Absorption : Large green bubbles at the top of an uptrend can indicate institutional absorption of supply or a "blow-off" top.
🔹 Market Speed and the Value Area
The Price Map profile reveals the "thickness" of the market at specific prices:
High Volume Nodes (Wide/Bright Bars) : Expect price to slow down and consolidate. These are "sticky" areas where the market is comfortable.
Low Volume Areas (Thin Bars) : Price often moves through these zones rapidly due to a lack of historical interest, facilitating fast breakouts.
🔶 HOW TO USE
Traders can utilize the Volume Anchored Price Map to identify high-probability entries based on where "smart money" has previously transacted.
Filter Price Action : Look for TIER I or TIER II levels that align with the widest bars (High Volume Nodes) of the Price Map Profile. These confluences mark the strongest historical "Fair Value" zones.
Wait for Mean Reversion : If price deviates far from the High Volume Nodes into a "Low Volume Area" and a large Volume Bubble appears, it often indicates an exhaustion point where price is likely to snap back toward the high-volume center.
Breakout Confirmation : Use the levels as a breakout filter. A candle closing decisively above or below a projected TIER level—accompanied by a new Volume Bubble—suggests institutional participation in the new direction.
🔶 DETAILS
🔹 Price Map (The Gradient Histogram)
The tool looks back at a user-defined lookback window and calculates the total volume traded at every price bin. It displays this as a heatmap anchored to the right. Brighter, wider bars represent High Volume Nodes (HVN) where the market has found significant value or spent considerable time.
🔹 Volume Bubbles (Z-Score Analysis)
Instead of using raw volume, the script utilizes a Z-Score (a statistical measure of standard deviations from the mean). When volume spikes significantly above the average, a bubble is placed on the price action. The bubble size scales dynamically based on its statistical intensity (Z-Score), ranging from "Tiny" to "Huge."
🔹 Projected Anchor Levels
When a significant volume bubble is detected, the script "anchors" that price level and projects it forward. These levels are categorized by importance:
TIER I (Extreme) : Massive liquidity events (> 6 standard deviations). Major structural significance.
TIER II (High) : Strong institutional interest (4 to 6 standard deviations).
TIER III (Significant) : Noteworthy volume spikes (2 to 4 standard deviations).
🔶 SETTINGS
🔹 Price Map Profile
Lookback Length : Determines the historical window used to calculate the volume profile and identify bubbles.
Price Bins : The vertical resolution of the profile. Higher values create a more detailed histogram.
Show Price Map Profile : Toggles the visibility of the volume heatmap.
Profile Color : Sets the base color for the volume profile gradient.
🔹 Volume Bubbles
Show Volume Bubbles : Toggles the visibility of the Z-Score based circles.
Bubble Sensitivity (Z-Score) : The threshold at which a volume spike is considered significant enough to display.
Project Levels from Bubbles : Enables the projection of horizontal dashed lines from significant bubbles.
Max Projected Levels : Limits the number of active anchor levels displayed on the chart.
Label Horizontal Offset : Adjusts the position of the TIER labels to prevent overlap with the profile.
🔹 Dashboard
Enable Dashboard : Toggles the data table showing lookback, POC (Max Vol Level), and current Z-Score.
Position/Size : Controls the visual placement and scale of the dashboard on the chart.
指標
Gaussian Volume Profile [LuxAlgo]The Gaussian Volume Profile indicator is a sophisticated volume analysis tool that uses the Levenberg-Marquardt optimization algorithm to fit a Sum of Gaussians model to historical volume distribution.
This approach transcends traditional discrete volume profiles by providing a continuous, noise-reduced representation of liquidity clusters, allowing for the precise identification of high-volume nodes and their respective price boundaries.
🔶 USAGE
The indicator projects a lateral volume density map to the right of the current price action. Users can utilize this tool to identify "fair value" zones where the Gaussian peaks are most concentrated. Unlike standard profiles that show jagged horizontal bars, this tool provides a smooth "fit" line that highlights the true center of gravity for volume at specific price levels.
🔹 Identifying High-Volume Nodes
The script automatically detects local maxima (peaks) within the fitted Gaussian model. These peaks represent the most significant price levels where the highest density of trading occurred. Horizontal dashed lines are drawn at these apexes, color-coded to match the specific Gaussian component that is most dominant at that price.
🔹 Zone Width and Volatility
By observing the width (standard deviation) of the individual Gaussian components (the dotted curves), traders can gauge the "breadth" of a value area. A narrow, sharp peak suggests a very specific price level of agreement, while a wide, shallow curve indicates a broad range where volume was distributed less precisely.
🔶 DETAILS
This tool represents a scientific advancement over regular Volume Profiles by applying a Gaussian Density model to market data:
Noise Reduction: Discrete profiles are often "noisy," with small volume gaps between price ticks. The Sum of Gaussians model acts as a sophisticated filter, smoothing out insignificant variances to reveal the underlying structural liquidity.
Levenberg-Marquardt Optimization: The script utilizes the LM algorithm, a standard in non-linear least squares problems, to iteratively refine the fit of multiple Gaussian pulses. This ensures the model converges on the most mathematically accurate representation of the volume data.
Precise Liquidity Centers: While a standard profile bin might be several ticks wide, the Gaussian apex provides a mathematically derived "center" ($\mu$) for liquidity, often offering more precise support and resistance levels.
Continuous Distribution: Because it models volume as a continuous function, it can estimate volume density between discrete price bins, providing a more fluid view of market interest.
The visual output combines a lateral histogram with a bold Gaussian density curve, color-coded components, and auto-detected peak levels for a comprehensive view of institutional interest.
🔶 SETTINGS
🔹 Profile Settings
Lookback Window: The number of historical bars used to calculate the volume profile distribution.
Number of Bins: Determines the vertical resolution of the profile. More bins provide more detail but require more computation.
🔹 Gaussian Settings
Max Potential Peaks: The maximum number of Gaussian components (nodes) the algorithm will attempt to fit to the data.
Max Iterations: Controls how many times the LM optimizer refines the fit. Higher values improve accuracy but may impact performance.
Initial Lambda: The damping factor for the optimization algorithm, affecting the early steps of the fitting process.
🔹 Visuals
Histogram Resolution: The maximum horizontal length of the projected histogram and fit line, measured in bar widths.
Highlight Window Range: Toggles a visual background box covering the historical lookback area for context.
Highlight Detected Peaks: Detects local maxima in the final fit and draws horizontal dashed levels at those price points.
Fit Color: Sets the static color for the main density curve.
Auto: When enabled, the fit color automatically adapts to your chart's foreground color (e.g., white on dark backgrounds).
指標
Volume Grid Heatmap [LuxAlgo]The Volume Grid Heatmap indicator provides a two-dimensional visualization of volume distribution across both price and time, allowing traders to identify areas of high liquidity and intense trading activity within a specific lookback period.
By partitioning the historical price action into a customizable grid, this tool maps volume data onto specific price-time coordinates, using heatmap color gradients to highlight "hot zones" where the most significant market participation has occurred.
🔶 USAGE
The indicator is primarily used to identify institutional activity, support/resistance zones, and liquidity clusters that might not be visible on a standard volume histogram.
🔹 Identifying High Activity Zones
Brightly colored cells in the heatmap represent areas where a high volume of shares or contracts changed hands at a specific price during a specific time interval. These zones often act as significant magnets for future price action or areas where price may find temporary friction.
🔹 Volume Distribution
Unlike a standard Volume Profile which only shows volume by price, the Grid Heatmap shows how that volume was distributed over time. Users can see if a high-volume price level was formed by a single massive spike (a single bright cell) or by consistent trading over a longer duration (a horizontal row of highlighted cells).
🔶 DETAILS
The script operates by dividing the recent price range (Highest High to Lowest Low over the lookback period) into a user-defined number of rows and columns.
For every bar within the lookback:
The script calculates the volume for that bar.
It distributes that volume across the grid rows based on the price overlap of the bar's high and low relative to the grid cell boundaries.
The volume is then aggregated into the corresponding time column.
Finally, the grid is normalized against the maximum volume found in any single cell, and colors are applied using professional perceptually uniform colormaps.
🔶 SETTINGS
🔹 Grid Settings
Lookback Bars: Determines the historical window of bars used to calculate the price range and volume data.
Rows (Price): Defines the vertical resolution of the grid. More rows provide more precise price-level analysis.
Columns (Time): Defines the horizontal resolution of the grid. More columns provide more precise timing of volume spikes.
🔹 Visuals
Heatmap Theme: Selects the color palette used for the gradient (Viridis, Inferno, Magma, Plasma, Cividis, or Turbo).
Transparency: Adjusts the visibility of the grid cells to ensure the underlying price action remains clear.
指標
Key Price Levels Daily Ver [structJCWL]As an independent developer and active trader, I built this tool to address a personal frustration: the lack of precision in standard session-level indicators. For those who trade based on market micro-structure, a level that is "approximately" correct is a logic error.
Key Price Levels Daily Ver is an engineering implementation focused on reconstructing session data with surgical accuracy. It is designed for traders who require reliable, noise-filtered benchmarks to anchor their daily execution.
THE ENGINEERING LOGIC:
1-Second (1S) Intrabar Reconstruction : Standard scripts often rely on daily-bar data, which can be imprecise. This tool re-aggregates the session using 1-Second (1S) granularity . By processing every sub-candle, it ensures that POC, Value Area, and Extremes are anchored to the true weight of capital commitment.
The 15-Minute Threshold (Technical Rationale) : To maintain the high fidelity of 1S data aggregation, this indicator is optimized for timeframes ≤ 15 minutes . Calculating micro-structure on higher timeframes leads to data thinning and reduced precision—limitations I refuse to accept in my personal trading setup.
Adaptive Visual Hierarchy (Fade & Limits) : To prevent visual clutter, I’ve integrated Fade Strength and Timeframe Limits . Lines automatically adjust their transparency or visibility based on your current timeframe, ensuring that the most relevant levels remain clear while secondary noise recedes.
Reliability by Design : In 24/7 markets, script stability is paramount. I have implemented defensive programming (including a 98,000-unit memory circuit breaker ) to prevent overflows during extreme volatility. I strive for absolute dependability; if you encounter any issues, your feedback is highly welcome as we refine and improve this tool together.
作为一名独立开发者与实战交易者,我构建此工具是为了解决一个长期的困扰:标准时段指标精度的缺失。对于基于市场微观结构进行交易的人来说,“大约准确”的水位本身就是一种逻辑错误。
Key Price Levels Daily Ver 是我对日内关键水位线的个人工程化实现,专注于以“外科手术式”的精度重构时段数据。它专为那些需要可靠、过滤噪音的基准位来锚定日内执行的交易者而设计。
核心设计逻辑:
1秒级微观重构 (1S Precision) :我不满足于直接调用现成的日线数据。脚本通过扫描 1秒 (1S) 微观颗粒度数据 来重构整个交易时段,确保 POC 和价值区的计算基准来自于最真实的成交细节。
15分钟周期硬限制 :为了保证 1S 数据聚合的极致精度,本脚本仅限在 15分钟及以下周期 运行。在更长周期调用微观数据会导致精度大幅下降。作为开发者,我不允许“大约准确”的逻辑存在于我的系统里。
自适应视觉层级 (Fade & Limits) :通过内置的 淡化强度 (Fade) 与 周期限制 (Limits) ,水位线会根据你当前的图表周期自动调节透明度或可见性。
可靠性设计 :在 24/7 不间断的交易中,脚本的稳定性至关重要。我在代码底层加入了防御性设计(包括 98,000 数组容量熔断机制 ),旨在防止极端行情下的计算溢出或图表崩溃。我追求的是一个能让人放心的工具,若你在使用中发现任何问题,欢迎随时反馈,我们共同完善。
Feedback & Interaction:
As a personal project, this script is continuously refined. I welcome any bug reports or suggestions for improvement to make this tool even more robust for the community.
Compliance & Credits:
Author: structJCWL (Independent Developer & Trader)
License: Mozilla Public License 2.0 (MPL 2.0)
Attribution: Core data aggregation and state-machine logic are 100% original implementations
指標
Volume Profile Fixed RangeVolume Profile Fixed Range (VPFR)
Volume Profile Fixed Range is a technical indicator designed to build a volume profile within a user-defined range. The script distributes volume across price levels using lower timeframe data, allowing traders to identify key liquidity zones and the level with the highest volume concentration (POC).
When you add the indicator to the chart, it will prompt you to select two points — the boundaries of the working range. After choosing the start and end points, the indicator:
• loads lower timeframe data
• divides the price range into a specified number of rows
• distributes volume across them
• builds a histogram and marks the POC (Point of Control) level
Using LTF data improves profile accuracy compared to calculations performed on the current timeframe.
Important!
The profile cannot be built correctly using a single bar. The calculation requires a range consisting of multiple candles — this is due to the way graphical objects are rendered in Pine.
Inputs
Range
Start Time / End Time — Define the boundaries of the range within which the profile is built.
Settings
Auto Timeframe — Automatically selects a lower timeframe based on the current one. This helps balance calculation accuracy and performance.
Seconds — Enables second-based timeframes for 1-minute charts and below. If you do not have access to second-level data, disable this option when using Auto Timeframe on a 1-minute chart.
Lower Timeframe — Manual selection of the lower timeframe when Auto Timeframe is disabled.
Rows — The number of price levels in the profile. Higher values increase detail but also raise computational load.
Hist Width % — Adjusts the histogram width relative to the selected range.
Visual
These settings allow you to modify:
• profile row color
• range background color
• POC line color
• informational text size and position
• extension of the POC line to the right
Possible Runtime Errors
The indicator includes built-in checks to prevent incorrect calculations.
"No lower timeframe data is available"
Occurs when the selected lower timeframe is too small or when the profile is built too far back in history where data is unavailable.
Solution: increase the Lower Timeframe or move the working range closer to the present.
"The execution time limit has been reached"
Appears under excessive computational load — typically caused by an overly long range or a large number of profile rows.
Solution: increase the lower timeframe, reduce the Rows parameter, or shorten the calculation range.
指標
Net Buy Volume [theUltimator5]This indicator tracks cumulative net buy volume using TradingView's footprint data tool.
Disclaimer: The volume footprint is a premium tool that is only available to premium subscribers or higher. If you don't have a premium plan, there is a possibility that you won't be able to use this indicator.
Three Display Modes:
- Volume: Cumulative net buy volume (buy volume - sell volume)
- Dollars: Cumulative net buy volume converted to dollar value
- Delta: Bar-by-bar difference between buy and sell volume
One recommended use case is to move the indicator on top of the chart to visualize real-time divergences between price and buy or sell volume. Price and volume divergence can indicate institutional moves that are hidden underneath the price action.
Customizable Price Calculation (for Dollar mode):
- Close price
- Open price
- (Open + Close) / 2
- (High + Low + Open + Close) / 4
- (High + Low) / 2
Visual Design:
- Volume mode: Aqua stepline showing cumulative net buying/selling
- Dollar mode: Neon pink stepline showing dollar-weighted net volume
- Delta mode: Green/red columns showing immediate buy/sell pressure
Values are automatically formatted as K (thousands), M (millions), or B (billions)
How to Use:
1. Select your preferred data type (Volume, Dollars, or Delta)
2. If using Dollar mode, choose how price should be calculated
3. Watch for trends in cumulative volume to identify sustained buying or selling pressure
4. Use Delta mode to see individual bar pressure in real-time
指標
Volume Profile S/R Zones (Peaks)Volume Profile S/R Zones (Peaks) is a volume-profile based support/resistance tool that converts significant volume nodes into tradable zones, then ranks them by how consistently price respected them over the selected lookback.
The script builds a rolling Volume Profile over a user-defined window (default 81 days) using a fixed number of price bins (default 33 rows). For each price bin it accumulates:
Total volume traded inside that price region
Bullish volume (lower-timeframe bars that close above open)
Bearish volume (implied as total − bullish)
The profile is plotted on the left side of the chart. All profile elements and zones are intentionally forced to a single clean style: white at 20% opacity (labels keep the chart’s default text color styling).
What it detects
1) High Volume Nodes (Peaks)
The script scans the profile rows and detects local maxima (HVNs). To prevent noisy “micro peaks,” a peak must pass two quality filters:
Relative-to-Max filter: peak volume must be at least a % of the largest node’s volume
Prominence filter: peak volume must exceed the average of nearby nodes by a minimum ratio
These filters remove weak nodes and keep only meaningful price areas where the market traded heavily.
2) Optional Low Volume Nodes (Troughs / LVNs)
When enabled, the script also detects local minima (LVNs). LVNs can behave like “barrier” areas where price rejects or moves quickly through.
Zones instead of lines
Each detected node becomes a zone, not a single price line.
Zone center = middle of the profile row
Zone thickness is adaptive:
Zone Half-Width = max(price bin size, ATR × fraction)
This makes zones robust to volatility and reduces “false breaks” caused by small wicks.
Zone merging (reduces clutter)
Nodes close to each other are merged into a single zone if their centers are within:
Merge Distance = ATR × fraction
The merged zone center becomes volume-weighted, so stronger nodes dominate.
Reliability scoring (the core feature)
Every zone is scored by replaying price interaction over the lookback window:
Events
Touch: candle range intersects the zone
Valid rejection: touch + close exits the zone in the expected direction
Confirmed break: close outside the zone, confirmed by:
distance beyond the zone (ATR-based), or
a minimum number of consecutive closes outside
Scoring
Touch adds points
Rejection adds more points
Confirmed break subtracts points
A decay factor is applied each bar so older interactions matter less than recent ones
This produces a practical ranking: zones that get repeatedly respected score high; zones that fail score low.
What you see on the chart
Left-side Volume Profile (white 20% opacity)
Top N strongest zones (ranked by score), drawn as horizontal bands across the chart
Right-side price labels showing each zone’s center price
Label tooltip includes:
zone center price
reliability score
current “role” (support-side vs resistance-side)
polarity bias (bull/bear/neutral based on volume delta)
Inputs and how to tune
Volume Profile
Profile Lookback (Days): defines market memory (short = tactical, long = structural)
Rows: resolution of price bins (higher = more detailed, lower = smoother)
Profile Width: visual width of the profile histogram
POC mode: optional regular or developing POC line
Zones
Top N Zones: limits clutter by plotting only the strongest zones
ATR Length / Zone Half-Width: controls how wide zones are
Prominence / Relative-to-Max: controls strictness of peak detection
Merge Distance: merges nearby zones into one
Scoring
Touch / Rejection / Break points
Decay factor (higher = longer memory)
Break confirmation settings (ATR distance + consecutive closes)
How to use (practical framework)
This indicator is designed to treat volume nodes as acceptance/rejection areas, not perfect lines:
Focus on high-score zones (they have the most recent evidence of being respected)
Use zones as:
potential accumulation/defense areas (support-side)
potential supply/ceiling areas (resistance-side)
Break confirmation is ATR-based to reduce false breakdowns/breakouts
For investing, many users run two instances:
long lookback (e.g., 252 days) for macro zones
shorter lookback (e.g., 81 days) for tactical entries
Notes / Limitations
The script is a historical structure tool, not a predictor.
Zones can shift gradually as the rolling lookback window updates.
Different assets (high volatility vs low volatility) may require different row counts and filter strictness.
License / Credits
Based on LuxAlgo’s Volume Profile foundation and heavily modified to add zone construction, merging, and reliability scoring.
Licensed under CC BY-NC-SA 4.0 (Attribution–NonCommercial–ShareAlike).
指標
Apex / ChartFanatics Bubbles + Clusters + SweepsApex / ChartFanatics Bubbles + Clusters + Sweeps
This open-source indicator combines four visual elements — Volume Bubbles, Volume Clusters, Liquidity Sweep Markers, and Dynamic Supply/Demand Zones — into a single overlay tool. The goal is to provide traders with a unified view of volume intensity, aggressive price action, and key institutional reference levels on any timeframe or instrument.
Why this combination?
Many volume and structure tools exist separately, but combining them creates synergy:
- Volume Bubbles highlight relative volume strength instantly (quick glance at participation level).
- Volume Clusters emphasize high-volume bars as potential support/resistance areas.
- Liquidity Sweep markers flag classic "fakeout" or stop-hunt behavior (aggressive wicks that fail to sustain).
- Supply/Demand zones provide context for where price is likely to react after sweeps or clusters form.
Together, these elements help traders spot:
- Areas of high institutional interest (clusters + zones)
- Potential reversals after liquidity grabs (sweeps + zones)
- Confirmation of momentum via volume size and candle direction (bubbles + clusters)
This mashup is not random — it follows a logical Smart-Money / Order-Flow inspired workflow: detect volume → identify aggressive liquidity raids → map reaction zones → visualize everything for fast decision-making.
Core Features & How They Work
1. Volume Bubbles (Quantile-Based)
- Volume is ranked against a rolling lookback (default 200 bars).
- Dynamic quantiles divide the volume range into buckets (default 10 levels).
- Bubble size scales with quantile rank (tiny → huge).
- Color: bright green (bullish close) or bright red (bearish close), with adjustable opacity.
- Only shown when volume exceeds 1.2× the lookback minimum (avoids noise).
- Tooltip shows exact volume, delta (close-open), and quantile position.
2. Volume Clusters
- Draws semi-transparent boxes around bars exceeding a user-defined minimum volume.
- Width adjustable (default 4 bars forward) to highlight clusters visually.
- Same bullish/bearish coloring as bubbles for consistency.
3. Liquidity Sweeps
- Detects classic sweep patterns on the previous bar:
→ Bullish sweep: high > previous high, but close < previous high AND bearish candle
→ Bearish sweep: low < previous low, but close > previous low AND bullish candle
- Marked with a bright yellow star (★) label + tooltip.
- Useful for identifying potential stop hunts or failed breakouts.
4. Supply & Demand Zones
- Uses pivot high/low (default lookback 20 left/right) to detect swing points.
- Supply zone: from pivot high downward by 2× ATR(14).
- Demand zone: from pivot low upward by 2× ATR(14).
- Zones extend rightward dynamically (up to +30 bars) and remain visible until new pivots form.
- Brownish for supply (resistance), greenish for demand (support).
Inputs & Customization
- Bubble Quantiles (3–15): more levels = finer volume grading
- Bubble Opacity: controls transparency
- Volume Lookback: historical window for quantile calculation
- Cluster settings: toggle, min volume, width
- Sweeps & Zones: individual toggles
- Zone Pivot Lookback: sensitivity of swing detection
How to Use
- Best on lower timeframes (1m–15m) for scalping/day trading or higher (1h–4h) for swing setups.
- Look for confluence:
→ Large green bubble + cluster + demand zone + bullish sweep = strong support area
→ Large red bubble + cluster + supply zone + bearish sweep = strong resistance area
- Use sweeps as early warning of potential reversal when price approaches a zone.
- Combine with your own price action or structure analysis — this is a visual aid, not a signal generator.
- Keep chart clean: toggle off unused features if cluttered.
Publishing Notes
- Publish with a clean chart (only this indicator active, no other overlays/drawings).
- Recommended symbols: volatile instruments (forex majors, indices, crypto, gold).
- Max labels/boxes set high (500) to handle long histories — reduce if performance issues occur.
This script is fully open-source for transparency and learning. It is provided for educational purposes — no guarantees of profitability. Trading involves risk.
Feedback welcome — happy charting!
指標
Trend Matrix: Institutional Confluence EngineTrend Matrix: Institutional Confluence Engine
The Institutional Confluence Engine is a professional-grade diagnostic tool designed to solve the two biggest problems in technical analysis: market noise and false breakouts.
Unlike standard lagging indicators, the Institutional Confluence Engine uses a sentient resolution engine to adapt its logic based on whether you are scalping or swing trading. It provides a real-time "Efficiency Grade" for the market, allowing you to ignore "C-Grade" chop and focus exclusively on "A-Grade" institutional trends.
Institutional Confluence and Alerts: Notifies you only when the Local, HTF1, and HTF2 timeframes all align at an "A-Grade" efficiency—the hallmark of a major structural move.
How to Trade It
Identify Confluence: Look for the Status Hub in the top right. When all three grades turn Green (A), institutional alignment is at its peak. This is also visible on the chart.
Monitor Trend Core: The ribbon acts as dynamic support/resistance. "Trend Flares" (brightening of the ribbon) indicate significant volume spikes entering the trend.
Profit Targets: Use the dynamic Green/Red expansion lines. These are volatility-adjusted targets that stretch or contract based on market energy (ATR).
Volume Intelligence
1. The Big Money Heatmap (Volume Intelligence)
Institutional players leave footprints in the form of volume. This engine visualizes these footprints using a dynamic Volume Profile integrated directly into your price action.
Big Money Clusters: These are price levels where massive institutional orders are being "filled." They represent high-conviction zones that act as magnets for price.
Major Buy/Sell Zones (POC): This marks the Point of Control—the exact price where the highest volume has transacted. It represents "Fair Value." Breakouts away from this zone often lead to the most explosive moves.
Gap Prediction: The engine analyzes the sentiment within volume nodes to predict if the market is preparing for an institutional "Gap Up" or "Gap Down."
2. The Golden Bridge (Structural Confluence)
The system calculates the Golden Bridge—a dynamic threshold based on the 0.618 Fibonacci ratio between major structural pivots.
The Logic: In institutional finance, the 0.618 level is the "Line in the Sand." If a rally holds above the Golden Bridge, the trend is structurally sound.
Golden Cluster Stronghold: When the Golden Bridge aligns perfectly with a Big Money Cluster, the system identifies a "Stronghold." This is the highest-probability support or resistance level generated by the engine.
3. MTF Efficiency Grading (A/B/C)
The Trend Matrix doesn't just show direction; it calculates Efficiency.
Grade A (High Efficiency): Price is tracking the trend core with minimal deviation. This is where institutional momentum is strongest.
Grade B (Moderate Efficiency): Healthy trending with standard pullbacks.
Grade C (Low Efficiency/Chop): Price is oscillating. The system will automatically "dim" the interface during these periods to prevent you from over-trading.
4. Status Hub & Intelligent Alerts
The Status Hub provides a real-time cockpit of your trading environment, displaying the "Trend Reliability Score" (0-100%) and Multi-Timeframe grades.
Confluence Alerts: Get notified when the Local, HTF1, and HTF2 timeframes all reach "A-Grade" status simultaneously.
Exhaustion Pillars: Vertical pillars on your chart highlight "Volume Spikes," warning you of potential trend exhaustion before the reversal happens.
How to Use
Check the Hub: Ensure the Trend Reliability is above 75%.
Verify Grade: Look for "A-Grade" efficiency on your local timeframe.
Find the Stronghold: Enter trades where the Golden Bridge and Big Money Clusters overlap for the highest-probability entries.
Target Expansion: Follow the dynamic Green/Red target lines for volatility-adjusted take-profits.
Disclaimer: Trading involves significant risk. This tool is designed for educational and diagnostic purposes and should be used as part of a comprehensive trading plan.
指標
Orderflow GapThis is the **Orderflow Gap (OG)** analyzer.
It goes beyond standard price gap detection by integrating
**Market Structure (Dow/SMC)** and **Intra-Bar Orderflow**
to classify the quality and intent behind price discontinuities.
Key Features:
1. **Advanced Gap Detection & Lifecycle:**
- **Flexible Definition:** Users can define gaps based on
market psychology:
- **Body (Open-Close):** Focuses on the "True Gap" between
sessions or candles, ignoring wicks.
- **Full (High-Low):** Focuses on total price dislocation
where no trading occurred at all.
- **Lifecycle Tracking:** The indicator persistently tracks
open gaps and visually marks them as **Filled** once price
mitigates the area by a user-defined percentage.
2. **Intra-Bar Orderflow Profiling (Pre & Post Analysis):**
- **Context:** Standard tools treat a gap merely as empty price space.
This indicator analyzes the **Micro-Auction** immediately surrounding
the event to understand the mechanics of the move.
- **Reconstruction:** Using high-resolution lower timeframe data, it
builds detailed Volume Profiles for the **Pre-Gap Candle** (The Origin)
and the **Post-Gap Candle** (The Reaction).
- **Flow Validation:** This allows the user to verify **Orderflow Continuity**:
Does the aggressive buying/selling that caused the gap continue
immediately after, or is the move fading into absorption?
3. **Statistical Volume Profile Engine:** For each bar in the anchored
period, the indicator builds a complete volume profile on a lower
'Intra-Bar Timeframe'. Instead of simple tick counting, it uses
**statistical models ('PDF' allocation)** to distribute volume
across price levels and **advanced classifiers ('Dynamic' split)**
to determine the buy/sell pressure within that profile.
4. **Structural & Volumetric Context:**
- **Vacuum (Density):** Calculates the "Volume Density" per
tick. A low density indicates a **Liquidity Vacuum** (price
slipped due to lack of orders), while high density indicates
aggressive fighting.
- **Commitment:** Compares the volume surrounding the gap
to the historical average to determine if big players
are backing the move.
- **Trend Alignment:** Filters signals based on the underlying
trend using either **Dow Theory** or **Smart Money Concepts**.
5. **Gap Classification Engine:**
The indicator automatically classifies gaps into four
structural types based on the metrics above:
- **Breakaway:** A high-conviction move that breaks structure,
showing **Initiative** (breaking previous Value Area) and
**Commitment** (High Volume).
- **Runaway:** A continuation gap within an established trend,
aligned with the Orderflow Delta.
- **Exhaustion:** A gap that occurs late in a trend, often
characterized by a **Liquidity Vacuum** (low density) despite
high volume, signaling potential reversal.
- **Common:** Standard volatility gaps lacking significant structural
or volumetric backing.
**Volume Fallback:** If no volume data is provided by the
exchange (e.g., certain CFDs or Indices), the classification
logic automatically defaults to **Common** to ensure strict
signal integrity without Orderflow verification.
6. **Visual Orderflow Insight:**
- **Profile Visualization:** Plots the reconstructed volume
profile as a polyline directly adjacent to the gap, allowing
you to see the "Injection" of volume that caused the move.
- **Color Coding:** Gaps are color-coded based on their
classification (Breakaway/Runaway/Exhaustion) and direction
(Bullish/Bearish).
7. **Multi-Metric Profiling (Volume, Time, Velocity):** Unlike standard
tools, this indicator allows you to switch between three critical
dimensions of market activity:
- **VOLUME (The "Where"):** Shows standard acceptance levels.
- **TIME (The "How Long"):** Measures duration at price (similar to TPO),
indicating fair value (High Time) or rejection (Low Time).
- **VELOCITY (The "How Fast"):** Measures the speed of trading (Contracts
per Second) to reveal intent. **High Velocity** suggests aggression
(initiative buying/selling), while **Low Velocity** despite volume
indicates absorption (passive limit orders).
8. **Integrated Alerts:** Includes granular alerts for:
- Detection of specific gap types (e.g., "Bullish Breakaway Gap").
- General gap formation.
**Caution: Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This includes
the values used for real-time alerts in 'Structure' and
'Delta' modes.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
指標
Clusters Volume Profile [LuxAlgo]The Clusters Volume Profile indicator utilizes K-Means clustering to categorize historical price action into distinct groups and generates individual volume profiles for each detected cluster. This tool provides a unique perspective on volume distribution by isolating price behaviors based on proximity rather than strictly chronological order.
🔶 USAGE
The indicator identifies "clusters" of price activity within a user-defined lookback period. Each cluster is assigned a unique color and its own horizontal volume profile, allowing traders to see where liquidity is most concentrated within specific price regimes.
🔹 Identifying Institutional Zones
Traders can use the Point of Control (POC) of high-volume clusters to identify significant institutional interest. Because the K-Means algorithm groups price action by density rather than time, a cluster's POC often represents a "fair value" level where significant exchange occurred. These dashed POC lines frequently act as robust support or resistance levels when price returns to them in the future.
🔹 Market Regime Detection
By observing the vertical distribution and overlap of clusters, traders can identify market phases. Overlapping clusters with high volume often indicate accumulation or distribution phases (sideways markets), whereas distinct, vertically separated clusters with lower volume gaps between them suggest a trending environment. A shift from multiple overlapping clusters to a new, isolated cluster can signal a breakout or the start of a new trend.
🔹 Precision Entry & Exits
Cluster boundaries and POC lines provide concrete levels for trade management. An entry can be sought when price retests a high-volume cluster POC, while stops can be placed outside the total price range of that specific cluster (the area covered by its volume profile). Conversely, targets can be set at the POC of the next major cluster above or below current price action.
🔹 Volume Conviction
The tool provides specific volume metrics that allow traders to gauge conviction. By comparing the "Total" volume label of one cluster against another, a trader can determine which price regime had more participation. A breakout into a price zone with a high-volume cluster suggests stronger conviction and a higher probability of the level holding compared to a zone with low total volume.
🔶 DETAILS
The script employs a K-Means clustering algorithm. This process involves:
Initializing "centroids" across the price range of the lookback period.
Iteratively assigning each price bar to the nearest centroid based on the HLC2 (median) price.
Recalculating centroids based on the volume-weighted average price of the assigned bars.
Finalizing assignments after the specified number of iterations to ensure stable clusters.
By separating price action into these clusters, the tool helps identify high-interest zones that might be obscured by a single, traditional Volume Profile.
🔶 SETTINGS
🔹 Clustering Settings
Lookback Period: Determines the number of recent bars used for the clustering analysis.
Number of Clusters: Sets how many distinct price groups the algorithm should attempt to find (2 to 10).
K-Means Iterations: Controls the number of times the algorithm refines the cluster centers. Higher values can lead to more stable results.
🔹 Volume Profile Settings
Rows per Cluster VP: Defines the vertical resolution (number of bins) for each individual cluster's profile.
Max VP Width (Bars): Sets the maximum horizontal length of the volume profile histograms.
VP Offset: Adjusts the horizontal spacing between the current bar and the start of the volume profiles.
Highlight Price Dots: Toggles the visibility of the colored dots on the price action to identify cluster assignments.
Dot Size: Adjusts the size of the cluster assignment dots on the chart, ranging from tiny to huge.
Bollinger Bands with 3SD Volume SegmentationPurpose
This script provides a structured way to analyze how real traded volume distributes across the different volatility zones defined by Bollinger Bands with three standard deviations, it reveals where activity concentrates, how pressure shifts between buyers and sellers, and how market participation behaves as price moves through expanding or contracting volatility regimes. The tool turns the bands into a mechanical segmentation system that exposes the microstructure hidden inside each volatility layer.
How it works
The script calculates Bollinger Bands at one, two, and three standard deviations, then assigns every bar’s volume to the correct volatility zone based on where price closed, it reconstructs buy and sell volume from candle behavior, computes delta as the difference between them, and aggregates these values over the chosen lookback window. Each zone displays total volume, delta, and a dominance percentage that expresses how strongly buyers or sellers controlled that region, all updated dynamically on the most recent bar. For example, if the Mid–U1 zone shows 28,450 contracts with a –2,728 delta and –9.59% dominance, that indicates mild seller control in a normally balanced rotation area, while the L1–Mid zone showing 10,606 contracts, +1,816 delta, and 17.12% dominance signals buyers absorbing pressure and defending the pullback.
Rationale
Volatility zones behave like natural boundaries where liquidity concentrates, where traders commit, hesitate, or get trapped, and where expansions or reversals often originate, so segmenting volume and delta by these zones provides a clearer picture of intent and pressure than raw volume alone. By quantifying how much buying or selling occurred in each volatility layer, the script helps identify continuation, absorption, exhaustion, and imbalance, giving traders a mechanical, objective map of market behavior rather than relying on subjective interpretation.
指標
Precision Market Entropy Heatmap [LuxAlgo]The Precision Market Entropy Heatmap indicator provides a high-resolution visualization of volume distribution and market activity within specific anchor intervals using intrabar data.
By utilizing lower timeframe (LTF) precision, it maps out where the most significant trading activity occurred, allowing traders to identify institutional interest zones and "fair value" areas through a dynamic heat-mapped profile.
🔶 USAGE
The indicator segments the chart into blocks based on the selected Anchor Interval. Within each block, a vertical distribution of volume is calculated using the Intrabar Precision setting to ensure the heatmap accurately reflects market participation at specific price levels.
Heatmap Blocks : Brighter colors represent higher volume concentrations (high entropy). These areas often act as significant support or resistance zones where the market has previously found "fair value" or high liquidity.
Identifying Institutional Interest : High-volume "bright" nodes represent price levels where heavy institutional participation occurred. These nodes act as powerful magnets or barriers for future price action.
Navigating Liquidity Voids : Darker areas indicate low volume nodes (low entropy). Price often "slips" through these gaps quickly. Traders can use these zones to anticipate fast-moving price action or set targets beyond the void.
Trend Direction via POC : Observe the slope and shifts of the Developing POC polyline. An ascending POC confirms bullish value migration, while a descending one suggests bearish value migration.
Mean Reversion : Significant price deviations from the largest high-volume node, when the POC remains static, can signal that the market is overextended and likely to return to "fair value."
Breakout Validation : Use the blocks to identify compression zones. A breakout is more reliable when the POC shifts into the new range, confirming that the move is backed by volume and accepted by the market.
POC Extensions : Dashed lines extend the session's final POC. These are dynamically colored based on their relationship to the current price: Green if the POC is below the current price (potential support) and Red if above (potential resistance).
🔶 DETAILS
Unlike standard Volume Profiles that look at fixed ranges, this script focuses on "Entropy" by visualizing the density of distribution across a user-defined grid.
By requesting security data from lower timeframes, it provides a much more granular view of price action than what is visible on the current chart timeframe alone.
The indicator uses a gradient-based coloring system to distinguish between low-activity areas and high-volume nodes, making it easier to spot "Liquidity Voids" (darker areas) and "High Volume Nodes" (brighter areas).
🔶 SETTINGS
🔹 Heatmap Settings
Anchor Interval : Sets the timeframe that defines each heatmap block (e.g., "D" for Daily blocks).
Intrabar Precision : Determines the lower timeframe used to calculate the volume distribution. Lower values (like "1m") provide higher precision but are limited by available historical data.
Number of Rows : Controls the vertical price resolution of the heatmap grid. Higher values create a more detailed but computationally heavier profile.
🔹 Style Settings
Heatmap Intensity : A three-color gradient selector that defines the color transition from low to high volume areas.
Heatmap Transparency : Adjusts the visibility of the heatmap blocks on the chart.
POC Extension (Bull/Bear) : Sets the colors for the dashed POC lines based on whether they are currently below (Bull) or above (Bear) the market price.
Show Developing POC : Toggles the visibility of the real-time POC polyline.
Auto : When enabled, the developing POC color automatically syncs with your chart theme's foreground color.
🔹 Display Settings
Max Sessions to Show : Limits the number of historical heatmap blocks rendered on the chart to maintain performance.
Extend POCs to Current Bar : When enabled, historical POC lines will extend to the far right of the chart until they are replaced by newer sessions.
指標
Volume Profile with HVN / LVN Detection (Low-TF Safe)Session-based volume profile with VPOC, HVN, and LVN detection, optimized for fast charts and runtime-safe lower-timeframe execution.
Volume Profile with HVN / LVN Detection (Low-TF Safe)
This indicator plots a session-based Volume Profile , highlights the Volume Point of Control (VPOC) , and automatically detects High Volume Nodes (HVNs) and Low Volume Nodes (LVNs) from the completed profile.
It is a performance-focused refactor of the original Volume Profile With HVN/LVN Detector , redesigned to work reliably on fast timeframes (including 5-second charts) without runtime errors.
Features
Session-based volume profile with adjustable row resolution
VPOC with optional extension and date labeling
Automatic HVN and LVN detection from the prior session
HVNs and LVNs displayed as levels or areas
Configurable strength, colors, and line/area styles
Runtime-safe lower-timeframe handling using request.security_lower_tf
Optimized to reduce execution overhead on high-frequency charts
Designed for traders who use volume structure to identify acceptance, rejection, and potential support/resistance zones across all chart timeframes.
---
What’s new in this version
Refactored lower-timeframe logic to prevent runtime errors on fast charts
Automatic, runtime-safe fallback when selected lower TF exceeds chart TF
Stable execution on very low timeframes (e.g. 5s, 10s)
Preserved original profile, VPOC, HVN, and LVN behavior
No repainting of completed session profiles
This update prioritizes stability, correctness, and cross-timeframe compatibility .
---
Credits & Attribution
This script is based on the original
“Volume Profile With HVN/LVN Detector”
by tradeforopp (revised by Madpuppy88 ).
The current version refactors the original implementation to improve:
Runtime safety on low timeframes
Performance on high-frequency charts
Robust multi-timeframe handling
Original concept and core logic credit remain with the original authors.
---
How to Use
VPOC highlights the price level of highest traded volume for the session and often acts as a magnet or balance point.
HVNs represent areas of acceptance where price previously traded heavily and may act as support/resistance or consolidation zones.
LVNs mark areas of rejection where price moved quickly and may act as inflection or breakout levels.
Use HVNs and LVNs from the prior session to frame intraday bias, targets, and risk zones.
On very fast charts, the script automatically falls back to chart-timeframe data to maintain stability.
指標






















