AG Pro Volume Profile POC Magnet Map [AGPro Series]AG Pro Volume Profile POC Magnet Map
Overview
AG Pro Volume Profile POC Magnet Map is a chart-overlay indicator built around one practical question: how strongly is the current Point of Control attracting, holding, or losing price?
Instead of trying to replicate a full volume-profile workstation, this script focuses on the behavior of the active POC and the surrounding value area. The goal is to turn a familiar volume-profile concept into a cleaner decision-support map that helps users judge whether price is still interacting with the current fair-value center, rejecting it, reclaiming it, or beginning to establish value elsewhere.
The script is designed for users who want a visual framework around POC behavior without covering the chart with heavy histogram structures or overly complex dashboards. It highlights the active POC, the current Value Area High (VAH), the current Value Area Low (VAL), a compact magnet band around the POC, and a small set of reaction labels that describe how price is interacting with that area.
In short, this indicator is not trying to tell users what to buy or sell. It is trying to make one specific market reference more readable: the relationship between price and the current POC region.
What the script does
At a high level, the script does five things:
1) It builds a fixed-lookback volume-distribution map from recent chart data.
2) It derives the active POC, VAH, and VAL from that distribution.
3) It measures how close price is to the current POC and how often price revisits or accepts that region.
4) It converts those observations into a compact Magnet Score and state readout.
5) It marks a small set of price/POC interaction events such as Tag, Reject, and Reclaim.
The result is a visual tool that combines reference levels and contextual interpretation in one overlay.
Unique edge
Many indicators can show a POC. This script is built to answer a more specific question: what is the quality of the current POC as a magnet for price?
That difference matters. A raw POC line can be useful, but by itself it does not explain whether price is repeatedly returning to it, drifting away from it, rejecting it, or stabilizing around it. This script adds that missing context by combining the active POC with a behavior layer.
The design goal is not “more features.” The design goal is clearer interpretation:
- Is price still accepting the current value center?
- Is the POC functioning as a pullback magnet?
- Is price rejecting the area instead of accepting it?
- Is value beginning to migrate?
That is the role of the score, the state engine, and the reaction labels.
Methodology
The script uses a fixed lookback window and divides the recent price range into user-defined bins. It then allocates each bar’s volume to one price bin using the selected bar source, which can be Close or HLC3. From that distribution it identifies:
- POC: the highest-volume bin in the lookback window
- VAH: the upper boundary of the selected value area percentage
- VAL: the lower boundary of the selected value area percentage
After the levels are derived, the script evaluates how price is behaving relative to the active POC region.
The Magnet Score is built from multiple components:
- Distance: how far current price is from the POC, normalized by ATR
- Revisit behavior: how often price has returned to the POC region
- Acceptance behavior: how often price has closed near the POC region
- Stability: whether the POC is relatively stable or drifting quickly
- Rejection pressure: whether interactions with the POC region are ending in rejection rather than acceptance
These components are combined into a bounded 0-100 score. Higher readings suggest that the current POC remains a stronger center of attraction. Lower readings suggest weaker pull, weaker acceptance, or a market beginning to operate away from the current value center.
The script then classifies context into states such as:
- Magnet Strong
- Magnet Active
- POC Tagged
- POC Rejected
- Accepted Away
- Magnet Weakening
This state layer is designed to summarize the current context rather than generate automatic trading instructions.
How to read the chart
POC
The POC is the main reference line. It marks the highest-volume price zone inside the selected lookback distribution. If price repeatedly returns to it, reacts from it, or consolidates around it, that line is functioning as an active center of interest.
VAH and VAL
VAH and VAL define the current value-area boundaries. These help users judge whether price is still operating inside value or beginning to establish acceptance above or below it.
Magnet band
The magnet band is a narrow region around the POC. It exists to make POC interaction easier to read visually. It is not a claim that every touch is meaningful. It is simply a compact visual tolerance zone around the active POC.
Reaction labels
The script can display a small set of event labels:
- Tag: price reached the current POC region
- Reject: price interacted with the area and moved away
- Reclaim: price crossed back through the active POC after being on the other side
These labels are meant to help describe interaction, not to replace confirmation logic, risk management, or broader market context.
Panel
The panel summarizes:
- Magnet Score
- POC Distance
- POC Drift
- Value Context
- Last Reaction
- Current POC / VAH / VAL values
This gives users a quick status view without needing to inspect every line manually.
Typical use cases
This indicator may be useful when users want to:
- monitor whether pullbacks are still returning to the active POC
- judge whether price is still auctioning inside value or beginning to accept away from value
- compare different symbols for how “sticky” the current POC region appears to be
- add context to an existing structure, trend, or mean-reversion workflow
- keep a cleaner chart while still tracking basic volume-profile behavior
The script is intended as a context and interpretation layer. It is not a complete trading plan on its own.
Key inputs
Lookback Bars
Controls the size of the historical window used for the profile calculation. A larger value creates a broader context. A smaller value makes the profile more reactive.
Rows / Bin Count
Controls profile granularity. Higher values create more detailed binning. Lower values produce a smoother, simpler map.
Value Area %
Defines how much of total lookback volume is included inside the value area used to derive VAH and VAL.
Price Source For Bin Allocation
Lets users choose whether each bar’s volume is allocated using Close or HLC3. This changes how the profile is distributed across bins.
ATR Length
Used in normalization and spacing calculations, including the distance component and label positioning.
Magnet Band Width (ATR)
Controls the thickness of the tolerance zone around the active POC.
Distance Ceiling (ATR)
Caps how far price can be from the POC before the distance component is treated as maximally weak.
Revisit Window and Acceptance Window
These affect how the script measures repeated interaction and acceptance around the active POC region.
POC Drift Lookback
Used to estimate whether the active POC is relatively stable or shifting.
Label controls
Users can adjust label visibility, density, cooldown behavior, and right-edge line labels to keep the chart cleaner or more descriptive depending on preference.
Alerts
The script includes alert conditions for:
- POC Tag
- POC Reject
- POC Reclaim
- Magnet Strong
- Magnet Active
- Magnet Weakening
- Accepted Away
These alerts are event-based notifications tied to the script’s contextual logic. They are not performance claims and they should not be interpreted as guaranteed entry or exit signals.
Limitations and transparency
This script uses a fixed-lookback, bar-based approximation of volume distribution. It does not reconstruct native exchange-level order flow, bid/ask delta, or true tick-by-tick auction detail.
Volume is allocated to bins using a selected bar source rather than full intrabar volume-at-price reconstruction. That means the profile is intentionally simplified so it can remain lightweight and readable inside a standard Pine overlay.
Because the script uses a rolling lookback window, the active POC, VAH, and VAL can change as older bars leave the window and newer bars enter it. That is normal behavior for this design.
The reaction labels are descriptive, not predictive. A Tag does not imply reversal. A Reject does not guarantee continuation. A Reclaim does not guarantee trend resumption. They are context markers showing how price interacted with the current POC area according to the script’s definitions.
This tool should be read in conjunction with price structure, volatility, liquidity conditions, and user-defined execution rules.
What this script is not
This script is not:
- a full session volume-profile suite
- an order-flow or footprint tool
- a prediction engine
- a guaranteed reversal detector
- a stand-alone trade system
It is a focused overlay for interpreting how price is behaving around the current Point of Control and value-area structure.
Practical interpretation notes
In many markets, the POC acts like a reference area rather than a directional signal. The more often price returns to it and the more often price stabilizes near it, the more useful that region can become as a working fair-value reference.
By contrast, when price begins to hold above VAH or below VAL and stops interacting meaningfully with the POC region, the script may shift toward weaker magnet states or accepted-away context. That does not automatically imply trend continuation, but it does suggest that the current value center may be losing influence.
Users may find this especially useful when comparing:
- balanced conditions vs. directional conditions
- shallow pullbacks vs. deeper value retests
- symbols that keep rotating through value vs. symbols that are clearly accepting away from it
Risk disclosure
This indicator is for chart analysis and market context only. It does not provide investment advice, trading advice, or guaranteed outcomes.
All indicators simplify market behavior. This script is no exception. Markets can ignore previously important value references, react differently across symbols and timeframes, and change behavior as volatility regimes shift.
Users are responsible for their own confirmation process, execution decisions, and risk management. 指標

