Appearance

Personalize your experience

Mode
Accent Color
Direction
MarketplacestrategiesLiquidity Wall Bounce
QuaScript

Liquidity Wall Bounce

Admin's ChoiceFree

Buys defended bid walls, sells defended ask walls, stop beyond the wall

0.0(0)
0 installs 0 0 comments
Q
433 listings

The QuaTick team's QuaScript analyses, run by the native C++ engine.

View Profile
quascriptstrategyorder-bookwallsreversal
Free
Backtest this strategy Open in QuaCode Edit in IDE
Version
Updated
Compatible

Live engine preview

QuaScriptQuaScript

The QuaScript engine's own output on the chart the terminal uses. Change the settings or edit the code and press Run to recompute it.

Liquidity Wall Bounceengine result
Loading the engine result…
quatick-charts · QuaScript engine on synthetic 1-minute bars · drag to pan · scroll to zoom · Run executes the script on the engine (⌘/Ctrl+Enter while editing)

About

Buys the defence of a large resting bid and sells the defence of a large resting ask. A wall is the biggest level within the search window when it is several times the side's average level. The setup needs both views: the bar trades into the wall and closes back on the right side (OHLCV), and the wall is still there at the close with the book leaning the bounce's way (book). The stop sits just beyond the wall: if it is pulled or consumed the idea is wrong. Exit: target at a multiple of the risk, or the opposite wall if it is closer. Needs the order book (L2): backtests run only where the chart has recorded books.


Settings

Search window (% from mid): 1

Wall size (x average level): 3

Reward / risk: 2

Stop buffer (ATR): 0.2


Backtest it yourself

Open it on the backtesting page to run it on any symbol, interval and date range, then use Monte Carlo, optimisation, walk-forward and robustness tests.

Strategy Rules

Entry Conditions

    Exit Conditions

    • ▸ target at a multiple of the risk, or the opposite wall if it is closer
    • ▸ Needs the order book (L2): backtests run only where the chart has recorded books

    Source Code

    Edit in IDE
    quascript
    1strategy "Liquidity Wall Bounce" {
    2 overlay = true
    3 capital = 100000
    4 commission = 0.05
    5 slippage = 1
    6 sizing = risk_percent
    7 size = 1
    8 max_leverage = 1
    9}
    10/// Buys the defence of a large resting bid and sells the defence of a large resting ask. A wall is
    11/// the biggest level within the search window when it is several times the side's average level.
    12/// The setup needs both views: the bar trades into the wall and closes back on the right side
    13/// (OHLCV), and the wall is still there at the close with the book leaning the bounce's way
    14/// (book). The stop sits just beyond the wall: if it is pulled or consumed the idea is wrong.
    15/// Exit: target at a multiple of the risk, or the opposite wall if it is closer.
    16/// Needs the order book (L2): backtests run only where the chart has recorded books.
    17win_pct = param.float(1.0, title = "Search window (% from mid)", min = 0.05, max = 10, step = 0.05, group = "Walls")
    18mult = param.float(3.0, title = "Wall size (x average level)", min = 1.2, max = 20, step = 0.1, group = "Walls")
    19rr = param.float(2.0, title = "Reward / risk", min = 0.5, max = 10, step = 0.1, group = "Exit")
    20buf = param.float(0.2, title = "Stop buffer (ATR)", min = 0, max = 3, step = 0.05, group = "Exit")
    21mid = book.mid
    22(bwp, bws) = book.wall(book.bid_side)
    23(awp, aws) = book.wall(book.ask_side)
    24bavg = book.bid_volume() / math.max(book.levels, 1)
    25aavg = book.ask_volume() / math.max(book.levels, 1)
    26bid_wall = bws >= mult * bavg and bwp >= mid * (1 - win_pct / 100) ? bwp : na
    27ask_wall = aws >= mult * aavg and awp <= mid * (1 + win_pct / 100) ? awp : na
    28a = ta.atr(14)
    29pres = book.pressure(0.25)
    30ready = not math.is_na(a)
    31long_sig = ready and not math.is_na(bid_wall[1]) and not math.is_na(bid_wall) and low <= bid_wall[1] and close > bid_wall[1] and pres > 0
    32short_sig = ready and not math.is_na(ask_wall[1]) and not math.is_na(ask_wall) and high >= ask_wall[1] and close < ask_wall[1] and pres < 0
    33flat = position.size == 0
    34if flat and long_sig {
    35 stop = bid_wall[1] - buf * a
    36 tgt = close + rr * (close - stop)
    37 order.market("L", side.long)
    38 exit.bracket("L exit", entry = "L", stop = stop, target = math.is_na(ask_wall) ? tgt : math.min(tgt, ask_wall))
    39}
    40if flat and short_sig {
    41 stop = ask_wall[1] + buf * a
    42 tgt = close - rr * (stop - close)
    43 order.market("S", side.short)
    44 exit.bracket("S exit", entry = "S", stop = stop, target = math.is_na(bid_wall) ? tgt : math.max(tgt, bid_wall))
    45}
    46risk.max_drawdown(25)
    47render.step(bid_wall, "Bid wall", color = color.emerald.300, width = 2)
    48render.step(ask_wall, "Ask wall", color = color.rose.300, width = 2)
    49render.mark(long_sig and flat, shape = shape.triangle_up, at = anchor.below_bar, color = color.emerald.300, size = 0.8, title = "Bid wall bounce")
    50render.mark(short_sig and flat, shape = shape.triangle_down, at = anchor.above_bar, color = color.rose.300, size = 0.8, title = "Ask wall rejection")
    51 
    Read-only preview. Open in QuaCode to edit and deploy.

    Reviews

    No reviews yet. Be the first to review this listing.

    Discussion

    Sign in to join the discussion. Your posts and replies show up on your profile.