OPEN-SOURCE SCRIPT
Updated

Pullback Acceptance Planner [AGPro Series]

551
Pullback Acceptance Planner [AGPro Series]

🧠 Core Idea

Is the current trend pullback being accepted as continuation, or rejected as failure?


📌 Overview / What it does

Pullback Acceptance Planner [AGPro Series] is a public-free TradingView planner built to evaluate one specific decision point: the moment price pulls back into a trend-support area and the trader needs to know whether the retracement is being accepted or rejected.

The script maps a live pullback acceptance pocket, accepted/rejected state labels, an invalidation risk shelf, a target-room band, and a clean AGPro decision panel. It converts pullback depth, close acceptance, trend support, volume behavior, invalidation distance, and target room into a 0-100 Acceptance Score.

It does not predict price direction, automate entries, or label every small retracement. Its purpose is to make the pullback review process cleaner, more visual, and more decision-focused.


🎯 Purpose & Design Philosophy

This script was built because many pullback tools stop at showing where price touched a moving average, trend line, or generic zone. That is not enough for a trader who needs to decide whether the pullback is still constructive.

Pullback Acceptance Planner fills that gap by focusing on acceptance behavior after the pullback reaches the planning pocket. It helps traders review trend-side support, close quality, participation, risk distance, and remaining room in one structured view.

The mindset is practical: do not chase every pullback, and do not treat every retracement as a signal. Wait for the pullback to show whether it is being accepted or rejected.


⚡ Why This Script Is Different

Most pullback tools focus on moving-average touches, simple continuation markers, or generic trend-risk labels.

This script does NOT clone Low Volume Pullback Zones, Trend Pullback Risk Planner, Opening Drive Quality, SuperTrend pullback tools, or broad continuation dashboards.

Instead, it answers a narrower question: after price enters a general trend pullback pocket, is the close behavior strong enough to call the pullback accepted, or is the invalidation shelf being lost?

That acceptance-first framing is the core identity of the script.


⚙️ Methodology

1. Context Detection
The engine reads EMA stack alignment, base EMA slope, ATR structure, and the selected planning side to determine whether a bullish or bearish pullback context is active.

2. Reference Mapping
The script builds a pullback acceptance pocket around the base EMA, then maps an invalidation risk shelf behind the pocket and a target-room band toward the nearest prior obstruction.

3. Reaction Evaluation
The 0-100 Acceptance Score evaluates pullback depth, close acceptance beyond the pocket edge, trend support, volume behavior, invalidation distance, and target room.

4. Visual Output
The chart displays the acceptance pocket, risk shelf, target-room band, compact state labels, alerts, and a five-row AGPro planner panel.


🗺️ How to Read the Chart

Zones = the pullback acceptance pocket, invalidation risk shelf, and target-room band.

Labels = current state changes such as PB ACCEPTED, PB REJECTED, ACCEPT WATCH, ROOM REVIEW, or PB FORMING.

Colors = bullish acceptance uses teal, bearish acceptance uses pink, watch/room review uses yellow or indigo, and rejection uses red.

Panel = the decision summary: Pullback State, Acceptance Score, Risk Edge, Room, and Action.


🚦 Signals & States

• PB ACCEPTED → price closed beyond the active pullback pocket with enough score quality.

• ACCEPT WATCH → pullback context is improving but still needs cleaner confirmation.

• ROOM REVIEW → acceptance quality exists, but nearby obstruction leaves limited target room.

• PB FORMING → price is inside or near the pocket and the planner is still building context.

• PB REJECTED → price crossed the invalidation shelf and the active pullback context failed.

• TREND WAIT / NO PULLBACK → there is no active pullback acceptance context to review.


🔔 Alerts Logic

Alerts trigger when a bullish or bearish pullback reaches accepted state, when acceptance watch appears, when target room needs review, when the pullback is rejected, or when a major follow-through event appears after acceptance.

Alerts are attention markers. They are not trade instructions.


🧩 Confluence Logic

The context becomes stronger when trend side, clean pullback depth, constructive close acceptance, controlled or recovering volume, reasonable invalidation distance, and sufficient target room align at the same time.

