Auction Market Theory LevelsAuction Market Theory Indicator
TradingView Pine Script v6 indicator that plots Auction Market Theory (AMT) session levels for RTH/ETH, including value area, VPOC, initial balance extensions, and session VWAP, with Bookmap cloud notes logging.
Features
RTH and ETH session detection with configurable session times.
RTH levels: HOD/LOD, IB30, IB60, IB0.5, IB1.5, IB2.
Value Area (VAH/VAL) and VPOC computed from a session volume profile histogram.
ETH levels: ONH/ONL/ONMID/ONVPOC.
Session VWAP overlay.
Optional labels and/or lines, with ability to extend lines to the right.
Previous session level carry-forward.
Bookmap CSV-style logging and alert payload formatting.
## Inputs
Sessions: `RTH session time`, `ETH session time`.
Levels toggles: `Show HOD and LOD`, `Show IB`, `Show IB30`, `Show IB60`, `Show IB1.5`, `Show IB2`, `Show ONH, ONL, ONVPOC, ONMID`, `Show VAH and VAL`, `Show VPOC`.
Value Area: `Value Area %`, `Number of Histograms`.
Display: `Show price labels`, `Show Lines at price levels`, `Extend lines to the right`, `Session VWAP`, `VWAP color`.
Lookback: `Look back time in hours for previous sessions`.
Logging: `Symbol Prefix` for Bookmap datafeed output.
Getting started
1. Open TradingView and create a new Pine Script.
2. Paste the contents of (src/auction-market-theory.pine).
3. Save and add the indicator to a chart.
Notes
The indicator is designed to run on intraday timeframes with session boundaries.
VPOC/VAH/VAL are calculated from a volume profile histogram built from session bars.
Alerts emit a CSV-style payload containing AMT levels for Bookmap.
Bookmap Cloud Notes output
The script logs and alerts a CSV-style line compatible with Bookmap Cloud Notes. Each line follows this format:
"SYMBOL",PRICE,NOTE,FG_COLOR,BG_COLOR,ALIGN,DIAMETER,LINE
Example (from the script):
"ESH6.CME@BMD",5243.25,ONVPOC,#000000,#ff0066,left,1,TRUE
Alerts → email → local Bookmap Cloud Notes
TradingView alerts can be configured to send these CSV lines to your email address. A simple Python script can then read the email and publish the notes locally to Bookmap Cloud Notes.
Suggested flow:
1. Create a TradingView alert for this indicator.
2. Use the alert message template to output the payload (the script already builds the message in `msg`).
3. Configure the alert to send to your email.
4. Run a local Python reader that parses the incoming email and forwards the CSV lines to your Bookmap Cloud Notes endpoint.
AMT
All-in-One CVD: Failed Auction + Trap + Flow Classifications All-in-One CVD : Failed Auction/Trap + Flow Classifications (Colored Bars)
Description:
This script provides an advanced order flow and delta-based trading visualization designed to highlight key market microstructure events in real time. It combines Cumulative Volume Delta (CVD), failed auction detection, absorption tracking, continuation signals, and trap identification into a single, coherent tool with colored bars and visual markers. Unlike standard volume or trend-following indicators, this script focuses on aggressive order flow and price acceptance/rejection events, making it particularly suitable for scalping, intraday momentum trading, and identifying high-probability short-term setups.
Originality and Purpose:
Many scripts either show CVD or detect failed auctions separately, but this script integrates multiple advanced flow concepts into one indicator.
By combining CVD, normalized delta, strong delta thresholds, failed auctions, absorption, traps, and continuation patterns, traders can identify where aggressive buying or selling is being absorbed, where price is likely to continue, and where traps are forming.
The mashup is intentional: each component validates the other. For example, a failed auction signal without absorption is less significant, while a failed auction coinciding with absorption signals a true high-probability trap or reversal.
Failed auctions typically align with "Failed 2" patterns from The Strat by Rob Smith, providing additional confirmation using a well-established price action methodology.
How It Works:
Volume and Delta Calculation:
Computes buying and selling pressure from volume and bar structure (high/low/close).
Supports UltraData mode for enhanced volume calculations using security data.
Options for Cumulative Mode: Total, Periodic, or EMA-based CVD.
Normalized Delta and Strong Delta Detection:
Calculates normalized delta (z-score) to standardize flow across different volatility regimes.
Flags strong buying or selling when delta exceeds user-defined thresholds.
Failed Auction Detection:
Highlights bars where price attempted to break previous highs/lows but failed to sustain, signaling trapped aggressive participants.
True failed auctions can coincide with absorption for higher-probability setups.
Absorption:
Detects situations where strong aggressive flow is absorbed at key levels, showing institutional participation or liquidity consumption.
Bullish absorption occurs when aggressive buying is absorbed at previous lows; bearish absorption occurs when aggressive selling is absorbed at previous highs.
Flow Classification:
Continuation: Aggressive flow accepted by the market — often the next candle continues in the direction of the delta.
Important: A single continuation signal does not guarantee follow-through. Traders should view it as an indicator that aggressive participants are in control for the current candle, and consider market context, trend, and support/resistance before assuming continuation. Multiple consecutive continuation signals or confirmation with absorption/strong delta increases reliability.
Trap: Aggressive flow trapped — the market reverses after failed auction.
Absorption: Aggressive orders absorbed — market shows hesitation at tested levels.
Colored CVD Bars and Visual Markers:
Bars colored green/red/gray based on delta direction.
Visual markers indicate flow state: circles for continuation, X-cross for traps, triangles for absorption.
Works in real time — live candles are updated with flow state markers.
Alerts:
Custom alert conditions for each flow type: continuation, trap, and absorption.
Alerts provide actionable signals for automated monitoring or manual trading.
Trading Applications:
Trap Trading: Identify aggressive buyers/sellers who fail to push price and get trapped. Use trap signals to fade reversals.
Continuation Trading: Detect market acceptance of aggressive flow for trend-following or breakout strategies. Use caution: a single continuation signal indicates probability, not certainty, and should be confirmed with structural context.
Absorption Analysis: Spot where institutional participants absorb liquidity before a potential directional move.
Intraday Scalping: Combines delta, volume, failed auction logic, and Strat alignment for high-frequency setups.
Key Notes:
True failed auctions with significant market impact require absorption — otherwise, a simple failed attempt may be a weak signal.
The script works across multiple markets (Forex, Crypto, Stock) and supports live bar updates.
Users can adjust strong delta thresholds, period lengths, and cumulative modes to fit their preferred trading style or volatility regime.
Conclusion:
This all-in-one script provides traders with a comprehensive, visually intuitive, and real-time method to detect aggressive flow, failed auctions, absorption, and continuation patterns. By linking failed auctions to The Strat’s failed 2 patterns, and clarifying the probabilistic nature of continuation signals, it merges advanced delta analytics with proven price action methodology, making it highly original, actionable, and educational for understanding market order flow dynamics.
Half Back minimalisticless intrusive version of my half back indicator.
Show the midpoint of the current day.


