Liquidity Entry ZonesLiquidity Entry Zones
Liquidity Entry Zones is an open-source liquidity-sweep entry framework built around one specific analytical idea:
when price moves through a recently formed liquidity level, then reclaims back through that area with acceptable candle quality and directional context, that event can be treated as a structured entry opportunity rather than as a generic wick sweep or random rejection candle.
This script is not designed to mark every swing high or swing low, and it is not intended to behave like a generic support/resistance overlay, a basic pivot script, or a simple “liquidity sweep detector” that treats every sweep in the same way. Its purpose is to store recent liquidity levels, detect meaningful sweeps through those levels, validate reclaim behavior, filter the candle using quality conditions, confirm the setup inside a limited time window, and optionally project a fixed-risk trade structure on the chart for review. :contentReference {index=1}
The script also includes optional sweep guides, signal visuals, a compact status panel, and an internal trade simulation layer so users can inspect how the framework behaves under the chosen settings. Those review tools are included to support chart study and comparison, not to imply future performance. :contentReference {index=2}
OPEN-SOURCE NOTE
This script is published open-source so users can inspect the logic directly, verify what the script is doing, and adapt parts of the workflow for their own research if they wish.
Even though the code is open, this description is intentionally detailed because many PulseWire users do not read Pine Script. The goal is for a user to understand what the script does, how it works, why its parts belong together, and how it may be used in practice without needing to reverse-engineer the code line by line.
OVERVIEW
At a high level, the script does seven things:
1. It stores recent pivot highs and pivot lows as liquidity reference levels.
2. It checks whether price sweeps through one of those stored levels by a minimum pip distance.
3. It requires reclaim behavior after the sweep, using either a close-back-inside rule or a stronger reclaim condition.
4. It filters the sweep candle using wick percentage, body percentage, candle range, optional EMA context, and optional midline confirmation.
5. It allows a limited confirmation window after the sweep so entries are not forced to happen only on the exact sweep bar.
6. It can project a fixed take-profit / stop-loss model and track simulated outcomes.
7. It summarizes the current state and projected results in a status panel.
The script is therefore meant to function as a complete liquidity-sweep reclaim framework rather than as a single-purpose pivot or line-drawing tool. :contentReference {index=3}
CORE IDEA
Many sweep-based tools detect only one event: price traded above a prior high or below a prior low.
This script takes a narrower and more selective approach.
Its central assumption is that a sweep alone is not enough. A useful entry event requires more than just temporary liquidity violation. The script therefore asks additional questions:
- Was the swept level a recent stored liquidity level derived from pivot structure?
- Did price move far enough beyond that level to qualify as a real sweep?
- Did price reclaim back through that area in a meaningful way?
- Was the sweep candle structurally acceptable in terms of wick, body, and range?
- Did the confirmation happen within a defined number of bars?
- Was the signal aligned with the optional EMA context?
- Did the confirmation candle behave the way the selected setup requires?
Because of that, the script does not treat all sweeps equally. It attempts to organize the process into a more selective sequence:
first identify liquidity,
then detect a sweep,
then validate reclaim quality,
then confirm within a limited window,
then project the resulting setup into a standardized chart-review structure.
That narrower focus is the main reason the script exists in its current form. :contentReference {index=4}
WHY THIS SCRIPT IS NOT A SIMPLE MASHUP
This script combines multiple components, but they are not included simply to place more features into one publication.
Each component has a specific role inside the same analytical process:
- Pivot storage defines where recent liquidity levels exist.
- Sweep detection checks whether those levels have actually been taken by price.
- Reclaim logic checks whether price closes back through the swept area in a meaningful way.
- Candle-quality filters reduce weak or low-information sweeps.
- The EMA filter provides optional directional context.
- The confirmation window prevents stale sweeps from remaining valid indefinitely.
- The cooldown logic reduces clustered signals.
- The trade simulation layer maps the resulting setup into a consistent risk framework.
- The panel organizes current state and projected review metrics into one readable output.
These layers are interdependent.
Without the pivot-based liquidity storage, there is no structured level to sweep.
Without the minimum sweep distance, trivial overextensions would count too easily.
Without reclaim validation, the script would mark many sweeps that never actually regained the level.
Without wick/body/range filters, weak candles would be treated too similarly to stronger rejection candles.
Without the confirmation window, old sweep conditions could stay alive for too long.
Without the EMA filter, the framework would lose one of its optional directional context filters.
Without the simulation layer, the user would still need to draw projected entry, stop, and target structure manually.
Without the status panel, the user would have less organized feedback when monitoring current sweep state, bias, and simulated results.
For that reason, the script is intended as a single liquidity-reclaim framework, not as a random bundle of unrelated features. :contentReference {index=5}
WHAT THE SCRIPT DOES
The script stores recent pivot highs and lows as liquidity levels, then watches for price to trade through those levels by at least the selected sweep distance in pip terms.
Once a sweep occurs, the script can evaluate whether the candle reclaimed back through the level. That reclaim can be interpreted in one of two ways:
- Close Back Inside
- Strong Reclaim
After that, the script can apply candle-quality filters based on:
- wick percentage,
- body percentage,
- minimum candle range,
- optional EMA alignment,
- optional midline-break confirmation,
- and candle-body direction for long or short confirmation.
If the setup remains valid within the selected confirmation window, the script can confirm a BUY or SELL signal.
When enabled, the simulation layer can then project:
- entry,
- fixed stop loss,
- fixed take profit,
- entry zone,
- target box,
- stop box,
- entry and invalidation lines,
- and active trade labels.
The script can also show sweep guides, signal markers, bar coloring, and a status panel summarizing its current state and projected statistics. :contentReference {index=6}
HOW THE SCRIPT WORKS
1) LIQUIDITY LEVEL STORAGE
The script uses pivot highs and pivot lows to create recent liquidity reference points.
A pivot high becomes a candidate buy-side liquidity reference.
A pivot low becomes a candidate sell-side liquidity reference.
The script stores a configurable number of recent levels so that sweep detection is based on previously identified structural points rather than arbitrary price movement. This makes the framework level-based rather than purely candle-based. :contentReference {index=7}
2) SWEEP DETECTION
Once liquidity levels are stored, the script checks whether current price moves beyond a recent level by at least the configured minimum sweep distance.
For a bearish sweep setup:
price must move above a stored high.
For a bullish sweep setup:
price must move below a stored low.
This distance is measured in pip terms using the selected pip-size logic. That means the same script can adapt to forex, JPY pairs, gold, or index-style symbols more consistently, assuming the pip mode is set correctly. :contentReference {index=8}
3) RECLAIM RULE
A sweep alone is not enough.
After the level is taken, the script requires reclaim behavior. It supports two reclaim interpretations:
Close Back Inside:
price must close back inside the swept level.
Strong Reclaim:
price must close back inside the swept level and also close beyond the candle midline in the reclaim direction.
This is important because many sweep candles do not actually reclaim decisively. The reclaim rule exists to distinguish “level taken” from “level taken and then actively rejected back through.” :contentReference {index=9}
4) CANDLE QUALITY FILTERS
The script evaluates sweep-candle quality using:
- minimum wick percentage,
- maximum body percentage,
- minimum candle range in pips.
This means the framework prefers sweeps where the wick expresses the actual sweep behavior and the body does not dominate too heavily relative to the total candle. The minimum-range filter helps avoid very small candles that technically sweep a level but do not carry enough information.
The script also allows:
- long confirmation must be bullish,
- short confirmation must be bearish.
These body-direction filters make the confirmation stricter and help align the final signal with the intended reclaim direction. :contentReference {index=10}
5) OPTIONAL EMA CONTEXT
The script includes an optional EMA trend filter using a configurable EMA length.
If enabled:
- long-side confirmations require price above the EMA,
- short-side confirmations require price below the EMA.
This does not turn the script into a full trend-following system. Instead, it acts as a directional context filter designed to reduce signals that reclaim against the selected EMA bias. :contentReference {index=11}
6) CONFIRMATION WINDOW
The script does not require the final entry to happen only on the exact sweep candle.
Instead, when a valid sweep is detected, it can remain eligible for a limited number of bars. During that confirmation window, the script checks whether the final bullish or bearish confirmation conditions are met.
This matters because some traders want the sweep candle itself to reclaim strongly, while others want to allow one or two bars for the actual confirmation to develop. The confirmation window makes that possible without letting very old sweep conditions remain valid indefinitely. :contentReference {index=12}
7) MIDLINE CONFIRMATION
The script also supports an optional requirement that price close beyond the midpoint of the sweep candle.
For bullish confirmation:
price must close above the sweep candle midpoint.
For bearish confirmation:
price must close below the sweep candle midpoint.
This adds an additional reclaim-strength condition and is intended to reduce weaker closes that technically qualify but do not show enough directional reclaim behavior. :contentReference {index=13}
8) SIGNAL COOLDOWN
The script includes a cooldown period between signals.
Once a signal fires, the framework waits the configured number of bars before allowing a new one. This reduces clustered signals and prevents the chart from rapidly stacking similar setups in a short space of time. :contentReference {index=14}
9) QUALITY SCORE
The script computes an internal quality score for the sweep using a weighted combination of:
- wick contribution,
- body contribution,
- candle-range contribution,
- EMA alignment,
- reclaim success,
- and midline-break success.
This score is used as an internal summary of signal quality and also appears in the panel or labels depending on the visual configuration.
The score is not a guarantee of outcome. It is simply an internal ranking model that summarizes how well the current setup meets the script’s own filter conditions. :contentReference {index=15}
10) TRADE SIMULATION
When enabled, the script can simulate a fixed-risk trade projection.
For long signals:
- entry is placed at close,
- TP is placed above entry by the selected take-profit pip distance,
- SL is placed below entry by the selected stop-loss pip distance.
For short signals:
- entry is placed at close,
- TP is placed below entry by the selected take-profit pip distance,
- SL is placed above entry by the selected stop-loss pip distance.
The simulation can also:
- block new signals while a trade is active,
- keep or hide stopped trades,
- draw entry zone, target zone, stop zone, entry line, invalidation line, and projection line,
- track total trades, wins, losses, and net pips.
This is a chart-review tool, not an execution engine. Its purpose is to make the framework easier to inspect after the signal appears. :contentReference {index=16}
11) SAME-BAR PRIORITY
In the version you shared, same-bar TP/SL handling is conservative: if both target and stop appear to be touched on the same bar after entry, SL takes priority. This matters because bar data alone does not reveal exact intrabar order, and a strict rule prevents artificially optimistic results. :contentReference {index=17}
12) PANEL AND STATE MODEL
The status panel summarizes the current internal state of the framework. It can display items such as:
- whether simulation is on,
- current EMA-based bias,
- sweep state,
- signal state,
- quality score,
- volatility state,
- session state,
- risk state,
- total trades,
- win rate,
- net pips,
- max drawdown in pips.
This panel is meant to condense the script’s state into one readable location rather than force the user to infer everything visually from price bars and labels alone. :contentReference {index=18}
WHAT MAKES THIS SCRIPT ORIGINAL
This script uses familiar building blocks such as:
- pivots,
- liquidity sweeps,
- EMA filtering,
- candle wick/body analysis,
- fixed TP/SL simulation,
- status panels.
Those building blocks are not original by themselves.
The originality of this script is not in inventing a completely new primitive indicator. The originality lies in how those familiar elements are arranged into one selective workflow:
pivot-based liquidity storage
→ minimum-distance sweep detection
→ reclaim validation
→ wick/body/range quality filtering
→ optional EMA alignment
→ limited-bar confirmation
→ cooldown control
→ fixed-risk trade projection
→ status-panel review
That full sequence is the main reason this script exists as its own publication.
It is not intended to be simply another pivot script, another stop-hunt detector, another EMA tool, or another TP/SL box script. It is specifically a liquidity-reclaim entry framework that combines structural level storage, sweep validation, candle-quality filtering, confirmation logic, and projected review in one workflow. :contentReference {index=19}
WHAT APPEARS ON THE CHART
Depending on settings, the chart may display:
- EMA filter,
- sweep guides,
- signal markers,
- BUY / SELL labels,
- signal bar coloring,
- entry zone,
- target zone,
- stop zone,
- entry line,
- invalidation line,
- projection path,
- status panel,
- TP / SL hit labels.
Users who want a cleaner chart can disable some visual components and keep only the layers most relevant to their workflow. :contentReference {index=20}
HOW TO USE THE SCRIPT
A practical workflow is:
1. Add the script to a standard candlestick chart.
2. Choose the correct pip mode for the instrument you are analyzing.
3. Set the pivot length and stored-level count to define how the script builds liquidity references.
4. Set the minimum sweep distance so trivial level violations are filtered out.
5. Choose the reclaim rule you want to use.
6. Configure candle-quality filters such as wick %, body %, and minimum range.
7. Decide whether to use the EMA trend filter.
8. Decide whether to require midline confirmation.
9. Choose the confirmation window and cooldown length.
10. If simulation is enabled, set TP and SL distances and decide whether new signals should be blocked while a trade is active.
11. Wait for a confirmed bullish or bearish liquidity reclaim.
12. Use the projected trade structure and panel as an analysis framework rather than as a blind instruction.
13. Review how the same rules behave over time and across symbols before relying on the framework in a live decision process. :contentReference {index=21}
This script is best understood as a structured decision-support and chart-review tool, not as a fully self-sufficient trading system.
SETTINGS REFERENCE
Trend Filter
- EMA Length: sets the EMA used for optional directional context.
- Use EMA Trend Filter: enables or disables EMA filtering.
Pip Settings
- Pip Mode: controls how pip size is interpreted for the current instrument.
Liquidity Sweep Detection
- Swing Pivot Length: defines the pivot depth used to create liquidity levels.
- Stored Liquidity Levels: controls how many recent levels remain in memory.
- Minimum Sweep Distance (Pips): defines how far price must move beyond a level to count as a sweep.
- Reclaim Rule: selects whether reclaim is based on close back inside or a stronger reclaim condition.
Candle Quality Filters
- Minimum Sweep Wick %: minimum wick contribution required from the sweep candle.
- Maximum Body %: maximum body share allowed for the sweep candle.
- Minimum Candle Range (Pips): minimum size required for the sweep candle.
- Long Confirmation Must Be Bullish: requires bullish body for long confirmations.
- Short Confirmation Must Be Bearish: requires bearish body for short confirmations.
Entry Confirmation
- Max Bars After Sweep For Confirmation: limits how many bars can pass before confirmation expires.
- Require Sweep Candle Midline Break: adds midpoint-based reclaim confirmation.
- Cooldown Bars Between Signals: prevents signals from clustering too closely.
Trade Simulation
- Enable Internal Trade Simulation: enables or disables projected trade logic.
- Take Profit (Pips): projected target distance.
- Stop Loss (Pips): projected stop distance.
- Block New Signals While Trade Is Active: prevents overlapping simulated trades.
- Show Stopped Trades: controls whether stopped-out trades remain visible.
Visual Settings
- Show Signal Labels: shows or hides BUY / SELL labels.
- Show Entry Line: shows or hides the projected entry line.
- Show Status Panel: enables or disables the panel.
- Color Signal Bars: colors confirmed signal bars.
- Show Sweep Guides: enables or disables sweep-guide visuals.
- Guide Extension Bars: controls how far guides extend.
- Signal Label Size: controls label size.
- Panel Position: controls panel location. :contentReference {index=22}
IMPORTANT PRACTICAL NOTE ON PIP MODE
The script uses pip-based calculations for:
- sweep distance,
- minimum candle range,
- take-profit distance,
- stop-loss distance.
Because of that, pip interpretation is critical.
If sweeps appear too small, too large, too frequent, too rare, or if projected TP/SL distances look inconsistent for the instrument being analyzed, the first setting to verify is Pip Mode. This is especially important on gold, JPY pairs, index-style symbols, and broker-specific tick formats. :contentReference {index=23}
LIMITATIONS AND SHORTCOMINGS
This script has important limitations:
- It is a liquidity-reclaim model, not a full market-structure engine.
- It only evaluates sweeps of stored pivot-based levels.
- It does not identify fair value gaps, order blocks, or discretionary structure beyond the stored liquidity levels.
- Signal quality depends heavily on the selected wick/body/range filters.
- EMA filtering is optional and only provides one form of directional context.
- The confirmation window can materially change signal frequency and behavior.
- The simulation layer uses simplified projected TP/SL logic and is not equivalent to real execution.
- Same-bar TP/SL handling uses a rule-based priority rather than true intrabar reconstruction.
- Historical projected outcomes should not be interpreted as guaranteed tradable results.
- No sweep-based model can remove all false signals or all regime-dependent behavior.
For those reasons, the script should be used as a structured analysis and review framework, not as a promise of future profitability. :contentReference {index=24}
WHO THIS SCRIPT MAY BE USEFUL FOR
This script may be useful for traders who:
- focus on liquidity sweeps and reclaim behavior,
- want a rules-based alternative to purely discretionary sweep reading,
- want candle-quality filters in addition to simple level breaks,
- want optional EMA context for directional alignment,
- want projected entry/TP/SL structure on the chart,
- want a compact state panel for monitoring the framework.
It may be less suitable for traders who:
- want a minimal pivot-only tool,
- want a complete multi-concept smart-money framework,
- want a full execution engine,
- want historical projected results to be treated as live-performance evidence.
DISCLAIMER
This script is provided for educational and informational purposes only.
It does not constitute financial, investment, or trading advice.
Market conditions change, historical behavior does not guarantee future results, and users should perform their own analysis, validation, and risk management before using the script in live decision-making.
Indicator


