Wallbot

Walls and confirmation

A wall is a price zone in the order book that holds far more resting orders than the zones around it. Wallbot only trades a wall after it has stayed in place long enough to be trusted, and it watches every wall closely afterwards. A wall can be pulled, absorbed by trades, fade away, or be broken.

What a wall is

Wallbot keeps a live copy of each watched coin's order book and runs a wall tracker on it. Support walls sit on the bid side, below price. Resistance walls sit on the ask side, above price. A long is planned in front of a support wall, a short in front of a resistance wall. The tracker uses three tests to find a wall.

1. Price levels are grouped into zones

Big orders are often spread over several ticks, so one price level on its own says little. The tracker adds neighbouring levels together into zones wall_bucket_bps wide (default 5 bps, that is 0.05% of price, rounded up to whole ticks). At a price of 101.00 with a 0.01 tick, each zone is 0.05 wide, for example 99.95 to 100.00.

2. The zone must be much bigger than a typical zone

For each side of the book, the tracker takes the median USDT size of all zones within wall_baseline_band_pct (default 5%) of the mid price. This median is the "typical level", or baseline. A zone counts as big enough when both of these hold:

3. The zone must sit inside the distance band

A new wall is only picked up between wall_min_dist_pct (0.3%) and wall_max_dist_pct (3%) from price. Closer walls leave no room for an entry. Farther walls are rarely reached. The band only matters when a wall is first found. Once a wall is tracked, price coming closer is exactly what the bot is waiting for, so it never drops a wall for being near.

Example

Illustrative numbers, not a real trade. Price is 101.00. The median bid zone within 5% of price holds 20,000 USDT, so a wall needs at least 8 x 20,000 = 160,000 USDT. The 250,000 USDT floor is higher, so the floor decides. The zone 99.95 to 100.00 holds 957 coins, about 95,700 USDT, so it is not a wall. If 3,000 coins (about 300,000 USDT) rest there, it passes both tests. It is about 1% below price, inside the 0.3% to 3% band, so the tracker starts watching it.

Depth view: ordinary ask zones above price, ordinary bid zones below, and one much larger bid zone, the support wall, about 1% below price inside the distance band price higher asks (resistance side) 101.00 price 100.00 support wall: 8x the typical zone and at least 250,000 USDT ordinary zones (the baseline is their median) 0.3% 3% band
Each bar is one zone. The support wall stands out from the ordinary bid zones and sits inside the 0.3% to 3% distance band. Its height is exaggerated for clarity.

Where the wall really starts and ends

A zone can hold a few small stray orders at its edges. For entries and stops, Wallbot takes the wall's edges from the fewest largest levels that together hold wall_core_pct (default 90%) of the zone's size. The near edge is the core level closest to price, the far edge the one farthest away. Entries, stops and sizing shows how these edges set the entry and the stop.

Confirmation

A big order that appears and vanishes within seconds is the classic spoof. So a newly found wall is only "watching" at first. It must stay big enough for wall_persist_s (default 45 seconds) before it becomes confirmed. This is the main anti-spoofing filter. The ring next to a wall on the dashboard fills up while it waits.

Note. Confirmation lowers the spoof risk but does not remove it. Spoofers can leave a wall up for minutes and pull it when price gets close. That is why every trade keeps watching its wall after the entry.

What happens to a wall

On every book update the tracker compares each wall with its peak size. It also counts how much of any drop was traded (trades printed inside the zone) and how much was cancelled (size that left with no matching trades). If a wall grows to a new peak, both counters start again from zero. A tracked wall ends in one of four ways.

OutcomeWhat the tracker sawWhat it usually means
PulledThe wall fell below wall_vanish_ratio (0.35) of its peak, and at least spoof_cancel_share (0.70) of the drop was cancelledLikely a spoof: the orders were taken away
AbsorbedThe wall fell below 0.35 of its peak, but less than 70% of the drop was cancelledA real wall eaten by trades
FadedThe wall slowly stopped standing out (below wall_k x baseline or the USDT floor) for longer than wall_fade_grace_s (10 s), without a big dropInterest dried up, or the rest of the book grew
BrokenPrice traded through the zone: for a support wall the best bid went below its low edge, for a resistance wall the best ask went above its high edgeThe wall did not hold

Telling pulled from absorbed

The difference matters because the bot reacts differently. A pull says the wall was never real. An absorption says it was real and buyers or sellers ate through it, which is what the stop exists for.

Example

Illustrative numbers. A support wall peaks at 1,000 coins and drops to 300. That is below 0.35 x 1,000 = 350, so it has vanished. 700 coins left the wall.

  • 600 cancelled and 100 traded: the cancelled share is 600 / 700 = 86%, at least 70%, so the wall is pulled. The log reads "Wall at 99.95 pulled (likely spoof). 86% of the drop was cancellation".
  • 300 cancelled and 400 traded: the cancelled share is 300 / 700 = 43%, so the wall is absorbed.
Three wall outcomes side by side: pulled, where most of the drop was cancelled; absorbed, where most of the drop was traded; and broken, where price moved through the wall Pulled peak 1,000 now 300 cancelled 600 traded 100 86% cancelled likely spoof Absorbed peak 1,000 now 300 cancelled 300 traded 400 43% cancelled real wall, eaten Broken wall best bid now below the wall price fell through it
Pulled and absorbed both mean the wall shrank below 35% of its peak. The cancelled share of the drop decides which one it was. Broken means price itself moved through the zone.