The score is intentionally multi-factor so a single moving-average touch cannot create a high-quality state by itself.


📊 When to Use

• Trending markets with clean retracements

• Swing or intraday continuation review

• Markets where pullback behavior matters more than raw trend direction

• Crypto, forex, stocks, indices, and commodities with enough liquidity

• Situations where a trader wants an invalidation reference and target-room read before acting


⚠️ When NOT to Use

• Very low-liquidity symbols

• Extremely noisy sideways chop

• News-driven spikes where ATR and trend structure distort quickly

• Ultra-low timeframes with unstable spread or poor execution quality

• Markets where price repeatedly crosses the base EMA without directional structure


🎛️ Key Inputs

• Planning Side → chooses Auto, Bullish Pullback, or Bearish Pullback.

• Sensitivity → changes trend strictness and scoring behavior.

• EMA Lengths → define the trend stack and acceptance pocket anchor.

• ATR Length → normalizes pocket width, labels, risk shelf, and target room.

• Pullback Review Window → controls how long a pocket touch remains active.

• ACCEPTED Threshold → sets the minimum score for accepted-state labels.

• Label / Panel Settings → control visibility, location, theme, font size, label size, and label density.


🖥️ Interface & Visual Design

The interface is chart-first. The main chart objects are the acceptance pocket, risk shelf, and target-room band, each with centered text when displayed.

The panel uses the AGPro standard: one merged blue header row containing only the script name, followed by five decision rows. The layout is intentionally compact so the chart stays premium, readable, and useful on first glance.


🧪 Practical Usage Workflow

1. Read the panel to identify Pullback State and Acceptance Score.
2. Check whether price is inside, above, or below the acceptance pocket.
3. Review the invalidation risk shelf before interpreting an accepted state.
4. Check the target-room band to see whether the path is open or obstructed.
5. Treat labels and alerts as review markers, not automatic trade decisions.


🔍 Interpretation Guidelines

A higher score means the pullback has cleaner depth, stronger close behavior, better trend support, healthier volume behavior, more reasonable invalidation distance, and better room.

An accepted label means the pullback has met the script's rule-based acceptance conditions. It does not mean price must continue.

A rejected label means the pullback context failed according to the invalidation shelf. It does not mean the market must reverse.


🚫 What This Script Is NOT

• Not a prediction engine

• Not financial advice

• Not auto trading

• Not guaranteed signals

• Not a generic support/resistance zone tool

• Not an order block, FVG, or broad SMC map


⚠️ Limitations & Transparency

• Timeframe differences can change how clean the pocket and score appear.

• Volatility expansion can widen risk and distort close acceptance.

• Low-liquidity markets can make volume behavior less reliable.

• Strong news candles can cross both pocket and target references too quickly.

• The script uses rule-based approximations, not future knowledge.


🧠 Market Context Notes

Pullback acceptance often depends on whether price can return toward trend support without losing structure. A constructive pullback usually keeps risk contained, avoids aggressive countertrend volume, and then shows acceptance through the pocket edge.

This script turns that process into a visual planner so the user can review risk, room, and state in one place.


🧾 Use Case Examples

When a bullish trend pulls back into the acceptance pocket, the script may print ACCEPT WATCH first. If price later closes above the pocket edge with enough score quality, the state can shift to PB ACCEPTED.

When a bearish trend rallies into the pocket but then closes back below the acceptance edge, the script can mark bearish acceptance. If price crosses the invalidation shelf instead, the state shifts toward rejection.


🧱 System Philosophy

Pullback Acceptance Planner follows the AGPro planner-style direction: the chart should not only show another signal. It should help the trader evaluate setup validity, strength, risk, target room, and next action.


🔐 Non-Promise Statement

No script can provide certainty.

No score can guarantee outcome.

This tool is designed for structured review and educational analysis.


📉 Risk Disclosure

Trading involves risk. Market conditions can change quickly, and historical or rule-based signals do not guarantee future results.

Users are responsible for their own analysis, risk management, and decisions.