AG Pro VWMA Dislocation Map [AGPro Series]AG Pro VWMA Dislocation Map
OVERVIEW
AG Pro VWMA Dislocation Map is a state-based charting tool designed to measure how far price is trading from its volume-weighted mean, how persistent that displacement has become, and whether the move is still expanding or beginning to normalize.
This script is built around a simple but often underexplored idea: distance from a moving average is not equally meaningful in all situations. A small deviation can matter when it is persistent and building under directional participation, while a larger deviation can become less informative when the move is already mature and beginning to contract. Instead of treating every separation from the mean as identical, this script organizes that behavior into a structured framework.
The result is a visual map centered on VWMA behavior rather than a classic crossover model. The goal is not to guess tops or bottoms, and it is not to replace broader market structure analysis. The goal is to help the user read displacement quality, persistence, and normalization pressure around a volume-weighted equilibrium reference.
This makes the script useful in two very different but related contexts. In intraday use, it can help identify when a move is still building away from the mean versus when extension may already be mature. In swing use, it can help frame whether price is holding a healthy distance from its weighted mean or rotating back toward equilibrium.
WHAT MAKES IT DIFFERENT
This script is not presented as “another moving average” and it is not intended to function as a simple VWMA trend filter. Its design focus is the behavior around VWMA, not the line by itself.
The main distinction is the state model. Instead of reducing the chart to a binary above/below interpretation, the script tracks whether displacement is mild, active, persistent, extended, overextended, re-approaching, or rebalanced. That adds context to moves that may otherwise look similar at first glance but are materially different in maturity and behavior.
A second distinction is normalization. Raw distance in price units can be misleading across different symbols, different volatility conditions, and different phases of the same market. For that reason, the script evaluates displacement relative to a normalization unit rather than using absolute price distance alone. This is intended to make the map more comparable and more structurally meaningful.
A third distinction is presentation. The indicator is designed as a chart-reading framework, with a central weighted-mean structure, layered displacement bands, background state context, a last-bar state label, and a compact information panel. The output is meant to be descriptive and contextual rather than promotional or predictive.
METHODOLOGY
The script begins with a VWMA reference built from user-defined length and source settings. Around that reference, it measures normalized price displacement. The normalization can be based on ATR, standard deviation, or a hybrid approach, depending on the selected mode.
From there, the script derives several internal components:
1. Distance
This reflects how far price is trading from the VWMA after normalization. The purpose is to measure relative displacement rather than raw tick or point difference.
2. Persistence
This tracks how long the current directional displacement has remained active. A move that has stayed consistently above or below the weighted mean for multiple bars may carry a different interpretation than a one-bar separation.
3. Expansion
This evaluates whether the displacement is still building. Rising displacement can indicate that price is not merely away from the mean, but continuing to separate from it.
4. Normalization
This evaluates whether the displacement is beginning to contract toward the mean. It does not forecast reversal by itself. It is intended to show whether the existing separation is losing expansion pressure and moving into a more balanced phase.
5. Regime
The script also classifies contextual slope behavior into a simplified regime reading. This is not meant to be a full market regime engine. It is a compact contextual aid for distinguishing broader trend-like conditions from quieter or more balanced environments.
These components feed the state engine and the panel metrics. The result is not a claim of certainty, but a structured way to read where price is operating relative to a volume-weighted center.
STATE MODEL
The indicator organizes behavior into discrete chart states. These states are designed for interpretation, not for deterministic outcome prediction.
Balanced
Price is trading close to the VWMA and displacement is limited.
Early Dislocation
Price is beginning to separate from the weighted mean, but the move is still in an early stage.
Persistent Dislocation
Distance is no longer only emerging; it has remained active for a more sustained period.
Extended
The move has reached a stronger separation from the mean and may require more caution in interpretation.
Overextended
Displacement is extreme relative to the current normalization model. This does not mean price must reverse immediately. It indicates an elevated extension condition.
Re-approaching
Distance is beginning to contract and the move may be rotating back toward VWMA equilibrium.
Rebalanced
Price has moved back toward the mean after a prior displacement phase.
The practical value of this model is that it helps separate fresh movement from mature movement. Two charts can both be above VWMA, but one may be in an early building phase while another may already be extended and normalizing.
HOW TO READ THE PANEL
The information panel is designed to provide a quick summary of the current state without overwhelming the chart.
Score
A composite reading of displacement behavior. This is a contextual score, not a performance metric and not a probability estimate.
Bias
A directional summary based on price relative to VWMA.
Regime
A simplified context tag derived from the weighted-mean behavior.
Distance
The current normalized displacement from VWMA.
Persistence
The number of bars associated with the current directional displacement run.
Normalization
A compact measure of contraction pressure toward the weighted mean.
Footer interpretation
A short descriptive line showing the current qualitative state context and whether displacement is expanding or contracting.
The panel is intended to summarize current conditions, not to replace full chart reading.
VISUAL STRUCTURE
The chart output is designed to be read in layers.
The central weighted-mean structure provides the equilibrium reference.
The inner visual structure highlights the core region around VWMA.
The displacement bands expand outward to show increasingly stretched conditions relative to the normalization thresholds.
The background tint provides a broad state cue so users can quickly identify periods of balance, active displacement, or higher extension.
The last-bar state label is included to make the current state readable at a glance without scanning the full panel.
This layered design is intentional. It allows the script to remain visually expressive while still communicating a hierarchy: center, displacement, extension, and normalization.
HOW THIS TOOL MAY BE USED
Some users may apply the script as a continuation context tool. In that workflow, the focus is less on exact entries and more on whether a move is still developing in a healthy way away from the weighted mean.
Some users may apply it as an extension-awareness tool. In that workflow, the purpose is to identify when a move may already be mature and when aggressive continuation assumptions deserve more caution.
Others may use it as a mean-normalization context tool. In that workflow, the interest is not whether price is simply above or below VWMA, but whether the separation is holding, expanding, or rotating back toward equilibrium.
Because of this flexibility, the script is not restricted to one market style. It can be used as an analytical overlay in trending markets, in rotational conditions, or as part of a broader discretionary review process.
SIGNALS AND ALERTS
The script includes alerts tied to state transitions and context changes. These alerts are descriptive events based on the model, not trade promises.
Persistent Dislocation
Triggers when the script enters the Persistent Dislocation state.
Extended
Triggers when the script enters the Extended state.
Overextended
Triggers when the script enters the Overextended state.
Re-approaching
Triggers when the script enters the Re-approaching state.
Rebalanced
Triggers when price rotates back toward the weighted mean after prior displacement.
Score Threshold Cross
Triggers when the composite score crosses above the user-defined threshold.
Bias Flip
Triggers when directional bias flips across VWMA.
These alerts are intended to support monitoring and workflow organization. They should be interpreted in the context of the broader chart.
KEY INPUTS
VWMA Length
Controls the length of the volume-weighted mean.
Normalization Mode
Selects whether normalized displacement is built from ATR, standard deviation, or a hybrid of the two.
Normalization Length
Controls the lookback used in the normalization engine.
Distance Smoothing
Adjusts smoothing applied to the displacement behavior.
Regime Lookback
Controls the lookback used in the regime context calculation.
State Thresholds
Define how mild, active, strong, and extreme displacement are classified.
Persistence Confirmation Bars
Helps distinguish brief separation from more sustained displacement.
Re-Approach Confirmation Bars
Controls how quickly the script recognizes contraction back toward the mean.
Visual Settings
Allow the user to manage bands, background context, VWMA visibility, line strength, opacity behavior, and label placement.
Panel Settings
Allow layout, position, theme, and text sizing adjustments.
The script is intended to be configurable so the same framework can be adapted to different symbols and timeframes without changing its core logic.
LIMITATIONS AND TRANSPARENCY
This script does not predict future price direction.
It is not a standalone trading system, not an execution engine, and not a substitute for full chart analysis.
A strong displacement can remain strong for longer than expected. An overextended reading does not guarantee immediate reversal. A re-approaching or rebalanced state does not guarantee that a larger directional move has ended.
Like any normalized framework, the output depends on the settings chosen by the user. Different symbols, timeframes, volatility environments, and threshold selections can meaningfully change the visual behavior and state classification.
The script should be understood as a descriptive map around a volume-weighted mean, not as a promise of edge by itself.
RISK DISCLOSURE
This indicator is for analytical and educational charting use only.
It does not provide financial advice, investment advice, or guaranteed outcomes.
All trading and investing involve risk. Users should evaluate any signal, state change, or alert in the context of their own process, market conditions, risk controls, and independent judgment.
AG Pro VWMA Dislocation Map is designed to help structure interpretation around VWMA displacement behavior. It is not designed to remove uncertainty from markets, and it should not be used as the sole basis for financial decisions.
指標

ATR Trailing Stops for Hyperliquid Spot + Perps [HYPR-run]DESCRIPTION:
A drop-in ATR trailing exits module. Four architectures that maximize
profit on winning trades using volume weighted volatility instead of fixed levels or
plain ATR. Built modular; the trailing logic is self-contained so you
can drop it into any existing indicator or strategy as a plug-and-play
exits block. Two independent stops (long/short), spot and perps.
DISCOVERING EDGE
ATR trailing exits are popular, everyone uses them, but this indicator doesn't just trail on volatility, it trails on meaningful volatility that very few people measure. In order to gain a persistent, mechanical edge in how winners run and protect capital on the trades that don't work, we explored a more meaningful expression of ATR trailing exits.
VOLUME-WEIGHTED ATR vs PLAIN ATR
Plain ATR treats every candle equally. Volume-weighted ATR will only expand stops when volume validates the volatility, preventing premature exits on noise and letting winners run further on real moves. Over hundreds of trades this single difference can compound in the spirit of letting winners run further, losers stay controlled versus fixed levels or vanilla ATR.
- Four modes (A3.1, A4.0, A4.1, A4.2) cover different trailing
behaviors: ratcheting, chandelier anchor, free-floating, and raw
baseline. All size stop distance from volatility, not fixed levels.
- Modular engine. The trailing logic is self-contained; drop it into
any existing indicator or strategy as a plug-and-play exits block.
- Alerts fire built-in JSON webhook payloads. Paste your webhook URL,
create the alert, execute on the exchange of your choice.
ATR MODES
A3.1: LinReg + plain ATR, no ratchet. The baseline. Linear regression
projects where price is heading, plain ATR sets the distance. Stop moves
freely in both directions. Use as a reference or when you want a raw
trailing stop.
A4.0: LinReg + VWATR + Efficiency Ratio + ratchet (default). The
all-rounder. Volume-weighted ATR discounts low-liquidity candles. The
Efficiency Ratio (Kaufman) measures trend quality: in a clean trend it
widens the stop to let price run; in chop it tightens. Ratchet floor
means the stop only moves in your favor.
A4.1: Chandelier + VWATR + ratchet + first-bar multiplier. Anchored to
the highest high (longs) or lowest low (shorts). First-bar multiplier
sets a tighter initial stop, then the standard multiplier takes over as
the ratchet locks in gains. Use when entering off key levels.
A4.2: LinReg + VWATR, no ratchet. Same as A4.0 but without ratchet
floor or Efficiency Ratio. Stop moves freely with the projection, giving
the trade room through consolidation at the cost of less locked profit.
FEATURES
- Four ATR architectures selectable via dropdown
- Volume-weighted ATR: low-liquidity candles contribute less
- Efficiency Ratio: tightens in chop, widens in trend (A4.0)
- Ratchet floor: stop only moves in your favor (A4.0, A4.1)
- First-bar multiplier for tighter initial protection (A4.1)
- Separate ATR lookbacks for longs and shorts
- Separate multipliers for longs and shorts
- Two-bar confirmation prevents single-wick fakeouts
- Gradient fill between price and stop (intensifies near danger)
- Stop line color shifts with ATR regime (green stable, amber expanding)
- Ratchet circles mark each new locked-in level on the stop line
- Dashboard: mode, stop price, gap %, ER, VWATR %, regime state
- Dark/light theme toggle for any chart background
- Independent long/short alert toggles
- No JSON snippet needed; close payload is built into the script
HOW IT WORKS
Volume-weighted ATR scales each bar's true range by its volume relative
to the lookback average. High-volume bars contribute more; thin candles
contribute less. This prevents low-liquidity spikes from inflating stop
distance. Separate lookbacks for longs (default 14) and shorts (default
26) reflect that crypto drops faster than it climbs.
The Efficiency Ratio measures directional movement versus noise on a 0-1
scale. It scales the ATR multiplier between 0.8x (choppy) and 1.2x
(trending), adapting stop width to market regime. Only active in A4.0.
Two-bar confirmation requires a confirmed close beyond the stop level.
A single wick does not trigger the exit. The cross must hold for at
least one additional bar close.
ALERTS
Close Long fires as SPOT (sell spot position). Close Short fires as
PERPS (close short; spot is long-only). Toggle each independently.
Alert payload is built into the script as JSON; works with any webhook
receiver that accepts market/ticker/position fields.
CREDITS
ATR: J. Welles Wilder (1978)
Efficiency Ratio: Perry Kaufman 指標

