Liquidity Timeframe Stack Map [AGPro Series]Liquidity Timeframe Stack Map
🧠 Core Idea
Are lower-timeframe liquidity sweeps aligned with the higher-timeframe liquidity shelf, or are they fighting the broader structure?
📌 Overview / What it does
Liquidity Timeframe Stack Map is a multi-timeframe liquidity context tool built to compare current-chart sweep behavior with higher-timeframe liquidity shelves.
The script maps the latest confirmed higher-timeframe upper and lower liquidity shelves, detects local buy-side and sell-side sweeps, evaluates wick-based reaction quality, and converts the result into a readable stack state.
It does not predict price direction, automate trades, or claim that every sweep will create a reversal. It is designed as a structured market context and visualization tool.
🎯 Purpose & Design Philosophy
This script was built to solve a common liquidity-reading problem:
A lower-timeframe sweep can look important by itself, but its meaning changes when it happens near a higher-timeframe shelf.
The goal is to help traders separate aligned liquidity reactions from isolated local noise. The script supports a context-first mindset: read the shelf, read the sweep, then judge whether the reaction is aligned or conflicting.
⚡ Why This Script Is Different
Most liquidity tools focus on detecting a sweep, stop run, equal high, or equal low.
This script does NOT treat every sweep as equally important.
Instead, it compares the local sweep against a higher-timeframe liquidity framework and classifies whether the move is a stack alignment, a stack conflict, or a neutral shelf interaction.
⚙️ Methodology
1. Higher-Timeframe Shelf Detection
The script reads confirmed pivot structure from the selected higher timeframe and builds active upper and lower liquidity shelf zones.
2. Local Sweep Detection
The chart timeframe is used as the lower-timeframe layer. Local buy-side and sell-side sweeps are detected when price takes a recent pivot level and closes back through it.
3. Reaction Evaluation
The script evaluates wick reaction quality after the sweep. Stronger wick rejection or reclaim behavior produces a higher reaction quality score.
4. Stack Classification
The script checks whether the local sweep occurred near the relevant higher-timeframe shelf. If the sweep and shelf context align, the script marks an HTF Buy Stack or HTF Sell Stack. If the sweep fights the broader shelf context, it marks a Stack Conflict.
5. Visual Output
The result is displayed through HTF shelf zones, sweep markers, stack labels, right-side tags, alerts, and a compact AG Pro panel.
🗺️ How to Read the Chart
Upper HTF Liquidity Shelf = the active higher-timeframe upper liquidity reference.
Lower HTF Liquidity Shelf = the active higher-timeframe lower liquidity reference.
Buy-Side Sweep marker = price swept a local upper liquidity reference and closed back below it.
Sell-Side Sweep marker = price swept a local lower liquidity reference and closed back above it.
HTF Buy Stack label = a sell-side sweep reacted near the lower HTF shelf with enough reaction quality.
HTF Sell Stack label = a buy-side sweep reacted near the upper HTF shelf with enough reaction quality.
Stack Conflict label = the local sweep behavior is not cleanly aligned with the broader HTF shelf context.
Panel = summarizes stack state, stack score, HTF shelves, LTF sweep state, reaction quality, next context, and invalidation reference.
🚦 Signals & States
• HTF BUY STACK → sell-side liquidity was swept near the lower higher-timeframe shelf with a qualifying reaction.
• HTF SELL STACK → buy-side liquidity was swept near the upper higher-timeframe shelf with a qualifying reaction.
• STACK CONFLICT → local sweep behavior is fighting or confusing the broader shelf context.
• LOWER SHELF → price is interacting with the lower HTF shelf area, but no full stack event is active.
• UPPER SHELF → price is interacting with the upper HTF shelf area, but no full stack event is active.
• NEUTRAL → no active shelf alignment or conflict is detected.
🔔 Alerts Logic
Alerts trigger when a new major stack condition appears.
• HTF Buy Stack Alignment → a sell-side sweep aligns with the lower higher-timeframe liquidity shelf.
• HTF Sell Stack Alignment → a buy-side sweep aligns with the upper higher-timeframe liquidity shelf.
• Liquidity Stack Conflict → the local sweep direction conflicts with the broader higher-timeframe shelf context.
• HTF Liquidity Shelf Touch → price enters either active higher-timeframe shelf zone.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The context becomes stronger when these elements align:
• Price is near an active higher-timeframe shelf
• Local liquidity is swept
• The candle closes back through the swept level
• Wick reaction quality is strong
• The panel state and chart label agree
When these elements do not align, the script treats the context as neutral or conflicting instead of forcing a directional interpretation.
📊 When to Use
• Multi-timeframe liquidity analysis
• Swing and intraday market preparation
• Smart-money-style structure review
• Sweep and reclaim evaluation
• Context checks before interpreting local reactions
• Markets where higher-timeframe levels matter
⚠️ When NOT to Use
• Very low-liquidity symbols
• Extremely noisy lower timeframes
• Markets with unreliable wick structure
• Situations where the selected higher timeframe is not meaningful
• Assets with large gaps or inconsistent session data
• Moments when a single local candle should not be over-interpreted
🎛️ Key Inputs
• Higher Timeframe Shelf → selects the timeframe used to build the broad liquidity shelves.
• HTF Shelf Pivot Length → controls how strict the higher-timeframe shelf structure is.
• LTF Sweep Pivot Length → controls how local sweep references are detected.
• Shelf Zone Width ATR → adjusts the visual thickness of HTF shelf zones.
• Max Shelf Width % Range → caps shelf thickness relative to the distance between the upper and lower HTF shelves, keeping the visual structure clean on wide timeframes.
• Near Shelf Distance ATR → controls how close a sweep must be to a shelf to count as aligned.
• Reaction Quality Threshold → sets the minimum wick reaction required for a strong stack event.
• Stack Score Smoothing → smooths the panel score for cleaner interpretation.
• Visual settings → control shelves, equilibrium line, sweep markers, event labels, right-side tags, and font sizes.
• Show Sweep Marker Letters → adds optional BS / SS text to local sweep markers. The default publication view keeps this disabled for a cleaner chart.
• Event Label Mode → Premium labels only strong HTF stack alignments. Detailed also labels stack conflicts.
• Adaptive Label Layout → automatically shortens and separates shelf labels when higher timeframes compress the HTF shelf cluster.
• Event Label Offset ATR → moves stack event labels farther from candles and shelf-center labels. HTF Sell Stack labels are pushed above the upper shelf zone, while HTF Buy Stack labels are pushed below the lower shelf zone to reduce overlap on publication screenshots.
• Right-side tags use adaptive positioning so the STACK tag avoids crowding the HTF UPPER and HTF LOWER tags when price is near a shelf.
🖥️ Interface & Visual Design
The interface is built around a clear visual hierarchy:
HTF shelves show the broader liquidity map.
Sweep markers show local liquidity events.
Stack labels show important alignment or conflict moments.
The AG Pro panel compresses the current state into a fast, readable decision-support summary.
🧪 Practical Usage Workflow
1. Start with the panel state.
2. Check where price is relative to the HTF upper and lower shelves.
3. Look for a recent buy-side or sell-side sweep marker.
4. Read the event label only if the sweep happened near the relevant shelf.
5. Use Reaction Q and Stack Score to judge whether the context is clean or weak.
6. Interpret the result inside the broader market structure.
🔍 Interpretation Guidelines
HTF Buy Stack does not mean price must go up. It means a sell-side sweep reacted near a lower higher-timeframe shelf with enough quality to deserve attention.
HTF Sell Stack does not mean price must go down. It means a buy-side sweep reacted near an upper higher-timeframe shelf with enough quality to deserve attention.
Stack Conflict is often more useful as a warning than as a signal. It tells the trader that the local sweep and broader shelf context are not cleanly aligned.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not provide guaranteed entry or exit signals.
It does not claim that every liquidity sweep will reverse.
⚠️ Limitations & Transparency
Higher-timeframe pivot shelves are confirmed after structure develops, so they are not instant future levels.
Different chart timeframes may create different local sweep readings.
Very volatile markets may generate fast shelf touches without clean reactions.
Low-liquidity symbols may produce misleading wick behavior.
The selected higher timeframe should match the trader’s actual analysis horizon.
🧠 Market Context Notes
Liquidity analysis is strongest when local behavior is interpreted inside a broader structure.
A sweep near a meaningful higher-timeframe shelf can carry more information than a random sweep in the middle of a range.
This script is designed to make that distinction visible.
🧾 Use Case Examples
When price sweeps local sell-side liquidity near the lower HTF shelf and closes back above the swept level, the script may mark HTF BUY STACK if reaction quality is strong enough.
When price sweeps local buy-side liquidity near the upper HTF shelf and closes back below the swept level, the script may mark HTF SELL STACK if reaction quality is strong enough.
When a local sweep appears away from the relevant higher-timeframe shelf, the script may classify the move as neutral or conflicting.
🧱 System Philosophy
The script follows a context-first AGPro approach:
Structure first.
Liquidity second.
Reaction third.
Decision support last.
It is designed to reduce isolated signal thinking and encourage multi-timeframe interpretation.
🔐 Non-Promise Statement
No script can guarantee outcomes.
No shelf, sweep, score, or label should be treated as certainty.
The output should always be combined with broader market context and personal risk rules.
📉 Risk Disclosure
Trading involves risk.
Markets can move against any interpretation.
This script is for educational and analytical purposes only.
Users are fully responsible for their own decisions.
📚 Educational Note
Use this script to study how lower-timeframe liquidity behavior changes when it is read against higher-timeframe structure.
Indicatore Pine Script®






















