OPEN-SOURCE SCRIPT
Bookmap Traps

Overview
This indicator utilizes the request.footprint() function to analyze sub-bar order flow and identify where large participants are "trapped" or "underwater." By aggregating tick-level volume and identifying imbalances at the edges of candles (wicks), it highlights high-probability reversal zones and exhaustion points.
Note
This is an upgrade version of my Bookmap Footprint Imbalance Bubbles indicator, check my profile to check it out. Footprint data on tradingview is also inaccurate after a certain cutoff, it is different for every ticker. Reduce the max lookback bars to ignore that data.
How it Works
The script calculates the delta and volume for every price level within a bar. It specifically looks for "Aggregated Traps"—clusters of buy or sell imbalances that occur at prices the market has since moved away from.
Key Features
Settings Guide
This indicator utilizes the request.footprint() function to analyze sub-bar order flow and identify where large participants are "trapped" or "underwater." By aggregating tick-level volume and identifying imbalances at the edges of candles (wicks), it highlights high-probability reversal zones and exhaustion points.
Note
This is an upgrade version of my Bookmap Footprint Imbalance Bubbles indicator, check my profile to check it out. Footprint data on tradingview is also inaccurate after a certain cutoff, it is different for every ticker. Reduce the max lookback bars to ignore that data.
How it Works
The script calculates the delta and volume for every price level within a bar. It specifically looks for "Aggregated Traps"—clusters of buy or sell imbalances that occur at prices the market has since moved away from.
- Trapped Buyers: Occur when significant buy imbalances are found at the top of a candle, but the price closes lower.
- Trapped Sellers: Occur when significant sell imbalances are found at the bottom of a candle, but the price closes higher.
Key Features
- Aggregated Cluster Logic: Instead of cluttering your chart with every single imbalance, this script sums up the trapped volume across the entire bar to provide a single, weighted "Bubble" at the average price of the trap.
- Top % Filter: A unique feature that allows you to filter for only the most significant events. Setting this to 10% will hide all but the top 10% largest volume traps currently on your chart.
- Dynamic Scaling: Choose between Size Scaling (larger bubbles for more volume) or Transparency Scaling (more opaque bubbles for higher conviction).
- Strict Wick Mode: When enabled, the script only considers traps occurring in the outer 30% of the candle (the wicks), ensuring you are only seeing true exhaustion.
- Auto-Scale Percentile Logic: The indicator automatically identifies "Outliers" based on chart history, ensuring the bubbles remain visually relevant regardless of the asset's typical volume.
Settings Guide
- Ticks per Row: Consolidates price levels. Use 1 for precision (e.g., Forex/Indices) or higher numbers for high-priced stocks/crypto.
- Imbalance Ratio: The multiplier required to trigger a trap (e.g., 3.0 means buyers must be 3x stronger than sellers).
- Show Top % of Traps: The ultimate filter. Reduce this to 5% or 10% to see only the "Whale" activity.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.