Liquidity Hunt and Reversal Trading Strategy: Time-Limited Bidirectional System Based on ATR Multiples and Historical Highs/Lows
FMZQuant

FMZQuant @fmzquant

Joined:
Apr 25, 2024

Liquidity Hunt and Reversal Trading Strategy: Time-Limited Bidirectional System Based on ATR Multiples and Historical Highs/Lows

Publish Date: May 23
1 1

Image description

Image description

Overview
The Liquidity Hunt and Reversal Trading Strategy is an advanced quantitative trading system focused on capturing liquidity hunt behaviors in the market and entering positions during subsequent strong reversals. The core idea of this strategy is to identify situations where historical highs or lows are breached (liquidity hunt), then wait for the market to display significant reversal candle patterns, indicating a potential direction change. This strategy doesn't simply capture pullbacks but looks for true reactionary reversals, thus providing fewer but more meaningful trading signals.

Strategy Principles
The strategy works based on two key steps: first identifying liquidity hunt behavior, then confirming reversal signals. Specifically:

Liquidity Hunt Identification: The strategy uses a parameterized lookback period (default 20 periods) to determine historical highs and lows. If the current price breaks above the previous high (liqUp) or falls below the previous low (liqDown), it is considered a potential liquidity hunt event.

Reversal Confirmation: After a liquidity hunt event occurs, the strategy looks for strong reversal candles with a magnitude exceeding 1.2 times the 14-period ATR (Average True Range). For long signals, it requires a strong bullish candle; for short signals, a strong bearish candle.

Signal Generation: Only when both liquidity hunt and reversal confirmation conditions are simultaneously met does the strategy generate a trading signal:

  • Long signal: Price breaks below the previous low (liqDown) followed by a strong bullish candle (bigBullish)
  • Short signal: Price breaks above the previous high (liqUp) followed by a strong bearish candle (bigBearish)

Exit Mechanisms: The strategy implements dual exit mechanisms:

  • Price-based take profit (TP) and stop loss (SL), defaulting to 2% and 1% of the entry price respectively
  • Time-based exit mechanism, defaulting to exit after 5 periods in position

Strategy Advantages
Analyzing the code of this quantitative trading strategy, we can summarize the following significant advantages:

  1. Captures Institutional Behavior: The strategy focuses on identifying liquidity hunt behaviors commonly used by institutions, which are typically market operations dominated by large funds, allowing traders to follow "smart money" movements.

  2. High-Quality Signals: Through the dual confirmation mechanism combining liquidity hunts and strong reversal candles, the strategy effectively filters out weak signals, generating only high-probability trading opportunities—"fewer but more meaningful signals."

  3. Strong Adaptability: The strategy uses ATR to dynamically adjust the magnitude requirements for reversal candles, enabling it to adapt to different market volatility conditions.

  4. Comprehensive Risk Management: Integrates dual protection mechanisms of percentage-based take profit/stop loss and time-based exits, effectively controlling risk exposure for each trade.

  5. Bidirectional Trading: The strategy supports both long and short positions, seeking opportunities in various market environments without being limited to a single direction.

  6. Adjustable Parameters: Key parameters such as lookback period, ATR multiplier, TP/SL percentages, and holding time can all be adjusted, giving the strategy a high degree of flexibility.

Strategy Risks
Despite its sophisticated design, the strategy still has the following potential risks:

  1. False Breakout Risk: The market may exhibit temporary breaches of historical highs/lows followed by immediate retracement, leading to false signals. A solution would be to consider additional filtering conditions, such as volume confirmation or breakout duration requirements.

  2. Limitations of Fixed Percentage TP/SL: Using fixed percentage take profits and stop losses may not be suitable for all market environments, especially during periods of significant volatility changes. Consider dynamic TP/SL settings based on ATR.

  3. Time Exit Blind Spots: Fixed period exits may lead to premature exit from favorable positions just as trends are beginning. Consider combining trend indicators to dynamically adjust exit timing.

  4. Parameter Sensitivity: Strategy performance is relatively sensitive to parameter selection, especially lookback period length and ATR multiplier. Thorough parameter optimization and backtesting are needed to avoid overfitting.

  5. Market Environment Adaptability: This strategy may work best in range-bound markets but could generate too many false signals in strongly trending markets. Consider adding a market environment recognition mechanism.