This script does not provide financial advice.


📚 Educational Note

Use the script to study how pullbacks behave around trend support, invalidation shelves, and target-room constraints. The best value comes from comparing the planner state with broader market context.
Release Notes
UPDATE NOTES - V1.4

This update focuses on best-view guidance and clearer timeframe expectations.

The core purpose of the script remains unchanged.
This release adds explicit 15-minute and 30-minute best-view guidance to the panel because the pullback acceptance zone model is visually strongest on these intraday pullback-review timeframes.

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
------------------------

* Added Best View panel row
The panel now shows whether the current chart is within the preferred 15-minute / 30-minute viewing range.

* Clarified zone visibility expectations
The script now communicates the timeframe range where the active pocket, risk shelf, and target-room corridor are most likely to appear cleanly.

* Preserved V1.3 close-zone text control
The automatic text merge between the acceptance pocket and risk shelf remains active to prevent zone-label overlap.

* Kept the premium pullback layout
The acceptance pocket, risk shelf, target-room corridor, event labels, and panel structure remain unchanged except for the new best-view guidance.


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

* Improved panel guidance for the timeframes where zones read best

* Reduced confusion on higher timeframes where the model may not draw active zones as often

* Preserved the clean zone-first hierarchy from V1.3

* Maintained balanced label density for publication screenshots


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

* Panel now includes a Best View row

* 15-minute and 30-minute charts display 15m / 30m Active

* Other chart views display Use 15m / 30m

* Existing panel theme, location, and font-size controls remain unchanged


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

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

The goal is to improve interpretation and timeframe guidance, not to introduce predictive behavior.

Users should interpret outputs the same way as before, but with clearer guidance about where the active zone model is designed to read best.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, trend maturity, and timeframe differences may affect how pullback acceptance states appear.

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.
Release Notes
UPDATE NOTES - V2.2

This update focuses on light-chart readability and contrast-safe zone labeling.

The core purpose of the script remains unchanged.
This release improves how acceptance pocket, risk shelf, and target-room text remains readable across dark and white chart themes.

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
------------------------

* Updated the public package to V2.2.
The header, code file, update notes, tags, and QA file now use the refreshed version.

* Moved zone text out of transparent box text.
Acceptance pocket, risk shelf, and target-room text are no longer drawn as white text over very transparent zones.

* Added solid color badge labels for zone text.
White text now sits inside opaque AGPro-colored labels, so it remains readable on both dark and white charts.

* Preserved compact one-line text.
Zone badges still use publication-friendly text such as PULLBACK PLAN | PB FORMING | Q 48 and TARGET ROOM | 0.47 ATR.

* Preserved the decision-support model.
EMA trend stack, acceptance pocket, risk shelf, target-room corridor, 0-100 Acceptance Score, best-view panel guidance, and alerts remain intact.


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

* Improved light-chart compatibility by avoiding naked white zone text.

* Improved contrast by placing zone text inside solid colored badges.

* Preserved transparent zones for context while keeping text readable.

* Reduced the risk of text disappearing on white chart themes.


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

* Preserved panel show/hide, panel location, panel theme, and panel font-size controls.

* Preserved label font-size controls for event labels and zone badges.

* Preserved context label controls, cooldown controls, max visible labels, and label history controls.

* Kept sparse context labels disabled by default for a calmer publication preset.


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

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

EMA trend stack, pocket touch detection, acceptance scoring, risk shelf placement, target-room mapping, panel state, best-view guidance, and alerts remain conceptually unchanged.

The goal is to improve contrast safety and publication readiness, not to introduce new predictive behavior.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, timeframe differences, and trend quality may affect how pullback states appear.

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.
Release Notes
🔧 UPDATE NOTES - V2.3

This update focuses on publication readability, label selectivity, visual polish, and box-text-free chart rendering.

The core purpose of the script remains unchanged.
This release improves how the existing pullback acceptance 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
------------------------

• Removed embedded box text handling
Pocket, risk, and target visuals now rely on separate centered badges instead of box text calls.

