Apicode Liquidity Map Proxy v2.1Overview
Apicode — Liquidity Map Proxy v2.1 is an institutional-style market structure and liquidity analysis tool designed for traders who want to approximate, inside PulseWire, some of the core concepts typically associated with order flow and liquidity platforms such as Bookmap.
Because Pine Script does not have access to the full order book, real bid/ask tape, or true resting liquidity, this indicator does not replicate Bookmap directly. Instead, it focuses on identifying the price and volume footprints that institutional activity often leaves behind.
The script combines multiple concepts into one visual framework:
swing-based liquidity levels
equal highs and equal lows
liquidity sweeps
absorption-style candles
delta proxy / CVD proxy
order blocks
fair value gaps
previous day high / low
Asia, London, and New York session highs/lows
high-quality long and short setup alerts
The goal is to help traders identify areas where liquidity is likely concentrated, where stop hunts may occur, and where price reactions are more likely to develop with institutional logic.
What this indicator is built for
This script is especially useful for traders who want to:
detect likely liquidity pools
identify stop-hunt behavior
find reversal or continuation zones
combine market structure with volume context
reduce chart noise by automatically removing invalidated historical levels
receive alerts when higher-quality long or short conditions appear
It is particularly suitable for intraday trading, especially on highly liquid assets such as crypto pairs, indices, or major forex instruments.
Core Features
1. Swing Liquidity Lines
The indicator plots horizontal liquidity levels based on pivot highs and pivot lows. These zones often act as references for:
clustered stops
breakout attempts
liquidity grabs
short-term support and resistance
Unlike static historical levels, these lines are automatically cleaned up when they become irrelevant, either because they are too old or because price has already swept through them with sufficient displacement.
2. Equal Highs and Equal Lows
Equal highs and equal lows are important because they often represent obvious liquidity targets.
When the market forms similar highs or lows within a selected tolerance, the script marks them as:
EQH = Equal Highs
EQL = Equal Lows
These zones can be useful for anticipating where price may move next in search of liquidity.
3. Liquidity Sweeps
A liquidity sweep occurs when price breaks above a prior high or below a prior low and then quickly fails to hold that move.
This script identifies:
Sweep High → price takes prior highs and closes back below
Sweep Low → price takes prior lows and closes back above
These events can be early signs of manipulation, stop hunting, or failed breakout behavior.
4. Absorption Detection
The script includes an absorption-style candle model based on:
volume spike
small real body
strong wick rejection
directional close
This is not true bid/ask absorption, since Pine cannot read the order book, but it is designed to approximate the kind of candle behavior often seen when aggressive market participants are absorbed by passive liquidity.
The script marks:
bullish absorption
bearish absorption
These signals become much more useful when combined with sweeps and contextual liquidity levels.
5. Delta Proxy and CVD Proxy
Since PulseWire cannot access real bid/ask delta for most instruments, this script uses a delta proxy based on candle structure and volume.
It also calculates a CVD-style proxy to estimate directional participation over time.
This helps classify the market as showing:
buying pressure
selling pressure
rising cumulative participation
falling cumulative participation
These proxies are used as filters in the long and short setup logic.
6. Order Blocks
The script identifies simplified order blocks based on the last opposite candle before a strong impulse.
A bullish order block is derived from the last bearish candle before an upside impulse.
A bearish order block is derived from the last bullish candle before a downside impulse.
Order blocks are automatically removed when they are mitigated or become too old, helping keep the chart focused on active zones only.
7. Fair Value Gaps (FVG)
The indicator detects simple three-candle fair value gaps:
bullish FVG
bearish FVG
These areas may act as imbalance zones where price can later react, rebalance, or continue.
Filled or outdated FVGs can be removed automatically to avoid clutter.
8. Previous Day High / Low
Previous day high and previous day low are major liquidity references in many trading models.
These levels often act as:
stop clusters
breakout traps
session targets
reversal or continuation zones
The script plots them continuously so traders can immediately see whether price is trading near high-priority liquidity.
9. Session Highs and Lows
The script tracks highs and lows for:
Asia session
London session
New York session
These session ranges are extremely useful in liquidity-based trading because markets often sweep one session’s extreme before moving in the opposite direction or expanding into a new direction.
10. Reaction Boxes
When the script detects a reaction condition such as:
sweep + absorption
sweep + delta confirmation
it plots a temporary reaction box to visually highlight the zone where price should defend if the reaction is genuine.
This helps traders see potential reaction areas at a glance instead of focusing only on labels.
11. LONG READY / SHORT READY / Quality Setups
The script builds directional setups using context rather than isolated candles.
A basic bullish setup requires:
a sweep low
reaction confirmation
proximity to important liquidity
positive delta proxy
rising CVD proxy
A basic bearish setup requires:
a sweep high
reaction confirmation
proximity to important liquidity
negative delta proxy
falling CVD proxy
In addition, the script defines:
LONG QUALITY
SHORT QUALITY
These are stronger setups that also require a volume spike. They are intended to reduce low-conviction signals and highlight higher-quality opportunities.
Automatic Cleanup Logic
One of the most useful features of v2.1 is that it removes chart objects that are no longer relevant.
This includes:
liquidity lines that have been swept or have aged out
order blocks that have been mitigated or are too old
fair value gaps that have been filled or expired
reaction boxes after their active duration ends
This cleanup logic makes the indicator much more practical for live trading, since the chart stays focused on actionable areas instead of accumulating historical noise.
Alerts
The script includes alert conditions for:
Bullish Absorption
Bearish Absorption
Sweep Low
Sweep High
LONG READY
SHORT READY
LONG QUALITY
SHORT QUALITY
Bullish FVG
Bearish FVG
Bullish Order Block
Bearish Order Block
For practical trading, the most useful alerts are usually:
LONG QUALITY
SHORT QUALITY
These are stricter than the standard ready conditions and generally provide cleaner signals.
Suggested Use
Best use cases
This indicator is best used for:
intraday trading
liquidity-based trading
market structure analysis
institutional-style execution models
crypto, forex, and liquid index instruments
Recommended timeframes
Suggested starting points:
5m for faster execution and more frequent setups
15m for cleaner structure and lower noise
Suggested Settings for XRPUSDT
For 5-minute charts
Swing length: 4–5
Sweep lookback: 20
Volume spike multiplier: 1.8
Delta smoothing: 6
Reaction ATR multiplier: 0.50
High-quality-only mode: enabled
For 15-minute charts
Swing length: 5–6
Sweep lookback: 25
Volume spike multiplier: 1.6
Delta smoothing: 8
Reaction ATR multiplier: 0.70
High-quality-only mode: enabled
These are starting points only. Traders should adapt values depending on volatility and the instrument traded.
How to Read a Strong Long Setup
A strong bullish setup usually looks like this:
1. Price sweeps below prior lows
2. The sweep occurs near an important liquidity area such as:
previous day low
Asia low
London low
New York low
3. A bullish absorption-style candle appears, or delta/CVD shifts bullish
4. The script prints LONG READY or ideally LONG QUALITY
This type of structure suggests that downside liquidity has been taken and price may now be ready to reverse or expand upward.
How to Read a Strong Short Setup
A strong bearish setup usually looks like this:
1. Price sweeps above prior highs
2. The sweep occurs near an important liquidity area such as:
previous day high
Asia high
London high
New York high
3. A bearish absorption-style candle appears, or delta/CVD shifts bearish
4. The script prints SHORT READY or ideally SHORT QUALITY
This type of structure suggests that upside liquidity has been taken and price may now be ready to rotate lower.
Important Limitations
This script is a proxy tool, not a real order book or footprint engine.
It does not have access to:
full DOM / order book
real resting limit orders
iceberg orders
spoofing detection
true bid/ask delta
real market-by-market execution data
That means it should be used as a smart price/volume interpretation tool, not as a literal replacement for Bookmap.
Its strength lies in approximating institutional behavior through:
structure
wick rejection
volume expansion
imbalance zones
session liquidity
failed breakouts and sweep reactions
Best Practice
This indicator works best when combined with disciplined execution. It should not be used as a standalone “blind entry” system.
For best results, combine it with:
higher timeframe bias
risk management
clear invalidation levels
session awareness
confirmation from market structure
The cleanest trades usually come when multiple factors align at the same time.
Disclaimer
This script is for educational and analytical purposes only. It does not provide financial advice, and no indicator can guarantee profitable outcomes. Traders should always test any method carefully and apply proper risk management. Indicator