AG Pro OBV Pressure Divergence [AGPro Series]AG Pro OBV Pressure Divergence
Overview
AG Pro OBV Pressure Divergence is a context-aware divergence quality map built around the relationship between price structure and On-Balance Volume pressure.
The script is designed to identify bullish and bearish divergence events, then rank those events by participation quality, structural context, and follow-through behavior. Instead of treating every divergence as equally important, it separates weaker pressure disagreements from more meaningful setups and organizes them into a cleaner decision framework.
This is not a generic divergence marker that prints every local mismatch between price and an underlying series. Its purpose is to classify divergence events through a layered process that includes pivot structure, price displacement, OBV behavior, trend context, confirmation timing, and visual emphasis.
The result is a tool that can be used to study when price and participation begin to disagree, while still preserving a practical chart view that remains readable during live market conditions.
What this script does
- Detects bullish divergence when price forms a lower low while OBV forms a higher low
- Detects bearish divergence when price forms a higher high while OBV forms a lower high
- Filters divergence candidates using pivot separation and ATR-based price swing requirements
- Scores events by quality instead of treating all signals the same
- Highlights the strongest events with more prominent chart objects
- Tracks confirmation and invalidation behavior after the initial event
- Displays a compact summary panel for state, pressure, context, and freshness
Unique Edge
Many divergence tools stop at basic detection. They show a disagreement between price and an oscillator or cumulative volume series and leave the rest to the user.
This script takes a different approach.
Its goal is not to maximize the number of divergence labels on the chart. Its goal is to classify divergence quality.
That difference matters. A simple divergence can appear in noisy conditions, in weak structural locations, or without any meaningful follow-through. In those cases, the event may still be technically valid, but not equally useful from an analytical point of view.
AG Pro OBV Pressure Divergence attempts to address that by combining several layers:
1. Structural divergence detection
2. ATR-normalized price displacement filtering
3. OBV pressure comparison between pivots
4. Local trend context using fast and slow EMA structure
5. Setup monitoring through confirmation and invalidation logic
6. Visual hierarchy that distinguishes lower-quality from higher-quality events
Because of this design, the script is better understood as a divergence classification framework rather than a simple divergence marker.
It is also distinct from breakout, reclaim, or trend continuation tools. It does not evaluate break-retest mechanics, VWAP reclaim logic, or general trend strength as its primary objective. Its focus is the quality of price-versus-participation disagreement.
Methodology
The script begins by identifying swing pivots through a configurable pivot length. These pivots form the structural anchor points used to compare price and OBV behavior.
For bullish divergence:
- price must form a lower low
- OBV must form a higher low
For bearish divergence:
- price must form a higher high
- OBV must form a lower high
After a raw divergence is found, the script applies additional requirements before the event is accepted:
Pivot Separation
A minimum bar gap is enforced between pivots so that tightly packed micro-swings do not dominate the output.
Minimum Price Swing
The distance between the two relevant pivots is measured relative to ATR. This prevents very small structural changes from being treated like full-quality events.
Pressure Evaluation
The OBV relationship between the two pivots is examined to determine whether participation is actually improving or weakening in a meaningful way.
Trend Context
Fast and slow EMA structure is used to frame whether the event is appearing against or within the prevailing price environment.
Contextual Location
The script also evaluates where the event is occurring in its local range structure. This helps separate mid-range noise from more interesting reversal or exhaustion locations.
Scoring
All of the above components contribute to a quality score. That score is then used to separate lower-priority events from stronger ones.
Confirmation
After the initial event, the script tracks a confirmation window. During that window, the setup may confirm, remain pending, expire, or become invalidated.
This layered structure is intentional. The script does not assume that a divergence label alone is enough.
Signal Structure
The script organizes events into a sequence instead of a single binary output.
Event Detected
A new bullish or bearish divergence is found and scored.
Pending State
The event remains active while the script monitors whether follow-through appears within the confirmation window.
Confirmed
If the confirmation condition is met within the allowed window, the event is marked as confirmed.
Invalidated
If price fails the setup before confirmation, the event is marked as invalidated.
Expired
If no confirmation occurs within the defined number of bars, the setup is no longer treated as active.
This state-based behavior is useful because it prevents the chart from presenting all divergence events as finalized conclusions the moment they appear.
Quality Model
The script uses a quality threshold and a premium threshold to distinguish event strength.
Lower-quality events can still be displayed when the user wants a fuller map of all structure, but the script can also be configured to focus only on stronger setups.
This creates three practical layers of interpretation:
Building
A divergence exists, but the score is lower and the event should be treated with more caution.
High
The event passes the main quality threshold and receives stronger visual treatment.
Premium
The event exceeds the premium threshold and receives the strongest category treatment in the script.
This does not mean that premium events are guarantees, and it does not imply that lower-quality events are unusable. It simply reflects that not every divergence deserves the same level of attention.
Panel Summary
The summary panel is intended to give quick context without forcing the user to inspect every label one by one.
The panel includes:
- Bias
A simple view of the current directional background based on the fast and slow EMA relationship.
- Pressure
A quick summary of whether OBV pressure is rising, falling, or mixed.
- Last Event
Shows the most recent detected divergence direction.
- Quality
Displays the score and current classification of the most recent event.
- State
Shows whether the most recent tracked setup is in watch, confirmed, invalidated, or idle state.
- Context
Provides a compact view of the local environment, such as trend-up, trend-down, or range-related placement.
- Freshness
Indicates how many bars have passed since the latest tracked event.
Visual Design
The chart output is intentionally organized with hierarchy.
Qualified events are easier to spot than weaker ones.
Confirmation labels are visually distinct from initial event labels.
Link lines help explain which two pivots created the divergence.
Optional background pulse and active setup zone provide temporary emphasis without permanently dominating the chart.
EMA context remains available but is visually secondary to the divergence structure.
Tooltips are included for key settings so that the logic behind the inputs remains understandable directly from the settings panel.
Signals and Alerts
The script includes alert conditions for the main state transitions:
- New Bullish Pressure Divergence
- New Bearish Pressure Divergence
- Premium Bullish Pressure Divergence
- Premium Bearish Pressure Divergence
- Bullish Pressure Divergence Confirmed
- Bearish Pressure Divergence Confirmed
- Pressure Divergence Invalidated
These alerts are designed to reflect internal script states rather than making claims about future price outcomes.
Key Inputs
Pivot Length
Controls how swings are defined. Higher values reduce noise but may delay detection.
OBV Smoothing
Smooths the OBV series before divergence analysis. Higher values create a cleaner but slower pressure curve.
Minimum Pivot Separation
Prevents overly compressed pivots from producing excessive clustering.
Minimum Price Swing (ATR)
Requires meaningful structural movement before a divergence is accepted.
Quality Threshold
Defines the minimum score required for a divergence to be treated as a qualified event.
Premium Threshold
Defines the score level required for premium classification.
Confirmation Window (Bars)
Controls how long a pending event is monitored before it expires.
Use Close-Based Confirmation
Switches confirmation logic between close-based behavior and intrabar high/low behavior.
Main Label Size
Scales event, confirmation, and invalidation labels.
Panel Text Size
Controls panel readability independently from chart labels.
Drawing Emphasis
Adjusts how visually prominent lines, EMA context, and active zone objects appear on the chart.
How to use it
This script is best approached as a context tool, not as a stand-alone decision engine.
A practical workflow may look like this:
1. Identify whether the panel context is aligned with a broad directional background or whether the market is behaving more like a range.
2. Observe whether a new divergence appears in a meaningful local location rather than in the middle of random price noise.
3. Compare the quality score and classification.
4. Watch whether the event confirms or invalidates within the chosen time window.
5. Combine the information with your own structure, risk, and execution framework.
The script is often more informative when used to reduce attention on weaker disagreements and concentrate on better-formed pressure divergences.
Who it may be useful for
This script may be useful for users who want:
- a more structured way to study price and OBV disagreement
- a cleaner divergence map with stronger visual hierarchy
- a chart that distinguishes raw detection from confirmed follow-through
- a volume-pressure oriented lens that is different from standard oscillator-only divergence tools
It may be less suitable for users who want a high-frequency signal stream, a one-click entry engine, or a tool that treats every local divergence as equally relevant.
Limitations and Transparency
This script has important limitations.
First, divergence is an analytical concept, not a guaranteed turning-point mechanism. A divergence can appear and still fail, extend, or resolve slowly.
Second, the scoring model is a ranking method, not a prediction formula. A higher score does not mean certainty. It only means that the event better satisfies the script's internal conditions.
Third, pivot-based logic requires structure to form. This means the script necessarily depends on completed swing information and will not behave like a forward-only projection model.
Fourth, confirmation and invalidation logic are simplifications intended to organize event follow-through. They do not replace full trade management, execution rules, or independent risk control.
Fifth, any indicator that uses volume-derived inputs depends on the characteristics of the underlying market data. Users should be aware that data quality and market structure can differ across symbols and venues.
This script is therefore best used as a contextual classification tool rather than a complete standalone methodology.
What this script is not
- It is not a guarantee of reversals.
- It is not a promise engine.
- It is not a fully automated trading system.
- It is not a substitute for independent structure analysis or risk management.
- It is not designed to predict every local top or bottom.
- It is not intended to imply that premium signals are always superior in every market condition.
Its purpose is narrower and more practical:
to organize OBV-based divergence events into a more useful analytical framework.
Risk Disclosure
This script is for chart analysis and research purposes only.
It does not provide financial advice, investment advice, portfolio advice, or a guarantee of future market behavior. Market conditions can change quickly, and any signal or classification generated by the script can fail or become invalid.
Users should make independent decisions and apply their own risk controls before acting on any chart output.
In summary
AG Pro OBV Pressure Divergence is a public, chart-based tool for analyzing divergence quality through the interaction of price structure and OBV pressure.
Its main contribution is not that it detects divergence, but that it attempts to rank divergence events by structural relevance, pressure context, and follow-through state.
For users who want a cleaner way to study whether price and participation are beginning to disagree, this script aims to provide a more selective and better-organized framework than a raw all-events divergence marker.
指標

[Kpt-Ahab] HeatMap FusionWhat is “HeatMap Fusion”?
HeatMap Fusion merges RSI, Volume Trend, ROC and an enhanced SuperTrend into one stacked heat-map. Smooth colour gradients reveal—at a glance—whether each component is bullish, neutral, or bearish, without cluttering the chart with multiple separate panes.
Key Features
Multi-indicator heat-map
Three symbols with volume- or price-based colouring.
RSI, ROC and SuperTrend share the same colour scale → instant market-breadth read-out.
View switcher – choose RSI, ROC, SuperTrend, Volume SMA, Up/Down Volume or ALL from a single dropdown.
Six colour schemes (red⇅green, purple⇅blue, etc.) for both light and dark layouts.
Optional RSI divergence detection.
Heikin-Ashi–driven SuperTrend plus Rapid Volatility Trend lines.
Performance-optimised – only three request.security() calls for the selected symbols.
Inputs
Group Core settings
Indicator Layer to display
Color Scheme (Heatmap) 6 presets
Symbol 3 tickers, volume/price mode, look-back length
RSI Period, MA type, BB width, divergence flag
Volume Trend SMA length, up/down columns
ROC Period & intensity threshold
SuperTrend Two ATR sets, Heikin-Ashi on/off
(Every parameter is commented inside the script.)
How to Use
Add the script to any chart.
Set SymCal to on when your symbol has real volume data (futures, ETFs, equities).
Replace the three default tickers with your own—e.g. ES1!, ZB1!, CL1! for a macro setup.
Pick a colour scheme; Purple ⇅ Blue looks great on dark backgrounds.
Choose ALL for the full heat-map with labels, or isolate any single layer via the dropdown.
Notes
The heat-map lives in the main pane on fixed Y-bands (0 – 70). Do not enable Auto-Fit scaling.
If a symbol has no volume, SymCal = on yields no colouring—switch it off to fall back to price-based gradients. 指標

指標

指標

指標

