OPEN-SOURCE SCRIPT
Aktualisiert DDDDD: Liquidity Trap Reversal

DDDDD: Liquidity Trap Reversal [v1.0]
This indicator is designed to detect potential reversal zones that form after an apparent liquidity sweep at local extremes.
The core idea is not to chase breakout candles blindly, but to identify situations where price extends into prior highs or lows, attracts participation, and then begins to show signs of exhaustion.
Instead of treating every breakout as continuation, this script looks for a specific reversal environment built from trend context, range expansion, abnormal volume, and momentum slowdown.
Core concept
Markets often move into obvious swing highs or swing lows to trigger stops, breakout entries, or forced positioning.
In some cases, that expansion is not the beginning of a clean trend leg, but the late phase of a move where liquidity is being taken before momentum weakens.
This script attempts to highlight those areas by combining:
a higher-level directional structure,
an extreme test versus recent price range,
a relative volume expansion filter,
a trend-strength condition,
and a momentum-fading condition.
The goal is to mark bars where the move into the extreme may be overextended and vulnerable to reversal.
Logic overview
The script evaluates five main components:
1) Macro directional bias
A Supertrend-derived direction is used as the main structural filter. This acts as the broader directional architecture around the trap event.
2) Extreme sweep detection
Price must reach beyond a recent local extreme:
for bearish trap logic, price pushes into the recent high range,
for bullish trap logic, price sweeps into the recent low range.
The lookback window for this sweep is controlled by the Extreme Lookback input.
3) Relative volume expansion
The script compares current volume against a moving average of volume and flags bars where volume expands beyond a user-defined multiplier.
This is used as a proxy for liquidation, stop-running, or abnormal participation.
4) Trend-strength filter
ADX must remain above a minimum threshold.
This helps avoid treating every small poke above or below a range as meaningful. The script is looking for sweeps that happen in a market with enough directional energy behind the move.
5) Momentum fade
MACD histogram behavior is used to detect whether momentum is no longer accelerating with the same strength.
This does not mean momentum has fully reversed already. It simply aims to capture early signs that the impulse may be losing efficiency.
Signal interpretation
A signal appears when the script finds a combination of:
directional structure,
sweep of a recent extreme,
elevated relative volume,
strong enough ADX,
and fading momentum.
A Bull Trap label marks a downside sweep that may be exhausting and becoming vulnerable to a reversal upward.
A Bear Trap label marks an upside sweep that may be exhausting and becoming vulnerable to a reversal downward.
These labels should be interpreted as context markers, not automatic trade commands.
Timeframe and architecture
The script supports a timeframe override, which allows the calculations to be performed on a selected timeframe instead of the chart timeframe.
This can be useful when the user wants a more stable structural read while viewing a lower timeframe chart.
The Macro EMA is included as an optional visual reference only.
It is not the trigger by itself, but can help users read whether the signal is appearing in a stretched or conflicting area relative to the chosen trend framework.
How to use
This indicator is generally more useful when treated as a reversal context tool rather than a standalone entry system.
Possible ways to use it:
identify sweep-and-fade zones after price attacks obvious highs or lows,
avoid late breakout chasing when a trap condition appears,
combine with market structure confirmation on a lower timeframe,
wait for reclaim / rejection / follow-through before acting,
use it as a filter alongside your own execution model.
Many users may find it more effective to wait for additional confirmation such as:
rejection wicks,
structure shift,
reclaim of prior level,
momentum turn on execution timeframe,
or a clear invalidation level.
Inputs
Macro EMA Length
Defines the EMA length for the optional macro trend reference line.
Supertrend Factor / Period
Controls the structural direction component.
Timeframe Override
Lets the user run calculations on a different timeframe than the current chart.
Extreme Lookback
Defines how far back the script looks to determine recent highs and lows.
Liquidation Vol Threshold
Sets the relative volume multiplier required to classify a bar as abnormal participation.
Min ADX
Minimum trend-strength threshold required before a trap can qualify.
Notes and limitations
This indicator does not predict every reversal, and it is not intended to label all stop-hunts perfectly.
Volume behavior, momentum behavior, and extreme sweeps can look different across markets and symbols.
Signals may behave differently depending on:
asset class,
session structure,
exchange volume quality,
and chosen timeframe.
For that reason, this script is best used as a decision-support tool within a broader trading framework, not as a guaranteed standalone system.
Practical reminder
A trap label does not automatically mean price must reverse immediately.
In strong trends, markets can continue to expand even after an apparent sweep.
Users should always define their own confirmation logic, invalidation rules, and risk management process.
This indicator is designed to detect potential reversal zones that form after an apparent liquidity sweep at local extremes.
The core idea is not to chase breakout candles blindly, but to identify situations where price extends into prior highs or lows, attracts participation, and then begins to show signs of exhaustion.
Instead of treating every breakout as continuation, this script looks for a specific reversal environment built from trend context, range expansion, abnormal volume, and momentum slowdown.
Core concept
Markets often move into obvious swing highs or swing lows to trigger stops, breakout entries, or forced positioning.
In some cases, that expansion is not the beginning of a clean trend leg, but the late phase of a move where liquidity is being taken before momentum weakens.
This script attempts to highlight those areas by combining:
a higher-level directional structure,
an extreme test versus recent price range,
a relative volume expansion filter,
a trend-strength condition,
and a momentum-fading condition.
The goal is to mark bars where the move into the extreme may be overextended and vulnerable to reversal.
Logic overview
The script evaluates five main components:
1) Macro directional bias
A Supertrend-derived direction is used as the main structural filter. This acts as the broader directional architecture around the trap event.
2) Extreme sweep detection
Price must reach beyond a recent local extreme:
for bearish trap logic, price pushes into the recent high range,
for bullish trap logic, price sweeps into the recent low range.
The lookback window for this sweep is controlled by the Extreme Lookback input.
3) Relative volume expansion
The script compares current volume against a moving average of volume and flags bars where volume expands beyond a user-defined multiplier.
This is used as a proxy for liquidation, stop-running, or abnormal participation.
4) Trend-strength filter
ADX must remain above a minimum threshold.
This helps avoid treating every small poke above or below a range as meaningful. The script is looking for sweeps that happen in a market with enough directional energy behind the move.
5) Momentum fade
MACD histogram behavior is used to detect whether momentum is no longer accelerating with the same strength.
This does not mean momentum has fully reversed already. It simply aims to capture early signs that the impulse may be losing efficiency.
Signal interpretation
A signal appears when the script finds a combination of:
directional structure,
sweep of a recent extreme,
elevated relative volume,
strong enough ADX,
and fading momentum.
A Bull Trap label marks a downside sweep that may be exhausting and becoming vulnerable to a reversal upward.
A Bear Trap label marks an upside sweep that may be exhausting and becoming vulnerable to a reversal downward.
These labels should be interpreted as context markers, not automatic trade commands.
Timeframe and architecture
The script supports a timeframe override, which allows the calculations to be performed on a selected timeframe instead of the chart timeframe.
This can be useful when the user wants a more stable structural read while viewing a lower timeframe chart.
The Macro EMA is included as an optional visual reference only.
It is not the trigger by itself, but can help users read whether the signal is appearing in a stretched or conflicting area relative to the chosen trend framework.
How to use
This indicator is generally more useful when treated as a reversal context tool rather than a standalone entry system.
Possible ways to use it:
identify sweep-and-fade zones after price attacks obvious highs or lows,
avoid late breakout chasing when a trap condition appears,
combine with market structure confirmation on a lower timeframe,
wait for reclaim / rejection / follow-through before acting,
use it as a filter alongside your own execution model.
Many users may find it more effective to wait for additional confirmation such as:
rejection wicks,
structure shift,
reclaim of prior level,
momentum turn on execution timeframe,
or a clear invalidation level.
Inputs
Macro EMA Length
Defines the EMA length for the optional macro trend reference line.
Supertrend Factor / Period
Controls the structural direction component.
Timeframe Override
Lets the user run calculations on a different timeframe than the current chart.
Extreme Lookback
Defines how far back the script looks to determine recent highs and lows.
Liquidation Vol Threshold
Sets the relative volume multiplier required to classify a bar as abnormal participation.
Min ADX
Minimum trend-strength threshold required before a trap can qualify.
Notes and limitations
This indicator does not predict every reversal, and it is not intended to label all stop-hunts perfectly.
Volume behavior, momentum behavior, and extreme sweeps can look different across markets and symbols.
Signals may behave differently depending on:
asset class,
session structure,
exchange volume quality,
and chosen timeframe.
For that reason, this script is best used as a decision-support tool within a broader trading framework, not as a guaranteed standalone system.
Practical reminder
A trap label does not automatically mean price must reverse immediately.
In strong trends, markets can continue to expand even after an apparent sweep.
Users should always define their own confirmation logic, invalidation rules, and risk management process.
Versionshinweise
Update v1.1This update adds a rejection-strength layer to the original Liquidity Trap Reversal model.
What’s new:
Added wick-based rejection analysis to better describe how strongly price rejects the swept extreme.
Added volume score and ADX score normalization to create a more structured view of trap quality.
Introduced a composite score that combines wick rejection, relative volume expansion, and trend-strength context.
Added grade icons to make labels easier to interpret at a glance.
Expanded signal labels to display:
relative volume multiplier,
wick percentage,
ADX value.
This update does not change the core trap concept.
Instead, it improves the way each signal is contextualized, so users can compare trap quality more easily rather than treating every signal as equal.
As always, this script should be used as a decision-support tool within a broader framework, not as a guaranteed standalone trading system.
Versionshinweise
DDDDD: Liquidity Trap Reversal [v1.2]This indicator is built upon the foundational concept of "Pro Scalper: Liquidation Mirror (Contract)" by CryptoLW (tradingview.com/script/7guLYvHJ). Full credit to CryptoLW for the original liquidation detection logic — the volume spike engine, momentum exhaustion gate, and mirror reversal concept that made this possible.
v1.2 is a significant architectural expansion developed under the DDDDD system framework. Here is what has been added on top of the original:
v1.1 Additions
— Timeframe Override: all core calculations now run through request.security() with a selectable TF input, allowing multi-timeframe analysis without switching charts.
— Rejection Strength Engine: a proprietary composite scoring system (0–100%) combining wick ratio (40%), volume multiplier (40%), and ADX score (20%) to quantify signal quality objectively.
— Grade System: signals are automatically classified as A+ (💥 ≥75%), A (🔥 ≥50%), B (⚡ ≥25%), or C (〰 <25%) based on the composite score.
v1.2 Additions
— Candle Close Confirmation Gate: optional toggle to require bar close before firing a signal, reducing intra-bar false positives.
— SL/TP Lines (NPC V1.8 Standard): automatic line.new() drawing of ENTRY, SL, and TP1 levels. SL is anchored to the recent swing low/high. TP is calculated at a user-defined R:R multiplier. Labels display price, pip distance, percentage move, and R:R ratio.
— Draw Mode (Latest/History): Latest mode clears previous SL/TP lines on each new signal, keeping the chart clean. History mode preserves all.
— Grade Filter: four independent checkboxes to show or hide each grade tier. Default hides Grade C to reduce noise.
— Signal Label with Grade: each label now displays the grade tier and icon alongside vol multiplier, wick %, ADX, and strength score.
— Dashboard Table: a real-time panel (top-right) showing the last signal type, grade, strength %, vol multiplier, ADX, and wick %.
— ATR-based Label Offset: signal labels are dynamically positioned using ATR to prevent collision with price candles across all volatility environments.
— Full NPC Alert Messages: dynamic alert() calls include ticker, timeframe, grade, strength, entry price, vol, ADX, and wick in every notification.
Open Source
This script is published open-source in the spirit of the original. If this system has added value to your analysis, please Boost 🚀 and support CryptoLW's original work as well.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.