OPEN-SOURCE SCRIPT
Mis à jour

Opening Auction Trap Map [AGPro Series]

819
Opening Auction Trap Map [AGPro Series]

🧠 Core Idea

Did the opening auction accept value, reject an early extreme, or trap breakout participants?


📌 Overview / What it does

Opening Auction Trap Map is an intraday session-open analysis tool built to study the first auction window of the trading session.

The script builds an opening auction box, tracks the auction high and low, draws an acceptance rail, maps upper and lower failed-auction trap zones, and classifies whether price is accepting outside the auction or rejecting back into the range.

It does not predict price direction, automate trades, or claim that every opening trap will create a reversal. It is a structured visualization and decision-support tool for intraday auction context.


🎯 Purpose & Design Philosophy

Many opening-range tools focus only on breakout direction.

This script was built to answer a more precise auction question:

Was the opening move accepted, or did it trap traders who chased the first extreme?

The design goal is to help intraday traders read the opening range as an auction behavior map instead of treating it as a simple breakout box.


⚡ Why This Script Is Different

Most ORB tools mark the opening high and low, then wait for a breakout.

This script does NOT treat every opening breakout as valid.

Instead, it checks whether the move accepts beyond the auction edge, fails back inside the auction range, or retests a failed edge. The focus is auction behavior, trap risk, range control, and acceptance quality.


⚙️ Methodology

1. Opening Auction Window

The script tracks high, low, and midpoint during the selected opening auction window.

2. Auction Box and Rails

After the auction completes, the script projects the auction box, upper and lower trap zones, and the midpoint acceptance rail.

3. Failed-Auction Detection

If price breaks above the auction high and closes back inside the range with enough upper-wick rejection, the script can mark an upper auction trap.

If price breaks below the auction low and closes back inside the range with enough lower-wick rejection, the script can mark a lower auction trap.

4. Acceptance Evaluation

If price holds beyond the auction edge for the required number of closes, the script can mark accepted movement above or below the auction.

5. Visual Output

The chart displays the auction box, trap zones, acceptance rail, event labels, right-side tags, alerts, and a compact AG Pro panel.


🗺️ How to Read the Chart

Opening Auction Box = the high-low range created during the selected opening window.

Acceptance Rail = the midpoint of the opening auction range.

Upper Trap Zone = the area around the auction high where failed upside breakouts may be evaluated.

Lower Trap Zone = the area around the auction low where failed downside breakouts may be evaluated.

UPPER AUCTION TRAP = price failed above the auction high and closed back inside the range.

LOWER AUCTION TRAP = price failed below the auction low and closed back inside the range.

ACCEPT UP = price accepted above the auction high.

ACCEPT DOWN = price accepted below the auction low.

Panel = summarizes auction state, quality score, auction high/low, range control, trap risk, next context, session window, and timeframe scope.

TF Scope = shows whether the current chart timeframe is inside the supported auction-building range.


🚦 Signals & States

• UPPER TRAP → upside auction breakout failed back inside the range.

• LOWER TRAP → downside auction breakout failed back inside the range.

• ACCEPT UP → price accepted above the auction high.

• ACCEPT DOWN → price accepted below the auction low.

• RANGE CONTROL → price is trading inside the auction range.

• ABOVE AUCTION → price is above the auction high but not yet classified as accepted.

• BELOW AUCTION → price is below the auction low but not yet classified as accepted.

• BUILDING → the opening auction window is still forming.


🔔 Alerts Logic

Alerts trigger when a new major auction behavior state appears.

• Upper Opening Auction Trap → price failed above the auction high and closed back inside the range.

• Lower Opening Auction Trap → price failed below the auction low and closed back inside the range.

• Accepted Above Opening Auction → price accepted above the opening auction high.

• Accepted Below Opening Auction → price accepted below the opening auction low.

Alerts are attention markers, not trade instructions.


🧩 Confluence Logic

The context becomes stronger when:

• The auction range is clearly formed
• Price probes an auction edge
• The close rejects back inside the range
• Wick quality is strong
• Relative volume confirms participation
• The panel state agrees with the event label

If these elements do not align, the script avoids forcing a trap interpretation.


📊 When to Use

• Intraday session-open analysis
• Opening range review
• ORB validation and failed-breakout detection
• Equity index, stock, futures, forex, and crypto session studies
• 1m, 3m, 5m, 15m, 30m, and 1H charts
• Markets where the selected opening session has meaning