AG Pro VWAP Reclaim Quality [AGPro Series]AG PRO VWAP RECLAIM QUALITY
OVERVIEW
AG Pro VWAP Reclaim Quality is a chart-first tool built to evaluate whether a move back above VWAP is clean, weak, delayed, or structurally fragile.
This script does not treat every recovery above VWAP as equally meaningful. Instead, it grades the reclaim event itself and then follows what happens next: whether price can hold above VWAP, whether the retest is constructive, and whether the reclaim deteriorates shortly after recovery.
The objective is simple: separate efficient VWAP reclaims from noisy or late recoveries that may look promising at first glance but fail to show durable acceptance.
This makes the script useful for traders who want more context than a basic VWAP cross. A standard cross can show that price moved from one side of VWAP to the other. This script is designed to evaluate the quality of that transition.
UNIQUE EDGE
The focus here is not generic VWAP direction bias and not a simple above/below state model.
The main edge of the script is its reclaim-quality framework. It evaluates the reclaim as a sequence rather than as a one-line event:
1) reclaim strength,
2) post-reclaim acceptance,
3) retest behavior,
4) timing quality,
5) failure risk.
That structure is what differentiates it from ordinary VWAP cross tools.
A reclaim that closes back above VWAP with a strong bar, holds acceptance, and survives a disciplined retest should not be treated the same as a reclaim that occurs late, stalls immediately, or fails after a shallow recovery. This script is designed to reflect that distinction visually and systematically.
In practical terms, the script attempts to answer a more specific question:
Is this reclaim simply back above VWAP, or is it actually behaving like a higher-quality recovery?
METHODOLOGY
The script starts by tracking session VWAP and identifying reclaim attempts after price has spent time below it.
Once a reclaim is detected, the script evaluates several components:
1) Reclaim strength
The reclaim bar is assessed using distance from VWAP, body efficiency, and close location within the bar. This helps distinguish decisive recoveries from marginal crosses.
2) Acceptance above VWAP
After the reclaim, the script measures whether price is actually holding above VWAP over the next bars. Stable acceptance is treated differently from mixed or poor acceptance.
3) Retest behavior
The script checks whether price revisits VWAP inside a defined tolerance area and whether that test is held constructively. A confirmed retest is handled as separate information rather than being merged blindly into the initial reclaim.
4) Timing quality
Reclaims that occur after an extended stay below VWAP, or later in the intraday session, can be penalized. This allows the script to separate timely recoveries from delayed ones.
5) Failure logic
A reclaim can later be downgraded if price loses structure below VWAP after the recovery. This failure layer is intentionally more selective so that minor noise is not treated as a meaningful reclaim breakdown.
The result is a compact grading model that produces a readable chart-first output instead of a large diagnostic dashboard.
HOW TO READ THE OUTPUT
Main chart labels:
- CLEAN: reclaim quality is strong and structurally healthy
- LATE: reclaim occurred, but timing quality is weaker or delayed
- RT HOLD: VWAP retest was revisited and held constructively
- FAILED: reclaim lost quality and broke down after recovery
Panel fields:
- VWAP Reclaim: current reclaim classification
- Reclaim: strength of the reclaim move itself
- Acceptance: quality of post-reclaim holding behavior
- Retest: whether a constructive retest is confirmed
- Bias: summary interpretation of the current reclaim state
- Quality: compact score representation
The chart is intentionally designed to stay visual and readable. The panel provides state context, while the labels highlight the important transition points.
SIGNALS AND ALERTS
The script includes alert conditions for:
- Clean Reclaim
- Late Reclaim
- Retest Hold
- Failed Reclaim
These alerts are intended to map to the reclaim lifecycle rather than to every minor VWAP interaction.
For more conservative usage, bar-close confirmation is generally preferable when evaluating reclaim quality, especially on volatile instruments or during rapid intrabar movement.
KEY INPUTS
Some of the main controls include:
- VWAP source
- ATR length
- reclaim distance normalization
- minimum prior bars below VWAP
- late reclaim thresholds
- acceptance lookback
- retest tolerance and retest window
- failure delay bars
- panel text size and panel theme
- label visibility and label discipline controls
The script also includes label filtering logic to reduce clustering and keep the chart cleaner by default.
WHAT THIS SCRIPT IS DESIGNED FOR
This script is designed for traders who want to evaluate reclaim quality around VWAP, not merely track whether price is above or below it.
Typical use cases may include:
- reviewing whether a recovery above VWAP has enough structural follow-through
- filtering weak reclaims from stronger continuation candidates
- identifying retest discipline after reclaim
- spotting delayed or fragile recovery behavior
- keeping a cleaner visual workflow around VWAP-based chart reading
LIMITATIONS AND TRANSPARENCY
This script is not a prediction engine and should not be interpreted as a guaranteed continuation model.
A reclaim labeled as clean can still fail.
A reclaim labeled as late can still continue.
A failed reclaim label does not automatically imply a larger bearish trend.
The tool is designed to classify reclaim behavior around VWAP, not to replace broader market structure analysis.
Like all chart-based tools, outputs can vary depending on instrument, volatility regime, timeframe, and user settings.
VWAP-based behavior is also context-dependent. Market environment, liquidity, trend phase, and volatility expansion can all influence reclaim behavior beyond what a single script can capture.
This script is therefore best used as a structured interpretation tool, not as a standalone decision framework.
RISK DISCLOSURE
This indicator is for chart analysis and research use only. It does not provide investment advice, portfolio advice, or trade guarantees.
Always evaluate signals within broader market context, risk management, and your own execution process.
No single indicator should be relied upon in isolation.
NOTES
This publication focuses on reclaim quality around VWAP rather than generic VWAP crosses.
The aim is to keep the logic interpretable, the visuals readable, and the methodology transparent. 指標

Periodic Anchored VWAPPeriodic Anchored VWAP
Overview
The Periodic Anchored VWAP is a professional volume-weighted average price indicator that anchors VWAP calculations to fixed calendar periods. Unlike traditional anchored VWAP tools that require manual point-and-click anchoring, this indicator automatically resets VWAP calculations at predefined interval boundaries (hourly, daily, weekly, monthly), providing a clean, systematic approach to volume-weighted support and resistance analysis.
Key Features
13 Anchor Periods: 1H, 4H, 6H, 12H, 1D, 3D, 1W, 2W, 1M, 2M, 3M, 6M, 12M
Smart Timeframe Filtering: Automatically hides VWAPs when chart timeframe equals or exceeds anchor period
Individual Period Controls: Toggle each VWAP on/off independently with custom colors
Master Toggle: Global show/hide for all VWAP lines
Dynamic Labels: Real-time price labels at the right edge of chart
Compact Settings: Streamlined input panel with inline color pickers
How It Works
The Golden Rule
VWAP is displayed ONLY when: Chart Timeframe < Anchor Period
This ensures VWAP lines always represent meaningful continuous calculations. For example:
1H VWAP appears only on timeframes smaller than 1 hour (e.g., 15min, 5min, 1min)
1D VWAP appears only on timeframes smaller than daily (e.g., 4H, 1H, 15min)
1W VWAP appears only on timeframes smaller than weekly (e.g., daily, 4H, 1H)
Anchor Logic
Each VWAP resets at its respective period boundary:
Intraday Anchors (1H, 4H, 6H, 12H): Reset at the start of each hour/4-hour/6-hour/12-hour period
Daily Anchors (1D, 3D): Reset at daily market open
Weekly Anchors (1W, 2W): Reset at weekly market open
Monthly Anchors (1M, 2M, 3M, 6M, 12M): Reset at month boundaries
Input Settings
Master Control:
VWAP Display Show / Hide Global toggle for all VWAP lines
Intraday Anchors (Default: Off):
1H => Teal => Short-term intraday reference
4H => Pink => Medium-term intraday reference
6H => Magenta => Half-day session reference
12H => Cyan => Full session reference
Anchor VWAP Periods (Default: On):
1D => Yellow/Green => Daily support/resistance
3D => Purple => Multi-day trend reference
1W => Blue => Weekly pivot levels
2W => Light Blue => Bi-weekly trend
1M => Green => Monthly support/resistance
2M => Dark Green => 2-month horizon
3M => Yellow => Quarterly reference
6M => Orange => Semi-annual trend
12M => Red => Annual benchmark
Visual Display
VWAP Lines: Colored lines plotted at 2px thickness for clear visibility:
Right-Edge Labels: Compact labels showing period and current VWAP value
Smart Label Colors: Black or white text automatically based on line color for optimal readability
Use Cases
Intraday Trading:
Use 1H, 4H, 6H, 12H VWAPs on lower timeframes (e.g., 5min, 15min) to identify intraday support/resistance levels
Multiple intraday VWAPs reveal stacked liquidity zones
Swing Trading:
1D, 3D, 1W, 2W VWAPs help identify trend direction and mean reversion levels
Weekly VWAP provides context for daily price action
Position Trading:
1M, 3M, 6M, 12M VWAPs offer long-term benchmarks for valuation assessment
Multiple monthly VWAPs show multi-year price distribution
Multi-Timeframe Analysis:
Visualize up to 13 VWAP levels simultaneously
Identify confluences where multiple VWAP periods align
Observe how price interacts with different anchored levels
Important Notes
Timeframe Limitations: VWAPs automatically hide when the chart timeframe is equal to or greater than the anchor period (prevents misleading point-to-point lines)
Intraday Anchors Disabled by Default: Enable only the periods relevant to your trading style to reduce visual clutter
Monthly Anchors: Use 30-day approximation for minute calculations; display logic ensures they only appear on daily or lower timeframes
Label Positioning: Labels appear 1-13 bars to the right of the current bar to prevent overlap with price action
Performance
Efficiently coded with looped label management
No repainting — all calculations are historical
Compatible with all markets and symbols
Version History
v.1.0 => Initial release with 13 anchor periods, timeframe validation, and dynamic labels
Start using Periodic Anchored VWAP to elevate your volume-weighted analysis across all timeframes!
指標