What each outcome does to your trade

Any of the four outcomes cancels a pending entry that rests in front of that wall. For an open trade, the reaction depends on the outcome. The details are on Protection, re-plans and exits.

OutcomePending entryOpen trade
PulledCancelled. A re-plan on the remaining walls may follow (replan_after_front_pull)Re-anchor to a backup wall, hold in profit at breakeven, or exit at market (pulled_wall_exit)
AbsorbedCancelled. On a stack of several walls, re-planned at once from the remaining walls (replan_on_stack_loss)Never an exit. Re-anchor, or move the stop to breakeven when in enough profit (on_absorbed_after_fill)
FadedCancelled. A re-plan may follow, as for a pullKept, unless exit_on_wall_faded is on. Then it is handled like a pull
BrokenCancelled. On a stack of several walls, re-planned at once, as for an absorbed wallNo action: the exchange stop handles it

Pending entries are also cancelled after pending_timeout_s (300 s) without a fill. The bot counts pulled walls per coin. The scanner can use that count to skip coins that spoof a lot (max_spoof_rate; see the scanner).

The 4h support/resistance filter

A wall that lines up with a level where price turned before is more likely to matter. With sr_filter on (the default), Wallbot only trades a wall that sits at such a higher-timeframe level.

  1. Candles. It loads sr_timeframe candles (default 4h) for the last sr_lookback_days (30 days). Only fully closed candles count, so the filter never looks into the future.
  2. Pivots. A pivot high is a candle whose high is above the highs of sr_pivot_strength (2) candles on each side. A pivot low mirrors it. A pivot only exists once its right-hand candles have closed.
  3. Levels. Pivots within the level tolerance of each other merge into one level, their average. By default the tolerance is sr_tolerance_pct (0.3%).
  4. Match. The wall's zone must lie within the same tolerance of a level (0.3% by default), or contain it. A support wall needs a level at or below the current price, and a resistance wall needs one at or above it.

Tolerance per coin. sr_tolerance_mode chooses how the tolerance is set. fixed_pct (default) uses sr_tolerance_pct for every coin. atr follows each coin's volatility: sr_tol_atr_mult (0.1) times ATR(14) of the level candles as a share of price, kept between sr_tol_min_pct (0.05%) and sr_tol_max_pct (0.5%). It changes only when a new candle closes, and falls back to sr_tolerance_pct without enough candles. The same value is used to merge pivots, to match walls and for the bands on the charts, which show it as "±x%".

A wall without a level is skipped with a reason such as "Skipped wall: no 4h level at or below price within 0.3% of the wall at 99.95-100". The matched level is stored with the trade and shown in the "Placed" log line.

For a wall stack (below), sr_stack_rule decides what must match. With any (default), the stack passes if any of its walls is at a level. With nearest, only the nearest wall counts.

Example

Illustrative numbers. Price is 101.00 and a support wall sits at 99.95 to 100.00. Two 4h pivot lows at 99.70 and 99.80 are within 0.3% of each other, so they merge into one level at 99.75. The gap from 99.75 to the wall's low edge is 0.20 / 99.75 = 0.20%, within 0.3%, and the level is below price. The wall passes.

Wall stacks

Walls often come in groups on one side of the book. With entry_anchor set to stack (default), Wallbot treats them as one defence line:

With single_wall, the entry and stop sit around one wall only, as in older versions. A stack of one wall behaves the same in both modes.

A wall stack below price: the nearest wall A and wall B are within the 1.5 percent span and form the stack; wall C is outside it. The entry sits just above A, the stop 0.5 percent below B 101.00 price 100.51 entry (in front of A) A: 100.45-100.50 (nearest) B: 99.50-99.55 (in the stack) 99.00 stop: 0.5% behind B C: 98.30-98.35 (outside the span) span 1.5%
Walls A and B form the stack. The stop goes behind B, the farthest wall in the stack. Wall C is more than 1.5% from A's near edge, so it is not part of the stack. Spacing is to scale only roughly.

Example

Illustrative numbers. Price is 101.00. Wall A (100.45 to 100.50) is the nearest. Wall B's far edge, 99.50, is (100.50 - 99.50) / 100.50 = 0.99% from A's near edge, inside the 1.5% span, so B joins. Wall C's far edge, 98.30, is 2.19% away, so it does not. With the default stop (0.5% behind the far edge), the stop is 99.50 x 0.995 = 99.0025, rounded away from the entry to 99.00. The entry is one tick in front of A, at 100.51.

Before the fill, a stack that loses a wall is re-planned. When any wall of a pending entry's stack fades, is pulled, absorbed or broken, the entry is cancelled (and the cancel confirmed) and planned again from the remaining walls with replan_on_stack_loss on (default, wall hug only): in front of the nearest wall, behind the farthest, at the highest leverage that passes every check. If the new plan is the same, the order stays; if it fails, the entry is only cancelled. A pulled or faded front wall waits replan_cooldown_s first (After the front wall is pulled).

After the fill, the stack keeps working. If stack walls disappear and the farthest remaining wall is closer to price, the stop can be tightened behind it (tighten_stop_on_stack_change). If the anchor wall is pulled, another wall of the stack can take over as the anchor. Both are explained on Protection, re-plans and exits.