Strategy Optimization Directions
Based on in-depth analysis of the code, here are possible optimization directions:

  1. Dynamic ATR Multiplier: The strategy currently uses a fixed 1.2x ATR as the judgment standard for reversal candles. Consider dynamically adjusting this multiplier based on market volatility—lowering the multiplier during high volatility periods and raising it during low volatility periods.

  2. Volume Confirmation: Add volume analysis as an additional confirmation factor, for example, requiring increased volume during liquidity hunts and even greater volume during reversal candles.

  3. Multi-Timeframe Confirmation: Look for support/resistance zones on higher timeframes and only generate signals for liquidity hunt events near these important areas.

  4. Intelligent Take Profit Mechanism: Implement trailing take profits or dynamic take profit points based on market structure, rather than simple fixed percentages.

  5. Trend Filter: Add a trend recognition component to reduce counter-trend trading in strong trends, only accepting signals in the trend direction or adjusting parameters accordingly.

  6. Optimize Lookback Period: The current fixed lookback period (20 periods) may not be applicable to all markets. Consider implementing an adaptive lookback period that automatically adjusts based on market volatility.

  7. Enhanced Reversal Pattern Recognition: In addition to simple reversal candles, recognize more complex reversal patterns such as engulfing patterns, hammers, shooting stars, etc., to improve the accuracy of reversal identification.

Summary
The Liquidity Hunt and Reversal Trading Strategy is a sophisticatedly designed quantitative trading system that captures high-probability trading opportunities by identifying liquidity hunt behaviors in the market and subsequent strong reversals. The strategy combines technical analysis and market microstructure theory, with a special focus on key moments of market manipulation and reversal.

By implementing a strict dual confirmation mechanism (liquidity hunt + strong reversal), the strategy effectively filters out market noise, only signaling when truly high-quality setups appear. Additionally, a comprehensive risk management system (dual exit mechanisms) ensures capital safety.

While the strategy is already quite refined, there are multiple optimization directions to explore, particularly in dynamic parameter adjustment, multiple confirmation mechanisms, and smarter money management. Through these optimizations, the strategy has the potential to provide more stable and reliable trading signals under various market conditions.

For traders seeking to capture market reversal points, this strategy offers a systematic, disciplined approach that helps avoid emotional trading and improves long-term profitability.

Strategy source code

/*backtest
start: 2015-02-22 00:00:00
end: 2025-05-14 16:31:09
period: 1h
basePeriod: 1h
*/

//@version=5
strategy("Liquidity Hunt + Reversal Strategy (TP/SL + Time-Based)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)

// === Settings ===
len = input.int(20, title="Lookback for Liquidity Hunt")
barExit = input.int(5, title="Exit After How Many Bars")
tpPerc = input.float(2.0, title="Take Profit (%)") / 100
slPerc = input.float(1.0, title="Stop Loss (%)") / 100

// === Liquidity Hunt Detection ===
prevHigh = ta.highest(high, len)[1]
prevLow = ta.lowest(low, len)[1]
liqUp = high > prevHigh
liqDown = low < prevLow

// === Reversal Confirmation ===
atr = ta.atr(14)
bigBearish = close < open and (open - close) > (atr * 1.2)
bigBullish = close > open and (close - open) > (atr * 1.2)

// === Signals ===
longSignal = liqDown and bigBullish
shortSignal = liqUp and bigBearish

// === Open Trades ===
if (longSignal)
    strategy.entry("Long", strategy.long)
if (shortSignal)
    strategy.entry("Short", strategy.short)

// === Entry Price and Bars in Trade ===
entryPrice = strategy.position_avg_price
barsInTrade = bar_index - strategy.opentrades.entry_bar_index(0)

// === Long Exit ===
if (strategy.position_size > 0)
    strategy.exit("Long Exit", from_entry="Long",
     limit=entryPrice * (1 + tpPerc),
     stop=entryPrice * (1 - slPerc),
     when=barsInTrade >= barExit)

// === Short Exit ===
if (strategy.position_size < 0)
    strategy.exit("Short Exit", from_entry="Short",
     limit=entryPrice * (1 - tpPerc),
     stop=entryPrice * (1 + slPerc),
     when=barsInTrade >= barExit)

// === Chart Signals ===
plotshape(longSignal, location=location.belowbar, color=color.green, style=shape.labelup, text="LONG")
plotshape(shortSignal, location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT")
Enter fullscreen mode Exit fullscreen mode

Strategy parameters

Image description

The original address: Liquidity Hunt and Reversal Trading Strategy: Time-Limited Bidirectional System Based on ATR Multiples and Historical Highs/Lows

Comments 1 total

  • Rebecca Chow
    Rebecca ChowJun 17, 2025

    Now that’s what I call a ‘catch-and-release’ trading system! Clever idea—until the market decides to fake a liquidity pool like a mirage in the desert. Would love to see this strategy’s poker face when facing a central bank intervention. Proof or it’s just another algo fishing tale!

Add comment