Apicode Institutional Liquidity Sweep v2Apicode — Institutional Liquidity Sweep v2 is a price-action based indicator designed to detect potential institutional-style stop hunts and highlight possible entries after liquidity has been taken from retail traders.
The core idea is simple:
- retail traders often place stop losses around obvious swing highs and swing lows
- larger market participants know this
- price frequently sweeps those liquidity pools before moving in the intended direction
This indicator attempts to identify those moments by combining:
- higher timeframe trend
- premium / discount context
- liquidity sweep detection
- reclaim confirmation
- microstructure confirmation
- and automatic **Entry / SL / TP** projection
It is designed to be practical, visually clean, and limited to the last 5 active trade ideas on the chart.
How it works
1. Higher timeframe trend filter
The indicator first checks the broader market context using **higher timeframe EMA structure**.
It compares:
a fast EMA
a slow EMA
On the selected higher timeframe(s), the logic is:
bullish bias when fast EMA is above slow EMA and the slow EMA is rising
bearish bias when fast EMA is below slow EMA and the slow EMA is falling
This helps avoid taking signals against the dominant trend.
Why this matters
Liquidity sweeps are much more useful when they happen **in the direction of the main trend**.
For example:
- in an uptrend, a sweep below a swing low may become a high-probability long setup
- in a downtrend, a sweep above a swing high may become a high-probability short setup
2. Premium / Discount filter
The indicator builds a simple **higher timeframe dealing range** and calculates its midpoint.
Then it classifies the current price as:
- Discount → below the midpoint
- Premium → above the midpoint
This is used as an additional contextual filter:
Long setups are preferred in discount
Short setups are preferred in premium
Why this matters
Institutional-style entries tend to make more sense when:
- buying lower within the broader range
- selling higher within the broader range
This helps avoid chasing price after it has already moved too far.
3. Swing liquidity detection
The script identifies recent swing highs and swing lows using pivot logic.
These levels are treated as likely liquidity pools , because they often attract:
- breakout traders
- stop losses
- late entries
- forced liquidations
The indicator then looks for price sweeping beyond those levels.
4. Liquidity sweep logic
Long setup
A potential long setup appears when:
- the higher timeframe trend is bullish
- price is in discount
- price moves below the latest swing low
- the sweep size remains within a realistic range
- the candle shows meaningful lower wick behavior
Short setup
A potential short setup appears when:
- the higher timeframe trend is bearish
- price is in premium
- price moves above the latest swing high
- the sweep size remains within a realistic range
- the candle shows meaningful upper wick behavior
The indicator also uses a configurable approximation of the **retail stop-loss zone**, based on the idea that many small traders cluster their stops near obvious structure.
5. Reclaim confirmation
A sweep alone is not enough.
The script also requires price to reclaim the swept level with a small configurable buffer.
That means:
- after sweeping below a swing low, price must recover back above it for long bias
- after sweeping above a swing high, price must move back below it for short bias
Why this matters
A lot of sweeps fail.
The reclaim step is essential because it suggests the sweep may have been a **liquidity grab**, not a true breakout.
6. Microstructure confirmation
After the reclaim, the indicator waits for a quick confirmation candle.
That confirmation requires:
- a minimum candle body size
- directional candle confirmation
- a small break of recent local structure
This is meant to avoid entering too early while still keeping the signal relatively close to the swept level.
7. Entry, Stop Loss, and Take Profit
Once a setup is confirmed, the indicator plots:
- Entry
- SL
- TP
Entry
The entry is based on the confirmation candle close.
Stop Loss
The stop loss is placed beyond the sweep extreme, with an additional **ATR-based buffer**.
This is intentional:
- retail traders usually place stops too close
- institutional-style logic needs more breathing room
- the SL should sit beyond the area that was already used to collect liquidity
Take Profit
The take profit is calculated using:
1. the nearest reasonable opposing liquidity zone , if available
2. otherwise, a fallback risk-reward based target
This gives the script a more realistic institutional-style objective rather than using a fixed target only.
8. Active signal cleanup
The indicator keeps the chart clean by:
- displaying only the last 5 visible signals
- automatically removing a signal once price touches:
- SL
- or TP
This prevents the chart from becoming cluttered and ensures that only relevant setups remain visible.
What kind of trader is this for?
This indicator is best suited for traders who already understand:
- market structure
- liquidity concepts
- trend context
- stop hunts
- reversal entries near key levels
It is especially useful for traders who want to avoid:
- entering too late
- buying into local highs
- shorting into local lows
- trading directly into obvious retail traps
Best settings to start with
These are good starting values for **XRPUSDT on 15m** (and others), which is the market this logic was heavily tuned around:
Trend
- HTF main: 60
- HTF secondary: 240
- Fast EMA: 20
- Slow EMA: 50
Premium / Discount
Dealing Range HTF: 20
Swings / Liquidity
- Swing Length: 5
- Minimum Sweep %: 0.12
- Maximum Sweep %: 1.00 to 1.20
- Retail Stop Zone %: 1.00
Confirmation
- Confirm Bars: 2 to 3
- Minimum Confirmation Body: 0.30
- Microstructure Break Lookback: 2
- Max Distance From Swept Level: 0.50 to 0.60 ATR
Risk
- ATR Length: 14
- SL ATR Buffer: 0.15
- Minimum RR to Signal: 1.10
- Fallback RR: 2.00
Volume
- Start with Volume Filter OFF
- Enable it later only if you want fewer but stricter signals
Configuration advice
If you get too many signals
Try:
- increasing Minimum Sweep %
- increasing Minimum Confirmation Body
- increasing Minimum RR to Signal
- enabling the volume filter
- using both HTF 1 and HTF 2
If you get too few signals
Try:
- reducing Minimum Sweep %
- reducing Minimum Confirmation Body
- lowering Minimum RR to Signal
- disabling the second HTF confirmation
- reducing the reclaim buffer slightly
If signals feel too late
Try:
- reducing **Confirm Bars**
- reducing **Microstructure Break Lookback**
- lowering **Minimum Confirmation Body** slightly
If signals still go against the move too often
Try:
- making the trend filter stricter
- requiring both higher timeframes
- tightening premium / discount usage
- reducing the maximum allowed sweep size
Practical interpretation
This indicator is not trying to predict every reversal.
Instead, it focuses on a specific scenario:
1. price moves into an obvious liquidity pool
2. stops are triggered
3. price reclaims the level
4. structure starts to shift back with the dominant trend
5. a trade idea is projected with defined risk and objective
That is the edge this script is built around.
Important notes
- This is **not** an order book tool.
- It does **not** see real liquidity, delta, footprint data, or exchange-level positioning.
- It is a **price-action approximation** of institutional behavior.
- Like any trading tool, it should not be used in isolation.
It works best when combined with:
- higher timeframe market structure
- strong support/resistance zones
- session context
- discretionary chart reading
Suggested usage
A practical workflow could be:
1. determine the higher timeframe directional bias
2. wait for price to reach a meaningful area
3. let the indicator detect the sweep and reclaim
4. evaluate the Entry / SL / TP visually
5. ignore setups that run directly into major nearby obstacles
6. focus only on the cleanest signals aligned with broader context
Final note
This indicator was built with a practical mindset:
* think like a larger participant
* understand where retail traders are trapped
* avoid emotional entries
* wait for liquidity to be taken first
* then act with defined risk
Indicator