Fibonacci Volume Confluence Engine [PhenLabs]📊 Fibonacci Volume Confluence Engine
Version: PineScript™ v6
📌 Description
The Fibonacci Volume Confluence Engine is a multi-layered confluence detection system that combines ATR-filtered swing pivot detection with a bar-by-bar volume profile to automatically identify and score every Fibonacci retracement level by the volume traded within it. Rather than drawing static lines and leaving interpretation to the trader, this engine classifies each level as Strong, Moderate, or Weak based on real market participation — separating the levels the market genuinely respects from those it simply passes through.
At its core, the indicator anchors Fibonacci retracements to structurally confirmed swing highs and lows, filtered by ATR distance to eliminate noise. A rolling volume histogram is then constructed over a configurable lookback window and mapped against each of the seven Fibonacci levels. The result is a set of visually distinct confluence zones on your chart, backed by quantified volume data rather than discretionary judgment.
Beyond Fibonacci, the engine incorporates Break of Structure and Change of Character detection from the confirmed swing sequence, an optional Multi-Timeframe Fibonacci overlay sourced from any higher timeframe, and a live on-chart dashboard summarising trend direction, key levels, confluence counts, and the most recent structure signal — making it a complete structural analysis tool rather than a single-purpose retracement drawer.
🚀 Points of Innovation
Volume-scored Fibonacci levels — every level is quantitatively graded by the concentration of volume traded within its price zone, not by subjective confluence counting
ATR-adaptive pivot filtering — swing highs and lows are only accepted when their distance from the opposing swing meets a minimum ATR multiple, keeping anchors structurally meaningful across all instruments and timeframes
Manual bar-loop volume profile — the histogram is built with a direct bar iteration loop rather than built-in functions with series-length limitations, guaranteeing stable computation from the very first confirmed pivot
Integrated BOS and CHoCH detection — structure breaks are classified as either continuation or reversal signals based on the confirmed swing sequence, with five individual alert conditions
Multi-timeframe Fibonacci overlay — a second independent Fibonacci set sourced from any higher timeframe can be displayed simultaneously on the current chart with its own style controls
🔧 Core Components
ATR-Filtered Swing Engine: Detects pivot highs and lows using configurable lookback length, then filters each candidate by requiring a minimum ATR-scaled distance from the opposing swing. Only structurally significant pivots are accepted as Fibonacci anchors.
Fibonacci Retracement Layer: Draws the seven standard levels (0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%) from the most recent confirmed swing pair. Direction is automatically set to bullish or bearish based on which swing type was most recently confirmed.
Volume Profile Engine: Iterates over up to 500 bars, assigns each bar’s volume to a price bin based on its midpoint, and builds a 10–50 bin histogram over the configurable lookback window. Uses array pre-allocation with set-based zero-filling for runtime stability.
Confluence Classifier: Maps each Fibonacci level to its corresponding volume bin, sums the center bin plus weighted adjacent bins for a smoothed reading, then classifies the result as Strong (top 30%), Moderate (40–70%), or Weak (20–40%) relative to the peak bin.
BOS and CHoCH Detector: Compares the last two confirmed swing highs and lows to determine trend direction (HH+HL = uptrend, LH+LL = downtrend), then monitors for close-based breaks of the most recent swing level in both the trend direction and against it.
HTF Fibonacci Overlay: Requests pivot data from a user-selected higher timeframe via request.security, tracks the most recent HTF swing pair, and draws a separate Fibonacci set with independent color, line style, and width controls.
Information Dashboard: A 2-column, 10-row table rendered on the last bar displaying trend direction, Fibonacci type, swing prices, ATR, the 61.8% level, confluence summary, HTF status, and last structure signal.
🔥 Key Features
Volume-Backed Confluence Zones: Each Fibonacci level that registers meaningful volume concentration is highlighted with a shaded zone box and a strength label (◆ Strong / ◇ Moderate / · Weak), so the most significant levels stand out immediately without any manual assessment.
Fully Configurable Fibonacci Display: Line width, label size, extension length, and individual level colors are all independently adjustable, allowing the Fibonacci overlay to be styled to suit any chart theme or personal preference.
BOS and CHoCH Signals with Alerts: Break of Structure and Change of Character labels are plotted directly on the bar where the break occurs, with five alert conditions covering each signal type individually and a combined catch-all.
Multi-Timeframe Fibonacci Overlay: Enable a second Fibonacci set from any higher timeframe (default: Daily) and display it alongside the current timeframe levels with a distinct color and line style to provide macro structural context.
Live On-Chart Dashboard: All key data — trend, Fibonacci direction, swing prices, ATR, the golden ratio level, confluence counts, HTF status, and last signal — is displayed in a compact table that updates on every bar close.
ATR Pivot Filter: The ATR multiplier filter can be tuned from 0.1 to 5.0, giving full control over how aggressively noise is filtered. Higher values produce fewer, more significant pivots suitable for higher timeframe analysis.
🎨 Visualization
Fibonacci Level Lines: Seven horizontal lines extend forward from the most recent swing anchor point for a configurable number of bars. Each level has its own independent color input. The 50% level is rendered as a dashed line to distinguish it from the structural levels.
Fibonacci Level Labels: A text label is placed at the right end of each line showing the ratio name and exact price, styled with the corresponding level color against a transparent background for chart cleanliness.
Confluence Zone Boxes: Where a Fibonacci level overlaps a significant volume bin, a semi-transparent shaded box spans the full line extension at the width of ATR × the tolerance multiplier. Color reflects strength: green for Strong, yellow for Moderate, grey for Weak.
Confluence Strength Labels: A small icon and text label (◆ Strong, ◇ Moderate, · Weak) is placed just beyond each confluence zone box, color-matched to the zone, for instant strength identification without inspecting the box fill.
HTF Fibonacci Lines and Labels: The higher-timeframe Fibonacci set is drawn in its own color with a selectable line style (Solid, Dashed, or Dotted) and prefixed with “HTF” in the label text to distinguish it from the current timeframe levels.
Pivot Markers: Confirmed swing highs are marked with a small downward triangle above the bar; confirmed swing lows with a small upward triangle below, using independently configurable colors.
BOS and CHoCH Labels: Structure signal labels appear directly on the signal bar — below the bar for bullish signals and above for bearish — in their respective configured colors with white text.
Information Dashboard: A dark-themed 2×10 table rendered in the selected corner showing all key indicator state values, with color-coded text reflecting bullish (teal), bearish (red), and neutral (grey) conditions.
📖 Usage Guidelines
Swing Pivot Detection
Pivot Lookback Length — Default: 10 | Range: 3–50 — Controls how many bars on each side of a candidate pivot must be lower (for highs) or higher (for lows) to confirm the pivot. Increase for fewer, more major swings; decrease for more reactive pivots.
ATR Period — Default: 14 | Range: 1–100 — The ATR period used to compute the minimum distance filter. A standard 14-period ATR works well for most instruments.
ATR Filter Multiplier — Default: 0.5 | Range: 0.1–5.0 — The minimum distance between a new pivot and the opposing swing, expressed as a multiple of ATR. Increase to require more separation and reduce noise; decrease to accept closer pivots.
Fibonacci Levels
Show Fibonacci Levels — Default: On — Master toggle for all Fibonacci lines and labels.
Fibonacci Line Extension — Default: 50 | Range: 10–200 — How many bars forward the Fibonacci lines extend from the anchor point.
Fibonacci Line Width — Default: 1 | Range: 1–4 — Pixel width of all Fibonacci level lines.
Label Size — Default: Small | Options: Tiny, Small, Normal — Size of the Fibonacci level labels.
Level Colors (0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%) — Independent color inputs for each level, allowing full visual customization.
Volume Profile and Confluence
Show Confluence Zones — Default: On — Master toggle for all confluence zone boxes and labels.
Volume Lookback Period — Default: 100 | Range: 20–500 — Number of historical bars included in the volume histogram. Longer lookbacks produce a more stationary profile; shorter lookbacks reflect recent volume distribution.
Volume Profile Bins — Default: 25 | Range: 10–50 — Number of price buckets in the histogram. More bins give finer resolution; fewer bins give broader zone detection.
Confluence Zone Width (ATR%) — Default: 0.5 | Range: 0.1–2.0 — Height of the shaded confluence box as a multiple of ATR. Increase for wider, more visible zones; decrease for tighter, more precise zones.
Strong / Moderate / Weak Confluence Colors — Independent color inputs for each confluence tier.
Multi-Timeframe Fibonacci
Enable HTF Fibonacci — Default: Off — Enables the higher-timeframe Fibonacci overlay.
Higher Timeframe — Default: D — The timeframe from which swing pivots are sourced for the HTF overlay.
HTF Pivot Lookback — Default: 10 | Range: 3–50 — Pivot lookback length applied on the higher timeframe.
HTF Fib Color — Default: Purple — Color applied to all HTF Fibonacci lines and labels.
HTF Line Style — Default: Dashed | Options: Solid, Dashed, Dotted — Visual style of HTF lines.
HTF Line Width — Default: 2 | Range: 1–4 — Pixel width of HTF Fibonacci lines.
BOS / CHoCH Detection
Show BOS Signals — Default: On — Displays Break of Structure labels on the chart when a continuation break is detected.
Show CHoCH Signals — Default: On — Displays Change of Character labels on the chart when a reversal break is detected.
BOS Color — Default: Blue — Color of BOS labels.
CHoCH Color — Default: Orange-Red — Color of CHoCH labels.
Display Settings
Show Pivot Markers — Default: On — Displays small triangle markers at confirmed swing highs and lows.
Pivot High / Low Colors — Independent color inputs for swing high and swing low markers.
Show Info Dashboard — Default: On — Enables the on-chart information table.
Dashboard Position — Default: Top Right | Options: Top Right, Top Left, Bottom Right, Bottom Left — Corner placement of the dashboard table.
✅ Best Use Cases
Identifying high-probability Fibonacci levels by filtering out the ones with weak volume backing and focusing entries and exits around Strong confluence zones only
Smart Money Concept and ICT-style analysis where BOS and CHoCH signals are used to identify trend continuation and potential reversal points within a defined swing structure
Multi-timeframe confluence trading where the HTF overlay is used to identify macro structure and the current timeframe levels are used for precision entries within that context
Swing trading on any instrument where objective, volume-backed support and resistance levels are needed without manual drawing or constant chart maintenance
Breakout confirmation by watching for BOS signals that occur at or near Strong confluence Fibonacci zones, providing both structural and volume-based validation
⚠️ Limitations
Fibonacci levels are anchored to the most recent confirmed swing pair only — historical Fibonacci sets from earlier swings are not retained on the chart
Volume profile accuracy depends on the lookback length relative to the current price range; on instruments with very large recent moves the profile may not fully reflect the range containing all active Fibonacci levels
BOS and CHoCH detection requires at least two confirmed swing highs and two confirmed swing lows before trend direction can be established — signals will not appear on the earliest bars of a chart
The HTF Fibonacci overlay uses lookahead enabled on historical bars to maintain visual consistency; this is standard practice for HTF overlays and does not affect current bar calculations
On instruments without volume data (some indices and forex pairs on certain brokers) confluence classification will produce zero-volume bins and all levels will show no confluence
💡 What Makes This Unique
Volume-quantified Fibonacci levels: Unlike every standard Fibonacci tool, each level is graded by actual market participation data — volume concentration — rather than by visual proximity to other technical elements
Noise-resistant pivot anchoring: The ATR filter ensures Fibonacci levels are only drawn from swings that represent genuine structural moves, not minor price fluctuations that create misleading retracement grids
Runtime-stable volume engine: The histogram is built with a direct loop and pre-allocated array rather than built-in series functions, ensuring error-free execution from bar 1 on any chart length
Unified structural analysis: Fibonacci retracements, volume confluence, trend structure (BOS/CHoCH), multi-timeframe context, and a live data dashboard are all integrated into a single indicator with no external dependencies
🔬 How It Works
1. Swing Pivot Detection and Filtering
PineScript’s pivothigh and pivotlow functions scan for candidate swing points using the configured lookback length
Each candidate is then tested against the ATR filter — it is only accepted if its distance from the opposing swing meets or exceeds ATR × the multiplier setting, eliminating noise and ensuring anchors represent real structure
2. Fibonacci Level Calculation
When a new valid pivot is confirmed, the most recent swing high and low pair is selected as the anchor, with direction set automatically based on which pivot type was most recently validated
The seven standard ratios are applied to the anchor range and the resulting price levels are stored in a persistent array for use by the confluence engine and dashboard
3. Volume Profile Construction
The lookback window is iterated bar by bar; each bar’s midpoint price is mapped to one of the configured bin slots and that bar’s volume is added to the bin’s running total
The array is pre-allocated at script scope with the maximum bin count and zero-filled at the start of each rebuild cycle, ensuring there are never out-of-bounds access errors regardless of when the first pivot is confirmed
4. Confluence Classification
Each Fibonacci level’s price is mapped to its corresponding bin index; a weighted sum of the center bin and its two neighbours is computed to smooth the reading
The sum is compared against the peak bin volume using three thresholds (70%, 40%, 20%) to assign a Strong, Moderate, or Weak classification, which drives both the visual zone and the dashboard count
5. Structure Signal Detection
After each new pivot updates the swing sequence, the last two highs and last two lows are compared to determine whether the market is in a confirmed uptrend, downtrend, or undefined structure
On every bar, a close-based break of the most recent swing level is tested — breaks in the trend direction fire a BOS signal; breaks against it fire a CHoCH signal — with the result fed to both chart labels and alert conditions
💡 Note:
For best results, use a Pivot Lookback Length and ATR Filter Multiplier that match the significance of swings you trade on your chosen timeframe. Lower timeframes generally benefit from smaller lookback values (5–8) and lower ATR multipliers (0.3–0.5), while higher timeframes produce cleaner results with larger values (15–20 lookback, 1.0–2.0 multiplier). Enable the HTF overlay when you want macro Fibonacci context without switching charts. 指標

指標

Big Order Bubbles [Trading IQ]Hello Traders!
🔹Big Order Bubbles IQ
Big Order Bubbles IQ is a visualization tool designed to help traders identify and interpret large participation events in the market.
Instead of raw volume bars or hidden order flow, this indicator highlights where meaningful size enters the market , allowing you to quickly spot areas of aggressive buying or selling.
It focuses on answering a simple but powerful question:
Where are the largest players actually active?
high participation events
aggressive buying vs selling pressure
large order clustering within a bar
turning points driven by size
extreme volume spikes relative to recent activity
🔹What the indicator shows
🔸Big order bubbles
Large orders are displayed directly on the chart as bubbles, sized relative to their magnitude.
This allows you to instantly see:
where large trades occurred
how significant they were compared to others
whether they were buying or selling aggression
🔸Buy vs Sell pressure (histogram)
The lower panel separates large buying and selling activity into a histogram view.
This gives you a quick read on:
net aggressive buying (large orders only)
net aggressive selling (large orders only)
🔸Turning point detection
In “Turning Points” mode, the script attempts to identify large orders that occur at structurally meaningful moments.
This helps highlight:
potential exhaustion points
areas where liquidity is being absorbed
reversal zones driven by size
🔸Extreme volume detection
In “Extreme Vol” mode, the indicator focuses purely on outliers in volume.
This is useful for:
spotting abnormal participation
detecting sudden institutional activity
highlighting momentum ignition events
🔸Live tick big order tracking
When enabled, the indicator can track large orders in real time using tick-based data.
This mode is designed for:
scalping environments
real-time order flow awareness
capturing large prints as they happen
🔸Big order table
A live table shows the most recent large orders, including:
side (buy/sell)
size
price
time since execution
This gives you a quick reference for recent activity without scanning the chart.
🔹How to read it
Bubble size shows how large the order was relative to others
Bubble color shows whether it was buying or selling pressure
Histogram shows the total imbalance within the bar
Location shows where large participants chose to act
This combination helps you move beyond “volume exists” and toward:
“volume mattered here.”
For example:
large buy bubbles at lows can suggest absorption or accumulation
large sell bubbles at highs can suggest distribution or rejection
clusters of large orders can indicate key liquidity zones
lack of large participation during a move can signal weakness
large bubbles during an already strong move can indicate a stop loss cascade or liquidation event
🔹Why this indicator is useful
It gives you:
clear visualization of large orders
relative sizing instead of raw numbers
buy vs sell separation
context through turning points or statistical extremes
optional real-time tracking for intraday traders
🔹Best use cases
confirming whether moves are supported by size
spotting potential reversals driven by large players
detecting liquidity grabs and absorption
adding order flow context to price action or liquidity models
🔹Important note
This indicator is a chart-reading tool , not a prediction engine.
Large orders can:
initiate moves
absorb moves
or simply pass through the market without follow-through
Context matters.
Always consider:
location
trend
liquidity
and surrounding structure
🔹Important consideration
Order flow on TradingView is derived from available data , not a full centralized order book.
This means:
some activity may be approximated
different symbols may behave differently
tick-based modes depend on data availability
The goal is not perfect reconstruction, but practical insight .
🔹Inputs you can customize
The script includes flexible controls such as:
volume aggressiveness threshold
maximum bubble size scaling
dollar-based filtering for large orders
lower timeframe selection
turning point vs extreme volume model
live tick storage and behavior
visual styling and color controls
Closing Notes
And that’s about it!
This script is built to make large participation visible, intuitive, and actionable .
It may receive updates based on feedback - stay tuned!
Thank you TradingView as always! 指標

