All indicators

Bookmap Traps - Lite

May 13, 2026

Static chart image
Support and ResistanceVolume BasedMachine LearningCandlestickLiquidity

The Bookmap Traps - Lite indicator identifies hidden liquidity traps within candlestick wicks by utilizing a machine-learning enhanced volume visualization engine. It employs synthetic lower-timeframe data to model order flow microstructure, pinpointing where market participants are caught offside in high-probability reversal zones.

Usage

The Usage section describes how the script can be used to visualize market exhaustion and potential mean reversions.

  • Identifying Exhaustion: Large teal bubbles in upper wicks suggest trapped buyers at resistance, while large red bubbles in lower wicks suggest trapped sellers at support.
  • Interpreting ML Scores: Users can hover over any bubble to view the trapped volume and the Machine Learning (ML) confidence score. Higher scores indicate patterns that have historically led to successful reversals.
  • Scaling and Filtering: The "Size Scaling" and "Transparency Scaling" modes allow users to adjust how volume anomalies are represented. The "Show Top % of Traps" filter is used to declutter the chart by only displaying the most significant liquidation events.
  • Timeframe Optimization: This indicator is recommended for use on the 15-minute timeframe or higher to allow the synthetic footprint engine to aggregate sufficient 1-minute data for accurate modeling.

Details

The script operates using a synthetic footprint engine and a k-Nearest Neighbors (kNN) algorithm to process market data:

  • Synthetic Footprint Generation: The tool uses request.security_lower_tf to fetch 1-minute OHLCV data. It calculates a Volume Price Trend (VPT) ratio to model volume distribution within a single candle without requiring premium data feeds.
  • Wick Analysis: It isolates the volume executed within the extremities of a candle's wicks. If the "Deep Wick Only" mode is enabled, the engine filters out volume near the candle body, focusing only on participants trapped in the outermost half of the wick.
  • Machine Learning (kNN) Enhancement: The built-in kNN algorithm extracts structural features—such as body-to-ATR ratios and wick proportions—and compares them against a rolling training window of past bars.
  • Dynamic Weighting: The ML engine assigns a success rate to current patterns based on historical outcomes. Reliable patterns receive a visual "boost," while historically failing patterns are suppressed.

Settings

General Settings

  • Max Lookback (Bars): Determines the number of historical bars the indicator will process.
  • Intrabar Timeframe: The lower timeframe used for the synthetic footprint calculation (default is 1 minute).

Bubble Filters

  • Min Trap Volume: The minimum volume threshold required to display a trap bubble.

Trap Detection

  • Deep Wick Only: When enabled, only traps occurring in the outer 50% of the wick are calculated.
  • Show Top % of Traps: A percentile filter that limits visuals to the largest volume anomalies.
  • Min Wick % of Range: The minimum percentage of the total candle range a wick must occupy to be eligible for trap detection.

Visual Settings

  • Volume Mode: Choose between "Size Scaling" or "Transparency Scaling" to represent volume intensity.
  • Auto-Scale: Automatically scales bubble size based on recent volume percentiles.
  • Outlier Percentile Cap: Sets a cap on volume scaling to prevent massive anomalies from over-sizing the visualization.
  • Trapped Buyers/Sellers Color: Customizable colors for bullish and bearish trap bubbles.

ML Enhancement

  • Enable ML Scoring: Toggles the kNN predictive engine on or off.
  • K Neighbors: The number of similar historical patterns the ML model searches for.
  • Training Window: The number of past bars used for the ML training set.
  • Min Samples: The minimum number of similar past events required for the ML model to generate a score.

FAQ

How can I access the Bookmap Traps - Lite indicator?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Why are bubbles not appearing on every candle?
Bubbles only appear when the volume meets the "Min Trap Volume" threshold and the wick size meets the "Min Wick % of Range" requirement. Additionally, if the "Show Top %" filter is set low, only the most significant traps will be shown.

Does this indicator provide buy and sell signals?
No, this script is an analytical tool designed to visualize liquidity mechanics and market structure; it is intended to support a broader trading strategy rather than provide standalone signals.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.