• Reduced default label density
Max Visible Labels now defaults to 5, and Event Label Cooldown now defaults to 32 bars for a cleaner publication preset.

• Shortened chart badge language
Long labels such as ACCEPTANCE / TARGET ROOM / RISK SHELF were refined into shorter premium badge text.

• Improved label casing and readability
Event labels now use cleaner readable wording such as Accepted, Watch, Room, Risk, and Invalid.

• Hardened panel refresh behavior
Panel font-size changes now trigger a panel rebuild while preserving the single merged blue header row.


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

• Cleaner first-glance chart with fewer repeated historical labels

• More compact zone badges inside the active pullback structure

• Reduced text width around the active pocket, risk shelf, and target-room corridor

• Preserved the active planning zone, risk shelf, target room, event labels, and AG Pro panel


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

• Max Visible Labels remains adjustable by the user

• Event Label Cooldown remains adjustable by the user

• Panel show/hide, panel location, panel theme, panel font size, and label font size controls remain available

• The 15m / 30m best-view panel guidance remains available


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

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

Trend detection, pullback pocket logic, acceptance score, risk shelf, target-room calculation, event states, alerts, and panel values remain unchanged.

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.

Market conditions such as volatility, liquidity, timeframe differences, and data quality may affect how signals appear.

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.
Release Notes
🔧 UPDATE NOTES - v2.4

This update focuses on decision confidence and proof.

The core purpose of the script remains unchanged.
This release adds a confirmation-anchored proof layer that measures how often accepted
pullbacks continued toward room before the invalidation shelf was breached.

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
------------------------

• Added a Proof Layer (Follow / Hold / React / Flip)
The panel now reports how reliably accepted pullbacks followed through on the current symbol
and timeframe. Each time a pullback is accepted, it is tracked forward over a configurable
horizon with the entry, the invalidation shelf as the risk reference, and a one risk unit
(1R) target toward room frozen at acceptance:
- Follow Rate : share of accepted pullbacks that continued one risk unit toward room (or
reached a nearer target) before the invalidation shelf was breached
- Hold Rate : share whose invalidation shelf was not breached through resolution
- React Rate : share that produced an early favorable continuation reaction
- Flip Rate : share whose invalidation shelf was breached within the horizon (the
acceptance was invalidated)
A sample size (n) is shown so the rates are read in context, and they display as "building"
only until the first accepted pullback resolves.

• Added hidden data outputs
The Follow / Hold / React / Flip rates are now added to the Data Window alongside the
existing acceptance, depth, close, risk, and room outputs, so they can be referenced by
alerts, screeners, or other tools without changing the chart visuals.


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

• Grouped the proof metrics into a clean block under a dedicated "Proof @ Confirm" heading,
below the existing pullback-state, score, risk-edge, room, action, and best-view rows.

• Preserved the existing acceptance pocket with its centered status text, invalidation risk
shelf and rail, target-room corridor, and the lower-density publication label preset.

• Kept the merged blue header row and alternating-row panel styling across the dark and
light themes.


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

• Optimized panel layout for clearer information flow with the new proof block.

• Improved at-a-glance interpretation by reporting how often accepted pullbacks continued
toward room before the invalidation shelf.

• Adjusted default visual settings for a more balanced appearance.

• Added a Proof input group (show/hide, proof horizon bars, reaction window bars, reaction
progress threshold) so the proof layer is fully configurable without affecting the core
acceptance logic.


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

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

The proof rates are descriptive statistics of accepted pullbacks on the current symbol and
timeframe. They measure how often an accepted pullback continued one risk unit toward room
before the invalidation shelf, not trade performance, and they do not change how the
acceptance score, pullback state, or zones are produced.

Users should interpret outputs the same way as before, now with added reliability context.


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

The script remains a rule-based analytical tool.

Proof rates depend on the amount of available history and on how many pullbacks have been
accepted on the current symbol and timeframe; a small sample (low n) should be treated with
caution. Each accepted pullback is counted once, with the entry, invalidation reference, and
1R target frozen at acceptance. Market conditions such as volatility, liquidity, and
timeframe differences may affect how events and rates appear.

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.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.