Volume Bubbles [QuantAlgo]🟢 Overview
The Volume Bubbles indicator is a multi-layered volume cluster detection system that identifies statistically significant volume events directly on your price chart, classifying them by magnitude (Small, Medium, Big) and direction (Buy, Sell, Mixed). By combining adaptive percentile thresholds across multiple lookback windows with optional volume delta analysis, this indicator highlights moments of elevated trading activity that often signal institutional participation, trend acceleration, or potential reversals across every timeframe and market.
🟢 How It Works
The indicator begins by establishing a lower timeframe for volume delta calculation. When auto-select is enabled, it picks a granular timeframe based on your chart period, using 1-second bars for sub-minute charts, 1-minute bars for intraday charts, 5-minute bars for daily charts, and 60-minute bars for higher timeframes. This allows the indicator to estimate net buying and selling pressure within each chart bar:
= taLib.requestVolumeDelta(lowerTimeframe)
float netDelta = nz(lastDelta)
float absDelta = math.abs(netDelta)
The core detection engine then calculates percentile thresholds for both volume and absolute delta across three independent lookback windows (Short, Medium, Long). Each window computes its own threshold for each cluster tier using linear interpolation:
float vSmallShort = ta.percentile_linear_interpolation(volume, shortLen, smallPct)
float vSmallMid = ta.percentile_linear_interpolation(volume, midLen, smallPct)
float vSmallLong = ta.percentile_linear_interpolation(volume, longLen, smallPct)
This means a bar's volume is not compared against a single average but ranked against the full distribution of recent volume history from multiple perspectives. A Small cluster must exceed the 75th percentile (top 25%), a Medium cluster the 90th percentile (top 10%), and a Big cluster the 97th percentile (top 3%) by default.
To filter noise, a consensus system requires agreement across the lookback windows before confirming a cluster:
f_consensus(bool pS, bool pM, bool pL, string mode) =>
int hits = (pS ? 1 : 0) + (pM ? 1 : 0) + (pL ? 1 : 0)
switch mode
"Any Window" => hits >= 1
"Majority (2 of 3)" => hits >= 2
"All Windows (strictest)" => hits >= 3
In Majority mode, for example, at least two of the three windows must agree that volume exceeds the threshold before a cluster is plotted. This prevents false signals from temporary spikes that look significant in one context but not another.
Once a cluster is confirmed, it is classified as Buy, Sell, or Mixed based on the selected method. Candle Direction uses the bar's open/close relationship, Delta Direction uses the sign of net volume delta, and Both requires agreement between the two, labeling any conflict as Mixed.
🟢 Key Features
▶ The indicator offers four detection methods, each designed to balance sensitivity and precision depending on data availability and trading style.
1. Volume Only: Uses raw bar volume as the sole input for cluster detection. This is the simplest and most universal mode, working on any symbol that provides volume data. It identifies all statistically elevated volume events regardless of whether buying or selling dominated, making it useful for spotting general activity surges around key levels, news events, or session opens.
2. Delta Only: Uses the absolute value of net volume delta instead of total volume. This mode triggers only when directional pressure (not just raw activity) is statistically elevated. It filters out high-volume bars where buying and selling were roughly balanced, focusing instead on bars where one side clearly dominated. Requires lower timeframe data availability.
3. Volume + Delta: Both volume and delta must independently exceed their respective percentile thresholds. This is the strictest detection mode. A cluster only appears when there is both unusually high total activity and unusually strong directional flow, filtering out ambiguous bars where volume was high but evenly split between buyers and sellers.
4. Volume OR Delta: Either elevated volume or elevated directional delta triggers a cluster. This is the most inclusive mode, capturing both pure volume events (such as index rebalancing or option expiration activity) and strong directional surges that may occur on relatively normal total volume. Best suited for traders who prefer broader coverage and are comfortable filtering signals with additional context.
▶ Detailed Tooltip Overlay: Hovering over any bubble reveals a comprehensive diagnostic panel summarizing the full context behind that cluster. The tooltip displays the cluster tier and direction label (e.g., BIG BUY or MEDIUM SELL), the formatted volume value, net delta value (or "n/a" if delta data is unavailable), the volume-to-average ratio expressed as a multiple, the active detection method (with a fallback note if delta was unavailable and the method defaulted to Volume Only), the individual window confirmations for both volume and delta shown as a compact S M L grid indicating which of the short, medium, and long lookback windows passed their threshold, and the classification mode used to determine the buy/sell label. This gives full transparency into exactly why each cluster was detected and how it was classified, without cluttering the chart itself.
▶ Built-in Alert System: Pre-configured alert conditions for Big clusters, Medium-or-larger clusters, and any cluster detection, allowing you to receive notifications for the volume events that matter most to your strategy.
▶ Visual Customization: Choose from 5 color presets (Classic, Aqua, Cosmic, Cyber, Neon) or define your own custom color scheme. Optional in-bubble text displays volume, delta, ratio, or combinations, while the tooltip diagnostic panel remains accessible on hover regardless of whether bubble labels are enabled or disabled.
🟢 Important Notes
1. This indicator requires volume data to function. Make sure you are using a ticker from an exchange that provides volume data. Symbols that do not report volume (such as certain forex pairs on specific brokers or custom-built indices) will trigger a warning message on the chart and produce no signals. If you see the "No Volume Data" warning, switch to a symbol or exchange that supports volume reporting.
2. Whether you are scalping on lower timeframes or swing trading on daily and weekly charts, Volume Bubbles is designed to complement your existing setup rather than replace it. Use it as a confirmation layer alongside your preferred strategy to identify when statistically significant volume activity aligns with your trade thesis, adding a data-driven edge to entries, exits, and key level analysis across any timeframe and market. 指標

Volume TableWhat it does:
The Volume Table displays a live running list of candle volume directly on your chart. Instead of staring at the volume bars at the bottom of your screen trying to compare them, this table organizes everything cleanly so you can read it in seconds.
It shows 3 columns side by side — your current chart timeframe, plus 2 additional higher timeframes that you set yourself. So if you’re trading on the 5 minute chart you might set the other two to the 1 hour and 4 hour. Now you can see what volume looks like on all three at the same time without ever leaving your chart.
What each column means:
∙ Bar — tells you which candle you’re looking at. NOW is the live candle updating in real time. -1 is the last closed candle, -2 the one before that, and so on
∙ Dir — the direction of that candle. UP means it closed higher than it opened, buyers won. DN means it closed lower than it opened, sellers won
∙ Volume — the actual volume number for that candle, formatted for easy reading (K for thousands, M for millions)
∙ Avg — the 20 candle average volume, sitting at the top of each section so you always have a reference point
What the colors mean:
∙ Green text — that candle was bullish. This means the close price was higher than the open price. The candle started at one price, and by the time it closed buyers had pushed it higher. The volume on that candle was driven by buying pressure. The more volume behind a green candle, the more conviction the buyers had
∙ Red text — that candle was bearish. This means the close price was lower than the open price. The candle started at one price, and by the time it closed sellers had pushed it lower. The volume on that candle was driven by selling pressure. The more volume behind a red candle, the more conviction the sellers had
∙ Gold text — this is the most important one. Gold means the volume on that candle was abnormally high compared to the recent average. Something significant happened. Big players, a news event, a breakout — whatever the cause, that candle had unusual activity behind it
To put it simply — a green candle means the close was above the open. A red candle means the close was below the open. Volume tells you how much activity happened while that battle between buyers and sellers was taking place. High volume means a lot of participants were involved and the move carries more weight. Low volume means fewer participants and the move may not be as reliable.
How to set it up:
1. Add the indicator to your chart
2. Open the settings and set Timeframe 2 and Timeframe 3 to higher timeframes than the one you are currently trading on
3. Adjust the Number of Slots to control how many candles of history you want to see
4. Use the Font Size setting to make the table larger or smaller to fit your screen
5. The Abnormal Volume Multiplier controls how sensitive the gold highlight is — a setting of 2.0 means a candle needs twice the average volume to turn gold. Raise it if you want only the most extreme spikes, lower it if you want it to trigger more often
In summary:
Watch the NOW row. When it turns gold, check the direction. If the close is above the open it means buyers drove that abnormal volume. If the close is below the open it means sellers drove it. When multiple timeframes are showing gold at the same time, pay close attention — the market is telling you something important. This tool will not tell you when to buy or sell, but it will show you where the significant volume is happening and who is in control so you can make a more informed decision.
Disclaimer:
This indicator is for informational and educational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any asset. All trading involves risk and you can lose more than you invest. Past performance of any strategy or signal is not indicative of future results. Always do your own research and due diligence before making any trading decisions. Never trade with money you cannot afford to lose. The creator of this tool is not a licensed financial advisor and is not responsible for any losses incurred as a result of using this indicator. Trading decisions are solely your own responsibility. 指標

指標

指標

指標

Volume Bubble (Big Trades)Gemini said
Delta Volume Bubbles: How It Works
The Delta Volume Bubbles indicator is a sophisticated order flow tool designed to visualize "aggressive" market activity directly on your price chart. Instead of looking at a separate sub-window for volume, this script places circular "bubbles" on the candles where significant buying or selling pressure occurs.
1. The Core Logic: Delta Calculation
At its heart, the indicator uses Volume Delta, which is the difference between buying volume (at the ask) and selling volume (at the bid).
Positive Delta: More aggressive buying; the bubble is typically green.
Negative Delta: More aggressive selling; the bubble is typically red.
To provide precision, the script uses Lower Timeframe (LTF) data. For example, if you are on a 1-hour chart, it scans 1-minute data to see how volume was distributed within that hour.
2. Bubble Placement & Size
The indicator doesn't just put a dot at the close. It offers two placement modes:
Candle VWAP: Places the bubble at the Volume Weighted Average Price of that specific candle, showing you exactly where the "heavy" trading occurred.
Middle: Places the bubble at the candle’s midpoint (HL/2).
The size of the bubble is dynamic, scaling based on the Z-Score (a statistical measure of how "extreme" the volume is compared to the recent average). A "Huge" bubble represents a significant statistical outlier in volume.
3. Filtering and Intensity
The script filters out "noise" so your chart isn't cluttered.
Percentile Filter: Only shows bubbles if the volume is in the top X% (e.g., top 60%) of recent history.
Intensity Mode: When enabled, the colors shift from "Buy/Sell" to a heat map (Gray → Blue → Orange → Red) based on the pure strength of the volume, regardless of direction.
4. Visual Clarity
The recent update introduces a Transparency Slider. This allows you to make the bubbles "ghost-like," ensuring they don't hide the wick or body of the candlestick. This is crucial for price action traders who need to see if a big volume bubble resulted in a reversal pin bar or a breakout. 指標