⚠️ When NOT to Use

• Daily, weekly, or monthly charts
• Symbols without a meaningful session open
• Very low-liquidity assets
• Extremely noisy markets where wick behavior is unreliable
• Charts where the selected auction window does not match the actual market session
• Situations where a single opening range should not be over-interpreted


🎛️ Key Inputs

• Opening Auction Window → defines the session segment used to build the auction range.

• Active Session Window → defines the session where post-auction behavior is evaluated.

• Max Chart TF Minutes → defines the largest chart timeframe that should build the auction map. With the default 09:30-10:00 auction window, 30m and lower charts are the intended use.

• Acceptance Close Count → sets how many closes are required before a breakout is treated as accepted.

• Trap Evaluation Window → limits how long after the auction trap logic remains active.

• Trap Wick Quality Threshold → controls how strong the rejection wick must be before a trap label appears.

• Use Volume Confirmation → adds relative volume to quality scoring.

• Trap Zone Width ATR → controls the thickness of the upper and lower trap zones.

• Event Label Mode → Premium focuses on traps and accepted moves. Detailed also allows lower-priority retest labels.

• Projection Bars → controls how far the auction structure projects to the right.


🖥️ Interface & Visual Design

The visual hierarchy is built around the auction range:

The box defines the opening auction.

Trap zones frame the dangerous edges.

The midpoint rail shows range control.

Event labels mark important acceptance or failure behavior.

The AG Pro panel summarizes the current auction state without requiring the user to decode every element manually.


🧪 Practical Usage Workflow

1. Select the opening auction window that matches the market.

2. Wait until the auction box completes.

3. Watch how price behaves around the auction high and low.

4. Check whether price accepts beyond the edge or fails back inside the range.

5. Use the panel to confirm auction state, quality score, range control, and trap risk.

6. Interpret the output inside broader market context.


🔍 Interpretation Guidelines

An upper trap does not guarantee a selloff. It means the auction high was probed and rejected back inside the range.

A lower trap does not guarantee a rally. It means the auction low was probed and rejected back inside the range.

Accepted movement does not guarantee continuation. It means price has held beyond the auction edge according to the script’s rule set.


🚫 What This Script Is NOT

This script is not a prediction engine.

It is not financial advice.

It is not an auto-trading system.

It does not provide guaranteed entry or exit signals.

It is not a standard ORB breakout strategy.


⚠️ Limitations & Transparency

Session settings matter. A poorly selected auction window can produce weak context.

Higher chart timeframes may not capture the opening auction precisely.

Low-liquidity markets may generate misleading wicks.

Gap-heavy markets may require wider interpretation.

The script is designed for intraday auction reading, not long-term chart analysis.


🧠 Market Context Notes

The opening auction is often useful because it reveals early participation, imbalance, and willingness to accept price outside the first range.

Failed extremes can matter because they show where early breakout attempts were rejected.

Acceptance can matter because it shows where the market was willing to continue trading beyond the auction edge.


🧾 Use Case Examples

If price breaks above the auction high but closes back inside the range with a strong upper wick, the script may mark UPPER AUCTION TRAP.

If price breaks below the auction low but closes back inside the range with a strong lower wick, the script may mark LOWER AUCTION TRAP.

If price closes above the auction high for the required number of bars, the script may mark ACCEPT UP.

If price closes below the auction low for the required number of bars, the script may mark ACCEPT DOWN.


🧱 System Philosophy

This script follows a behavior-first approach:

Auction first.
Edge reaction second.
Acceptance third.
Trap risk fourth.

The goal is to reduce blind breakout thinking and encourage structured opening-session interpretation.


🔐 Non-Promise Statement

No script can guarantee outcomes.

No auction edge, trap label, acceptance state, or quality score should be treated as certainty.

The output should always be interpreted with broader structure, liquidity, volatility, and personal risk rules.


📉 Risk Disclosure

Trading involves risk.

Markets can move against any interpretation.

This script is for educational and analytical purposes only.

Users are fully responsible for their own decisions.


📚 Educational Note

Use this script to study how the market behaves around the opening auction and whether early extremes are accepted or rejected.
Notes de version
🔧 UPDATE NOTES - V1.1

This update focuses on readability, intraday chart clarity, panel contrast, and cleaner public-release presentation.

The core purpose of the script remains unchanged.
This release improves how the existing opening auction logic is presented, organized, and interpreted on the chart.

