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.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.