Volume Flow Analysis [UAlgo]Volume Flow Analysis is a price mapped volume study that distributes historical activity across price levels and separates that activity into directional pressure, stealth style movement, imbalance zones, absorption zones, Point of Control, Value Area, and profile shape. Instead of reading volume only bar by bar, the script converts a rolling section of chart history into a horizontal market map where each price level receives its own buy pressure, sell pressure, and movement efficiency profile.
The script works on the latest bar and rebuilds the full map from a rolling historical window. That window can either use the full user selected lookback or a shorter effective depth when decay is enabled. This gives more recent bars a stronger influence while older bars gradually lose weight. The result is a profile that can behave either like a stable historical map or like a more adaptive flow view depending on the selected decay factor.
Inside each price bucket, the script estimates directional pressure by splitting volume into buy side and sell side portions based on where price closed inside the bar range. It then distributes those portions across all buckets touched by the bar using proportional overlap. At the same time, it builds a separate stealth flow style measure based on range per unit of volume, which acts as a proxy for how much price movement occurred relative to participation.
From there, the script identifies the Point of Control, expands outward to build the seventy percent Value Area, classifies the overall profile shape, highlights extreme buy or sell imbalances, detects absorption style conditions, and optionally extends those key zones across the historical range. A legend table summarizes the active state of the map so the user can read the distribution quickly.
In practical use, Volume Flow Analysis is useful for studying where participation concentrated, where directional pressure was strongest, where flow became unbalanced, and whether the profile currently resembles a balanced, short covering, long liquidation, or double distribution structure.
🔹 Features
🔸 Price Bucket Volume Mapping
The script divides the active price range into user defined buckets and allocates volume into those levels according to actual price overlap. This creates a true horizontal flow map instead of a simple vertical volume display.
🔸 Buy Pressure and Sell Pressure Separation
Each price bucket stores both estimated buy side volume and estimated sell side volume. These two components are then drawn side by side so the user can see which side dominated each price level.
🔸 Decay Weighted Historical Memory
Older bars can gradually lose influence through the decay factor. This lets the profile emphasize fresher activity while still preserving historical structure.
🔸 Stealth Flow Layer
The script includes an additional stealth flow style metric based on range relative to volume. This highlights zones where price moved efficiently with relatively less participation.
🔸 Point of Control and Value Area
The indicator automatically finds the highest volume bucket as the Point of Control and expands from that level until seventy percent of total volume is captured to form the Value Area.
🔸 Imbalance Detection
Price levels with one sided pressure above the selected imbalance ratio are highlighted as buy or sell imbalance zones. These can also be extended across the profile range.
🔸 Absorption Detection
Buckets with unusually high total volume but unusually low stealth flow are marked as absorption. This can suggest heavy participation with reduced price efficiency.
🔸 Profile Shape Classification
The script classifies the overall profile as D shape, B shape, P shape, or b shape using the distribution of volume across the upper, middle, and lower thirds of the profile.
🔸 Range Box and Historical Scope Label
A dashed range box shows the active calculation window and displays the effective number of bars used in the current map.
🔸 Built In Legend and Summary Table
A table in the lower right corner explains the map colors and also reports the current buy sell balance, profile shape, and whether imbalance or absorption layers are active.
🔹 Calculations
1) Determining the Effective Historical Window
int nCalc = i_decay == 1.0 ? i_lookback : int(math.ceil(math.log(0.01) / math.log(i_decay)))
int N = math.max(1, math.min(nCalc, i_lookback))
N := math.min(N, bar_index)
This is the first major step of the script.
If decay is set to 1.0, the script simply uses the full user selected lookback.
If decay is below 1.0, the script solves for how many bars are needed until the decay weight falls to roughly one percent of its original value. That value becomes the effective calculation depth.
Then the script clamps that depth so it never exceeds the lookback input and never exceeds available chart history.
So the map can behave in two different ways:
a full fixed history profile,
or a dynamically shortened profile where older bars become practically irrelevant.
2) Finding the Active Price Range and Bucket Size
float pH = high
float pL = low
for i = 0 to N - 1
pH := math.max(pH, high )
pL := math.min(pL, low )
float bSz = (pH - pL) / i_buckets
This block establishes the vertical bounds of the map.
The script scans the effective historical window and finds the highest price and lowest price inside it. Then it divides that full range by the selected number of price levels.
The result is the bucket size, which determines the height of every price cell in the flow map.
So the whole analysis space is always defined by the actual recent trading range rather than by arbitrary static levels.
3) Initializing Buy, Sell, and Stealth Arrays
array bVol = array.new(i_buckets, 0.0)
array sVol = array.new(i_buckets, 0.0)
array stV = array.new(i_buckets, 0.0)
These three arrays are the main storage layer of the profile.
bVol stores buy pressure per bucket.
sVol stores sell pressure per bucket.
stV stores the stealth flow style metric per bucket.
As each historical bar is processed, its weighted contribution is distributed into these arrays according to price overlap.
So the script is building three parallel price maps at the same time.
4) Splitting Each Bar Into Buy and Sell Pressure
float b_v = rng == 0 ? (v_i / 2) : (v_i * (c_i - l_i) / rng)
float s_v = v_i - b_v
This is the directional volume model.
If a bar has zero range, volume is split evenly between buy side and sell side.
Otherwise, the script estimates buy pressure from where the close sits inside the bar range. A close nearer the high gives more weight to buy pressure. A close nearer the low gives less weight to buy pressure. Sell pressure is simply the remainder.
This is not exchange level aggressor data, but it is a practical price location based estimate of directional pressure inside each candle.
So every bar contributes both a buy component and a sell component to the profile.
5) Defining the Stealth Flow Proxy
float st_m = v_i == 0 ? rng : rng / v_i
This line creates the stealth flow style measurement.
The idea is simple. If price covers a relatively large range with relatively little volume, the ratio becomes larger. If price needs heavy volume to achieve the same range, the ratio becomes smaller.
So this metric behaves like a movement efficiency proxy:
higher values suggest cleaner movement per unit of volume,
lower values suggest heavier participation per unit of movement.
It is important to interpret this as a derived proxy rather than a direct exchange measured stealth order flow.
6) Applying Decay Weight to Historical Bars
float d_m = math.pow(i_decay, i)
Every historical bar receives a decay multiplier based on how far back it is.
The most recent bar gets the largest weight. Older bars receive progressively smaller weights as long as decay is below one.
This means the final profile is not just a raw accumulation of past activity. It is a weighted accumulation where recent flow can dominate older structure if the user wants a more adaptive map.
7) Distributing a Bar Across All Touched Buckets
int minIdx = math.max(0, math.floor((l_i - pL) / bSz))
int maxIdx = math.min(i_buckets - 1, math.floor((h_i - pL) / bSz))
for j = minIdx to maxIdx
float b_min = pL + j * bSz
float b_max = b_min + bSz
float ovr = math.max(0, math.min(h_i, b_max) - math.max(l_i, b_min))
if ovr > 0
float prop = ovr / rng
bVol.set(j, bVol.get(j) + b_v * prop * d_m)
sVol.set(j, sVol.get(j) + s_v * prop * d_m)
stV.set(j, stV.get(j) + st_m * prop * d_m)
This is one of the most important calculations in the whole script.
For every bar, the script determines which price buckets were touched by that bar. It then measures how much of the bar overlapped each bucket. That overlap fraction is used to distribute buy pressure, sell pressure, and stealth flow into the correct levels.
So if a bar spends more of its range inside a given bucket, more of its volume contribution goes into that bucket.
This makes the map much more realistic than assigning the full bar volume to only one price level.
8) Handling Zero Range Bars
else
int idx = math.max(0, math.min(i_buckets - 1, math.floor((c_i - pL) / bSz)))
bVol.set(idx, bVol.get(idx) + b_v * d_m)
sVol.set(idx, sVol.get(idx) + s_v * d_m)
stV.set(idx, stV.get(idx) + st_m * d_m)
If a bar has no range, the script cannot distribute it by overlap. In that case, it assigns the full weighted contribution to the bucket containing the close.
This ensures that flat or compressed bars still contribute to the profile without breaking the overlap logic.
9) Building Total Volume, Point of Control, and Summary Totals
float tVolMax = 0.0
float stMax = 0.0
float stMin = 1e10
int poc = 0
float pocV = 0.0
float sumV = 0.0
array tVol = array.new(i_buckets, 0.0)
for j = 0 to i_buckets - 1
float t = bVol.get(j) + sVol.get(j)
float st = stV.get(j)
tVol.set(j, t)
sumV += t
if t > tVolMax
tVolMax := t
if t > pocV
pocV := t
poc := j
After all bars are processed, the script combines buy and sell pressure for each bucket into total volume.
At the same time, it calculates:
the total profile volume,
the maximum bucket volume,
the Point of Control bucket,
and the minimum and maximum stealth values.
The Point of Control is simply the bucket with the largest accumulated total volume.
So this stage turns the raw arrays into a complete profile summary.
10) Calculating the Seventy Percent Value Area
float trg = sumV * 0.70
float cur = pocV
int vH = poc
int vL = poc
while cur < trg and (vH < i_buckets - 1 or vL > 0)
float vUp = vH < i_buckets - 1 ? tVol.get(vH + 1) : -1.0
float vDn = vL > 0 ? tVol.get(vL - 1) : -1.0
if vUp >= vDn and vUp >= 0
vH += 1
cur += vUp
else if vDn > vUp and vDn >= 0
vL -= 1
cur += vDn
else
break
This is the Value Area expansion algorithm.
The script starts at the Point of Control and keeps adding the next larger neighboring bucket, either above or below, until the accumulated total reaches seventy percent of overall profile volume.
The upper and lower boundaries of that expansion become the Value Area High and Value Area Low.
So the Value Area always forms around the Point of Control and grows toward whichever neighboring levels contain the most activity.
11) Classifying the Profile Shape
float vTop = 0.0
float vMid = 0.0
float vBot = 0.0
int third = math.floor(i_buckets / 3)
for j = 0 to i_buckets - 1
float v = tVol.get(j)
if j < third
vBot += v
else if j < third * 2
vMid += v
else
vTop += v
string shp = "D-Shape (Balanced)"
if vTop > sumV * 0.20 and vBot > sumV * 0.20 and vMid < sumV * 0.50
shp := "B-Shape (Double Dist)"
else if poc > i_buckets * 0.5 and vTop > vBot * 1.3
shp := "P-Shape (Short Covering)"
else if poc < i_buckets * 0.5 and vBot > vTop * 1.3
shp := "b-Shape (Long Liquidation)"
The script divides the profile into upper, middle, and lower thirds and compares how much volume sits in each section.
If upper and lower thirds both carry meaningful volume while the middle is relatively weak, the script labels the profile as a B shape.
If the Point of Control sits high and the upper section dominates, it labels the profile as a P shape.
If the Point of Control sits low and the lower section dominates, it labels the profile as a b shape.
Otherwise, the default label is D shape.
So the shape classifier is reading where the distribution is concentrated and how balanced it looks across the full price range.
12) Computing the Average Stealth Level
float avgSt = 0.0
int stCnt = 0
for j = 0 to i_buckets - 1
if stV.get(j) > 0
avgSt += stV.get(j)
stCnt += 1
avgSt := stCnt > 0 ? avgSt / stCnt : 0.0
This block computes the average positive stealth value across all populated buckets.
That average later becomes part of the absorption logic. Buckets with much lower than average stealth, combined with very high total volume, are flagged as absorption.
So the script uses the stealth map not only for display width, but also for analysis.
13) Detecting Imbalances and Absorption
bool imbB = i_showImb and s > 0 and b / s >= i_imbRatio
bool imbS = i_showImb and b > 0 and s / b >= i_imbRatio
bool absr = i_showAbs and t > avgV * 1.5 and st < avgSt * 0.5
These are the main analytical event conditions.
A buy imbalance exists when buy pressure is at least the selected ratio times larger than sell pressure.
A sell imbalance exists when sell pressure is at least the selected ratio times larger than buy pressure.
Absorption is defined differently. It requires:
total bucket volume above one and a half times the average bucket volume,
and stealth flow below half the average stealth value.
That means the bucket saw heavy participation but relatively poor movement efficiency, which can suggest absorbed flow.
So imbalances mark one sided aggression, while absorption marks heavy activity with suppressed movement.
14) Scaling the Visual Width of Each Layer
int wS = int((s / tVolMax) * i_width)
int wB = int((b / tVolMax) * i_width)
int wSt = int(((st - stMin) / math.max(1e-10, stMax - stMin)) * (i_width / 2))
The map is drawn horizontally, so the script converts each metric into width.
Sell pressure width and buy pressure width are scaled relative to the largest total bucket volume.
Stealth flow width is scaled separately relative to the stealth range and is limited to half the main map width.
So every bucket gets a visual footprint that reflects its relative pressure and stealth intensity.
15) Drawing the Buy, Sell, and Stealth Blocks
if wS > 0
_boxes.push(box.new(xStart, pHi, xStart + wS, pLo, bgcolor = cS, border_color = bc, border_width = bw))
if wB > 0
_boxes.push(box.new(xStart + wS, pHi, xStart + wS + wB, pLo, bgcolor = cB, border_color = bc, border_width = bw))
if i_showSt and wSt > 0
_boxes.push(box.new(xStart + wS + wB, pHi, xStart + wS + wB + wSt, pLo, bgcolor = c_stealth, border_color = bc, border_width = 1))
This is the actual map renderer.
The sell block is drawn first.
The buy block is drawn immediately after it.
If stealth flow display is enabled, the stealth block is drawn after both pressure blocks.
So each price level becomes a compact three part flow bar:
sell pressure,
buy pressure,
and optional stealth flow.
16) Extending Imbalance and Absorption Zones Across the Range
if i_showZones
if imbB
_boxes.push(box.new(bar_index - N + 1, pHi, bar_index + 1, pLo, bgcolor = color.new(c_buy, 90), border_color = na))
if imbS
_boxes.push(box.new(bar_index - N + 1, pHi, bar_index + 1, pLo, bgcolor = color.new(c_sell, 90), border_color = na))
if absr
_boxes.push(box.new(bar_index - N + 1, pHi, bar_index + 1, pLo, bgcolor = color.new(color.rgb(255, 0, 255), 85), border_color = na))
If zone extension is enabled, the script projects imbalance and absorption buckets horizontally across the entire historical calculation window.
This makes key buckets easier to see in relation to actual price bars rather than only inside the right side profile map.
So the indicator can show both a profile view and a chart level zone view at the same time.
17) Drawing the Range Box and Historical Scope Label
if i_showRng
_boxes.push(box.new(bar_index - N + 1, pH, bar_index + 1, pL, bgcolor = na, border_color = c_range, border_style = line.style_dashed))
_labels.push(label.new(bar_index - int(N / 2) + 1, pH, "N: " + str.tostring(N), textcolor = c_range, style = label.style_label_down, color = color.new(color.black, 100), size = size.small))
This block outlines the active analysis window on the chart.
The dashed box marks the highest and lowest prices used by the profile, and the label shows the effective bar count N.
So the user can always see exactly which portion of chart history is feeding the current flow map.
18) Drawing the Point of Control
if i_showPOC
float pPrice = pL + (poc + 0.5) * bSz
int endX = i_extPOC ? bar_index + i_width : bar_index + 1
_lines.push(line.new(bar_index - N + 1, pPrice, endX, pPrice, color = c_poc, width = 2))
The Point of Control line is drawn at the midpoint of the highest volume bucket.
If extension is enabled, the line continues forward through the map width. Otherwise it stops at the right edge of the historical window.
So the Point of Control remains a clear reference level for the most active price area inside the map.
19) Drawing the Value Area
if i_showVA
float vaTop = pL + (vH + 1) * bSz
float vaBot = pL + vL * bSz
_boxes.push(box.new(bar_index + 1, vaTop, bar_index + 1 + i_width, vaBot, border_color = c_va, bgcolor = color.new(c_va, 90), border_style = line.style_dashed))
This draws the seventy percent Value Area as a translucent box on the right side of the profile.
The top and bottom are derived from the expanded Value Area bucket boundaries, and the box spans the full map width.
So the user can immediately see where most of the profile activity was concentrated around the Point of Control.
20) Buy Sell Dominance Summary
float tB = bVol.sum()
float tS = sVol.sum()
float tV = tB + tS
float pB = tV > 0 ? (tB / tV) * 100 : 0
float pS = tV > 0 ? (tS / tV) * 100 : 0
string dTxt = pB >= pS ? "Bullish " + str.tostring(pB, "#") + "%" : "Bearish " + str.tostring(pS, "#") + "%"
This block calculates the total buy side share and total sell side share across the whole profile.
Whichever side holds the greater percentage becomes the dominant flow label in the table.
So the summary does not only show local bucket conditions. It also provides a broad view of which side controlled more of the weighted participation inside the entire mapped range. 指標