Consolidation zones + BreakoutThis Pine Script v6 indicator is designed to detect consolidation zones and mark breakout entries (long or short) when price exits those zones.
Indicator purpose
Identify periods where price moves in a tight range for several consecutive bars (consolidation).
Highlight those zones on the chart with a yellow shaded area between the local high and low.
Mark potential LONG and SHORT entries when price breaks out of a consolidation zone.
Core consolidation logic
The indicator measures whether the market is “compressed” by comparing the price range of recent bars with volatility measured via ATR:
It computes the highest high and lowest low of the last lookback bars:
rangeHigh = ta.highest(high, lookback)
rangeLow = ta.lowest(low, lookback)
It calculates the current range:
rng = rangeHigh - rangeLow
It calculates ATR over atrLen bars as a volatility benchmark:
atrVal = ta.atr(atrLen)
It defines a compressed range (base consolidation) when the range is smaller than a multiple of ATR:
baseConso = rng < atrVal * atrMult
Here, atrMult controls how tight the range must be. Lower values (0.8–1.0) require strong compression; higher values (1.5–2.0) are more permissive.
Minimum bars in consolidation
To avoid calling a very short pause a consolidation, the script enforces a minimum duration:
It uses ta.barssince(not baseConso) to count how many bars have passed since the last time the consolidation condition was false.
If that count is greater than or equal to minBars, the market is considered to be in consolidation:
text
isConsolidating = ta.barssince(not baseConso) >= minBars
This prevents 2–3 sideways bars from being treated as a full consolidation zone. The minBars input lets you adapt the duration to your timeframe and trading style.
Plotting the consolidation zone
When isConsolidating is true, the script shades the consolidation area:
It plots two invisible series for the zone’s high and low:
text
pHigh = plot(rangeHigh, display = display.none)
pLow = plot(rangeLow, display = display.none)
It creates a yellow semi‑transparent fill between those lines only while in consolidation:
text
fillColor = isConsolidating ? color.new(#ffeb3b, 80) : color.new(#ffeb3b, 100)
fill(pHigh, pLow, color = fillColor, title = "Consolidation Zone")
Outside consolidation, the color becomes almost fully transparent so the shaded zone disappears. This keeps the chart clean and focuses attention on the actual ranges.
Breakout detection (LONG / SHORT)
The script then looks for breakouts when price leaves a consolidation zone:
It checks if the previous bar was inside consolidation:
wasConso = isConsolidating
A bullish breakout (LONG) occurs when:
The current bar is no longer in consolidation (not isConsolidating).
The previous bar was in consolidation (wasConso).
The close breaks above the previous consolidation high (close > rangeHigh ):
text
breakLong = not isConsolidating and wasConso and close > rangeHigh
A bearish breakout (SHORT) occurs when:
The current bar is no longer in consolidation.
The previous bar was in consolidation.
The close breaks below the previous consolidation low (close < rangeLow ):
text
breakShort = not isConsolidating and wasConso and close < rangeLow
On each breakout, a label is drawn at the breakout bar:
text
if breakLong
label.new(bar_index, low, "LONG",
style = label.style_label_up,
textcolor = color.white,
color = color.new(color.teal, 0),
size = size.tiny)
if breakShort
label.new(bar_index, high, "SHORT",
style = label.style_label_down,
textcolor = color.white,
color = color.new(color.red, 0),
size = size.tiny)
These labels highlight where price transitions from sideways action to a potential directional move.
User inputs and tuning
lookback (Bars for range)
Number of bars used to compute the consolidation high/low. Higher values produce wider, less frequent zones; lower values detect shorter consolidations.
minBars (Minimum bars in consolidation)
Minimum number of consecutive bars that must meet the compression condition. On 15‑minute charts, values between 6 and 12 often work, but this depends on the asset.
atrLen and atrMult
Control how strict the compression rule is.
atrLen: ATR period.
atrMult: maximum allowed range as a multiple of ATR.
Increasing atrMult finds more zones; decreasing it makes the filter stricter.
showText
Optional helper label with a short description, useful when sharing the script with other users on the PulseWire community.
Practical usage
Apply the indicator to your preferred timeframe (for example, 15‑minute crypto charts).
Tweak lookback, minBars, and atrMult until the yellow zones match the consolidations you would mark manually.
Use the LONG and SHORT labels as areas of interest for studying range breakouts and building your own entry/exit rules, always combining them with risk management and a complete trading strategy.
This way, the script turns a visual concept—sideways consolidation followed by breakout—into a systematic, testable signal in Pine Script v6. Indicator