This script continues to function as an analytical and visualization tool.
It does not attempt to predict price direction or provide guaranteed outcomes.


------------------------
What Changed
------------------------

• Refined auction and event labels.
Auction trap, accepted move, and retest labels now use cleaner two-line text and contrast-aware text colors.

• Improved active auction zone presentation.
The opening auction box keeps a centered badge while avoiding hard-to-read text directly on transparent chart objects.

• Added an auction outcome bridge.
The script now connects the auction reference to the current outcome so acceptance, trap, and range-control stories read more clearly.

• Refined outcome bridge styling.
The bridge is now shorter, lighter, and dotted so it supports the auction story without dominating the chart.

• Strengthened right-side context tags.
Auction high, auction low, and active state tags now use clearer text and safer foreground colors.

• Tightened default projection distance.
Right-side auction tags now stay closer to the active candles on intraday charts.

• Cleaned default auction markers.
Small auction-building markers are now optional and disabled by default for cleaner screenshots.

• Rebuilt the AG Pro panel surface.
The panel now uses stronger dark-theme contrast, alternating rows, and the standard merged blue header row.

• Added event-label retention control.
Users can now control how many historical auction labels remain visible on the chart.


------------------------
Visual Improvements
------------------------

• Improved chart readability by adjusting labels, tags, spacing, and contrast

• Reduced visual clutter while keeping the opening auction context visible

• Refined visual hierarchy so traps, acceptance states, and auction range control stand out more clearly

• Adjusted label wording to avoid oversized single-line text blocks


------------------------
Interface & Usability
------------------------

• Optimized panel layout for clearer information flow

• Improved label readability for better chart interaction

• Expanded panel location options for more flexible placement

• Enhanced overall user experience without changing core logic


------------------------
Behavior Notes
------------------------

This update does not change the core analytical logic of the script.

The goal is to improve clarity and usability, not to introduce new predictive behavior.

Users should interpret outputs the same way as before, but with improved visual structure.


------------------------
Limitations Reminder
------------------------

The script remains a rule-based analytical tool.

Opening auction behavior is best interpreted on intraday charts where the auction window can be mapped precisely.

Outputs should always be interpreted within broader market context.


------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only.

It does not provide financial advice or guaranteed trading outcomes.

Users remain responsible for their own decisions.
Notes de version
🔧 UPDATE NOTES - 1.2

This update adds a follow-rate proof layer to the Opening Auction Trap Map. The
core opening-auction detection, trap and acceptance logic, scoring and visuals
remain unchanged. This script continues to function as an analytical visualization
tool. It does not predict price direction or provide guaranteed outcomes.

------------------------
What Changed
------------------------

- Follow-Rate Proof Layer
The panel now tracks how often a trap or acceptance signal followed through in its
expected direction, with sample size shown.

- Symmetric, Fair Statistic
The proof uses an equal target and reversal distance around the signal's trigger
close, so the rate reflects genuine directional follow-through rather than an
inflated or one-sided test.

- Honest, Non-Repaint Statistics
Each signal is counted once. Samples are confirmed-bar gated, resolve as a non-win
on reversal or timeout, resolve same-bar ambiguity conservatively, and use a fixed
window to avoid inflation.

- New Proof Inputs
A dedicated proof group adds Proof Window Bars and Proof Target ATR so the
follow-rate test can be tuned per market and session.

------------------------
Visual Improvements
------------------------

- Kept the auction box, trap zones, acceptance rail, outcome bridge, centered
badge and right-side tags intact
- Preserved moderate, non-overlapping label density
- No added chart clutter from the proof layer

------------------------
Interface & Usability
------------------------

- Added a Follow Rate proof row to the panel
- Improved first-glance trust with a visible track-record context
- Kept all existing settings and defaults backward compatible
- Enhanced overall experience without changing the core engine

------------------------
Behavior Notes
------------------------

This update does not change how the opening auction, traps, acceptance or the
quality score are computed. The goal is added proof context. Outputs should be
interpreted the same way as before.

------------------------
Limitations Reminder
------------------------

The script remains a rule-based, intraday analytical tool. Session structure,
volatility, liquidity and timeframe differences can affect how auctions and
statistics appear. Always interpret outputs within broader market context.

------------------------
Risk Reminder
------------------------

This script is for educational and analytical purposes only. It does not provide
financial advice or guaranteed trading outcomes. Users remain responsible for
their own decisions.

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.