Volume Defense Zones [MarkitTick]💡 The Volume Defense Zones is a professional-grade liquidity analysis engine designed to identify institutional interest by isolating ultra-high volume transactions and mapping them as dynamic support and resistance zones. Unlike standard volume indicators that merely plot vertical bars, this script utilizes a sophisticated heatmap engine and a multi-timeframe (MTF) overlay to provide a three-dimensional view of market participation. By calculating the Volume Weighted Average Price (VWAP) specifically for high-intensity bars, the indicator creates "Defense Zones"—price levels where large-scale players have historically committed significant capital.
● ✨ Originality and Utility
This indicator distinguishes itself from the vast library of open-source tools through its unique "Search Depth" logic and automated zone merging capabilities. While many scripts identify volume spikes, they often clutter the chart with overlapping lines that lose relevance over time. This system solves that problem by:
• Dynamic Zone Consolidation
The script includes a proprietary merge threshold algorithm. If two high-volume defense levels are within a user-defined percentage of each other, the script automatically merges them into a single "Defense Box." This reflects the reality of market "zones" rather than surgical price points.
• Multi-Timeframe Institutional Benchmarking
By integrating a built-in MTF overlay, traders can visualize 4-hour or Daily volume defense zones while trading on a 5-minute chart. This ensures that the user is always aware of the "Big Picture" liquidity levels that are likely to hold during intraday volatility.
• Historical Ghosting and Breakout Analysis
The script tracks whether a zone is "active" or "broken." When price breaches a defense level, the zone doesn't simply disappear; it transforms into a "Ghost Zone" (dotted line), allowing traders to analyze S/R flips and historical retests of previously defended levels.
● 🔬 Methodology and Concepts
The core logic of the Volume Defense Zones is rooted in the identification of "Abnormal Volume" relative to a historical lookback period.
• Peak Volume Identification
The script maintains a rolling window of volume data defined by the "Comparison Length" input. A bar is classified as "Ultra High Volume" only if its volume exceeds the maximum volume recorded in that lookback window. This ensures that the signals adapt to changing market regimes (e.g., high-volatility sessions vs. low-volume holidays).
• The Defense Calculation
For every identified volume peak, the script calculates a localized VWAP using the internal formula:
Accumulated (Volume * Bar Body Center) / Total Volume.
This price level represents the "Average Cost Basis" of the participants during that specific high-intensity event. If the price remains above this VWAP, the level is treated as a Bullish Defense (Support). If price stays below it, it is a Bearish Defense (Resistance).
• Multi-Timeframe (MTF) Security
Using the request.security function with barmerge.lookahead_on (and appropriate offsets to prevent repainting), the script fetches high-volume levels from higher timeframes. This provides a top-down liquidity map that identifies where large institutions are "defending" their positions.
● 🎨 Visual Guide
The visual output is divided into three primary categories to ensure maximum clarity and actionable data visualization:
• The Volume Heatmap (Bottom Pane)
Instead of standard green and red bars, this script uses a professional 5-color heatmap gradient:
- Deep Blue (HM_C0): Low interest / baseline volume.
- Teal/Cyan (HM_C1/HM_C2): Rising interest.
- Gold (HM_C3): High participation.
- Bright Red (HM_C4): Ultra-High Volume.
These bars are framed with thicker borders when a new peak is detected, making the "Ultra Vol" events immediately visible.
• Defense Zones and Labels
- Green Boxes (ZONE_BULL_COL): Represent active bullish defense zones where buyers are currently in control of the high-volume level.
- Red Boxes (ZONE_BEAR_COL): Represent active bearish defense zones where sellers are successfully defending the level.
- Blue/Neutral Boxes (ZONE_INSIDE_COL): Represent zones where the price is currently trading inside the defense range, indicating a period of consolidation or "battle."
- Dotted Lines/Boxes: These are "Broken" or "Ghost" zones. They indicate levels that were previously significant but have been breached.
• Trend Climax Indicators
The script plots specific triangles on the volume bars:
- Green Up Triangle (▲): Bullish Climax. Occurs when price is trending down but a high-volume reversal is detected above the VWAP.
- Red Down Triangle (▼): Bearish Climax. Occurs when price is trending up but a high-volume rejection is detected below the VWAP.
• Professional Dashboard
A clean table in the top-right corner displays real-time statistics, including Total Volume, Max Volume, Average Volume, and the total count of analyzed bars.
● 📖 How to Use
Identifying Institutional Support: Look for thick green boxes formed during "Ultra High Vol" events. These are areas where price is likely to bounce upon a retest.
Trading the Breakout: When a red resistance zone is breached and turns into a dotted "Ghost" zone, wait for a retest of that level. If price holds above it, the old resistance has become new support.
Filtering with MTF: Only take long trades when the price is above the Purple MTF lines, which represent the higher-timeframe institutional defense levels.
Exhaustion Signals: Use the Climax Triangles (▲/▼) to identify potential trend reversals. A red triangle at the end of a long uptrend often signals that "smart money" is distributing their positions.
● ⚙️ Inputs and Settings
• Volume Settings
- Time Resolution: Allows you to change the granularity of the volume analysis.
- Comparison Length: Defines the lookback period (default 20) for determining what constitutes a "Peak" volume bar.
• Visual & Analysis
- Search Depth (Levels): Controls how many historical S/R zones are displayed on the chart. Increasing this provides more historical context but may clutter the view.
- Merge Threshold (%): A critical setting that defines how close two price levels must be to be grouped into a single zone.
- Show All Data Labels: Toggles the display of exact volume figures above the bars.
• Multi-Timeframe Overlay
- HTF Timeframe: Set the higher timeframe (e.g., 240 for 4-hour) to see macro defense zones.
- Max HTF Zones: Limits the number of MTF lines drawn to keep the chart clean.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The indicator is constructed upon the principles of **Auction Market Theory (AMT)** and **Volume Spread Analysis (VSA)**.
• Auction Market Theory
The fundamental premise is that the market is an ongoing auction where the purpose of price is to find the area where the most volume can be transacted. The "Defense Zones" calculated by this script represent "High Volume Nodes" (HVN). Scientifically, these are levels of high price acceptance. When price moves away from these zones and returns, the script tests whether the "Value" has shifted or if the previous participants are still willing to transact at that level.
• Statistical Outlier Theory
The "Ultra High Volume" detection utilizes a non-parametric approach to identify outliers. By comparing the current volume to the rolling maximum of the previous $N$ periods, the script effectively identifies events that fall outside the standard distribution of market activity. This is mathematically equivalent to identifying "Z-score" spikes in volume, signifying a significant shift in market sentiment or the injection of institutional liquidity.
• Volume Weighted Cost Basis (VWCB)
The use of VWAP within the defense zones is based on the academic concept of the "Volume Weighted Cost Basis." In institutional finance, the execution quality of a large trade is measured against the VWAP. Therefore, these levels act as psychological and financial "anchors" for large participants who need to protect their average entry price to maintain a profitable position.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. 指標

指標

指標
