OPEN-SOURCE SCRIPT
Aktualisiert

Trend Pullback Risk Planner [AGPro Series]

741
Trend Pullback Risk Planner [AGPro Series]

🧠 Core Idea

Is the current pullback normal trend digestion, or is it becoming a risk shift that deserves review?


📌 Overview / What it does

Trend Pullback Risk Planner [AGPro Series] is a chart-first trend risk planner built to evaluate active pullbacks inside an established trend.

The script maps a Pullback Risk Pocket, trend defense line, invalidation reference, target-room guide, compact state labels, alert conditions, and a clean AGPro panel. It converts trend slope, pullback depth, volume dry-up, defense response, and target obstruction into a 0-100 Continuation Score.

It does not predict price movement, automate execution, or print buy/sell commands. Its purpose is to help traders judge whether a pullback is still controlled enough to review, or whether the trend context is starting to lose quality.


🎯 Purpose & Design Philosophy

This script was built for traders who already see a trend but need a cleaner way to evaluate pullback risk.

Many pullback tools focus on marking every retracement as a possible continuation setup. This planner focuses on the decision question behind the setup: is the pullback still being defended, is it getting too deep, does target room remain clean, and what should be reviewed next?

The design supports a risk-first mindset. It helps users read pullback behavior without turning the chart into a crowded signal board or a generic support/resistance map.


⚡ Why This Script Is Different

Most tools focus on identifying pullbacks or continuation signals.

This script does NOT try to clone a low-volume pullback zone, a generic trend continuation score, a Supertrend pullback model, or a broad support/resistance system.

Instead, it treats the pullback as a live risk review. The unique output is the Pullback Risk Pocket: a controlled planning area where depth, defense, volume behavior, target room, and invalidation context are evaluated together before the panel prints the next action state.


⚙️ Methodology

1. Context Detection
The planner identifies trend side using EMA stack structure and normalized trend slope. Users can keep the side automatic or restrict the tool to bullish-only or bearish-only review.

2. Reference Mapping
The script builds a Pullback Risk Pocket between the base trend reference and the defense line. It also maps an invalidation reference and a target-room guide.

3. Reaction Evaluation
The model evaluates pullback depth versus ATR, trend slope, volume dry-up, wick/close response inside the pocket, and distance to the nearest target-side obstruction.

4. Visual Output
The result is shown through a centered risk pocket label, defense/risk/target guide lines, compact event labels, alerts, and an AGPro decision panel.


🗺️ How to Read the Chart

Zones = the Pullback Risk Pocket where an active pullback is reviewed for normal digestion versus risk shift.

Labels = continuation-ready, risk-watch, weak-pullback, risk-shift, follow-through, and sparse pocket-context markers.

Colors = bullish trend context uses AGPro teal, bearish trend context uses AGPro pink, warning states use yellow, and invalidation/risk-shift states use red.

Panel = the panel summarizes Trend Side, Pullback Depth, Risk Pocket status, Continuation Score, target-room context, and Action.


🚦 Signals & States

• TREND ACTIVE → trend context exists, but price has not reached the pullback risk pocket.

• POCKET NEAR → price is approaching the pullback risk pocket and deserves attention.

• HEALTHY PULLBACK → pullback is being reviewed with constructive but not yet high-grade conditions.

• RISK WATCH → pullback depth or response quality is becoming less clean.

• CONTINUATION READY → pullback risk pocket is defending with sufficient score and target-room context for review.

• FOLLOW-THROUGH → price is responding after a defended pullback pocket.

• WEAK PULLBACK → pullback touched the pocket, but score quality is weak.

• RISK SHIFT → price crossed the invalidation reference and the context should be rebuilt.

• NO TREND → trend structure is not aligned enough for the planner.


🔔 Alerts Logic

Alerts trigger when the planner detects a Continuation Ready state, a Risk Watch state, a Risk Shift event, or Follow-Through after a defended pocket.

These alerts are attention markers. They are not trade instructions, not execution commands, and not guaranteed outcomes.


🧩 Confluence Logic

The strongest context appears when trend slope, controlled pullback depth, quiet retracement volume, a constructive defense response, and clean target room align at the same time.

When one or more of these elements weakens, the planner shifts toward POCKET NEAR, RISK WATCH, WEAK PULLBACK, or RISK SHIFT instead of forcing a continuation interpretation.


📊 When to Use

• Trending markets with visible pullback structure

• Continuation review after a clean directional leg

• Situations where pullback depth and defense quality matter

• Trade-planning workflows that need risk, invalidation, and target-room context


⚠️ When NOT to Use

• Flat, low-directional range conditions

• Low-liquidity charts with unreliable wick and volume behavior

• Extreme news volatility where pullbacks can invalidate quickly

• Situations where the user expects an automatic buy/sell system


🎛️ Key Inputs

• Planner Side → controls Auto, Bullish Only, or Bearish Only evaluation.

• Sensitivity → changes how strict the risk pocket and scoring model behave.

• EMA Lengths → define fast trend pressure, base pullback reference, and defense line.

• Pullback Depth Lookback → controls how the script measures retracement depth from the latest trend-side extreme.

• Risk Pocket Width ATR → controls the thickness of the pullback review area.

• Invalidation Buffer ATR → controls the distance of the invalidation reference beyond the defense line.

• Clean Target Room ATR → defines preferred room before target-side obstruction.

• Visual settings → control pocket visibility, guide lines, labels, panel location, theme, and font sizes.


🖥️ Interface & Visual Design

The interface is built around one main object: the Pullback Risk Pocket.

The centered pocket label keeps the active state visible without forcing users to read many separate markers. The guide lines show defense, invalidation, and target-room context. The AGPro panel keeps the decision state compact and readable.

Labels use controlled spacing, cooldown, and maximum-count settings so the chart remains active without becoming crowded.


🧪 Practical Usage Workflow

1. Read the panel Action state.

2. Check Trend Side and Pullback Depth.

3. Review whether price is near, inside, defending, or breaching the Pullback Risk Pocket.

4. Compare the Continuation Score with target-room context.

5. Treat alerts as attention markers and confirm broader market context independently.


🔍 Interpretation Guidelines

A higher Continuation Score means the active pullback is showing stronger alignment between trend slope, controlled depth, volume dry-up, defense response, and remaining target room.

CONTINUATION READY does not mean a trade should be opened. It means the pullback remains structurally constructive under the script's rule set.

RISK WATCH and RISK SHIFT are caution states. They help users slow down when pullback depth, defense response, or invalidation context becomes weaker.


🚫 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 signals.

It is not a generic support/resistance zone map.

It is not a clone of Low Volume Pullback Zones, Trend Continuation Quality, or Supertrend Pullback Quality.


⚠️ Limitations & Transparency

Timeframe differences can change trend slope, pullback depth, and target-room readings.

Volume behavior can vary across markets and data feeds.

Fast volatility expansion can move price through the pocket before a clean review state appears.

The script is rule-based and should be interpreted as an analytical planning layer, not as certainty.


🧠 Market Context Notes

Pullbacks are not automatically healthy because they occur inside a trend. A clean trend pullback usually needs controlled depth, reduced against-trend pressure, visible defense response, and enough room before the next obstruction.

This planner is designed to keep that review process structured.


🧾 Use Case Examples

When price pulls into the risk pocket with controlled depth, softer relative volume, and a strong close back toward the trend side, the planner may classify the state as CONTINUATION READY.

When price enters the pocket but response quality is weak or depth becomes excessive, the planner may show RISK WATCH.

When price crosses the invalidation reference beyond the defense line, the planner may show RISK SHIFT.


🧱 System Philosophy

Trend Pullback Risk Planner follows the AGPro Series decision-engine approach:

Trend first.

Pullback risk second.

Defense and target room before action.

Attention markers instead of promises.


🔐 Non-Promise Statement

No script can guarantee that a pullback will continue.

No state should be interpreted as certainty.

All outputs should be reviewed within broader market context.


📉 Risk Disclosure

Trading involves risk.

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

This script is for educational and analytical purposes only and does not provide financial advice.


📚 Educational Note

The script is designed to help users think in structured pullback-risk terms: trend, depth, defense, target room, invalidation, and review.
Versionshinweise
🔧 UPDATE NOTES - V1.4

This update focuses only on zone-label contrast and light-chart readability.

The core purpose of the script remains unchanged.
This release keeps the pullback risk pocket logic intact while improving how the zone label is displayed on both dark and white chart backgrounds.

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

• Reworked the pullback risk pocket label.
The zone text is no longer rendered as plain text inside the transparent pocket box.

• Added a contrast-safe centered zone badge.
The active risk pocket now uses a colored center badge with high-contrast text, making it readable on both dark and white chart backgrounds.

• Preserved the underlying zone box.
The pullback risk pocket box, border, transparency, projection, and guide structure remain unchanged.

• Kept all non-zone labels unchanged.
READY, WATCH, WEAK, SHIFT, FOLLOW, and POCKET event label behavior remains the same as V1.3.


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

• Improved white-background chart readability for the zone label.

• Reduced the risk of low-contrast text blending into light chart themes.

• Preserved the premium zone structure while giving the key pocket label a stronger visual anchor.


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

• No new user settings were required.

• Existing label font size controls continue to affect the zone badge.

• The chart remains visually consistent with the AGPro colored-label standard.


------------------------
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 zone-label contrast.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences 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.
Versionshinweise
🔧 UPDATE NOTES - VERSION 1.5

This update focuses on chart readability, risk dashboard hierarchy, label clarity, and panel usability.

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

• Reworked the planning panel
The panel now follows a clearer dashboard hierarchy: Workflow, Trend Context, Pullback Risk, Invalidation, Target Room, Review Score, and Review.

• Simplified workflow state language
States now use action-oriented but non-promising wording such as Review Continuation, Watch Risk, Prepare Review, Monitor Defense, and Rebuild Plan.

• Improved pullback risk pocket readability
The risk pocket no longer uses long native box text. The zone remains visual, while a compact solid badge carries the current review state and score.

• Improved invalidation and target-room context
Risk distance, invalidation price, and target-room room are now easier to read directly from the panel.

• Refined chart labels
Chart labels now use compact REVIEW, WATCH, FOLLOW, SHIFT, WEAK, and POCKET badges with score support enabled by default.


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

• Reduced long zone text inside the pullback pocket.

• Preserved the active pullback risk zone while making the badge shorter and more readable.

• Improved label spacing with slightly larger default ATR offset and badge-lane spacing.

• Kept the chart informative without turning the overlay into a dense signal map.


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

• Panel header remains a single merged blue row with only the script name.

• Panel show / hide, location, theme, and font-size controls remain available.

• Panel location now rebuilds cleanly when changed from settings.

• Risk, invalidation, distance, target-room, and review information is grouped in dashboard order.


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

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

The EMA stack, pullback depth, defense response, volume dry-up, target-room, invalidation, and continuation review score remain based on the same model.

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


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, trend structure, and timeframe selection may affect how zones and labels 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, trade instructions, or guaranteed trading outcomes.

Users remain responsible for their own decisions.
Versionshinweise
🔧 UPDATE NOTES - V1.9

This update focuses on secondary label discipline and candle attachment.

The core purpose of the script remains unchanged.
This release keeps the publication view cleaner by making lower-priority Watch and Weak labels optional by default.

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 Show Watch Labels.
Watch labels remain available, but they are disabled by default for a cleaner publication preset.

• Added Show Weak Labels.
Weak labels remain available, but they are disabled by default because low-priority labels can look detached on volatile symbols.

• Improved Watch / Weak placement when enabled.
These secondary labels now anchor around the candle close instead of far wick extremes, reducing excessive vertical separation.

• Preserved core review behavior.
Review labels, active pocket context, guide tags, panel states, and alerts remain intact.


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

• Removed default floating Watch / Weak label clutter

• Improved candle-to-label proximity for optional secondary labels

• Kept the default chart focused on high-value Review context and owned guide levels

• Preserved Defense, Risk, and Target guide tags attached to their level lines


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

• Users can manually enable Watch Labels when they want additional risk-review history

• Users can manually enable Weak Labels when they want low-score pullback markers

• Label Offset ATR and Max Visible Labels remain adjustable

• The default publication preset is cleaner and more selective


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

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

Watch and Weak conditions are still calculated and reflected in the panel and alerts where relevant.

The goal is to improve visual discipline, not to introduce new predictive behavior.


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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences 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.
Versionshinweise
🔧 UPDATE NOTES - v2.0

This update adds a continuation-rate proof and improves contrast on the lighter risk badges.

The core purpose of the script remains unchanged.
It continues to map the pullback risk pocket, defense, invalidation and target-room guides with
the same continuation review score and next-action workflow.

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

- Continuation Rate proof layer
The panel now reports how often defended pullbacks historically followed through in the trend
direction before reaching invalidation or moving against it, shown with the sample count.

- Continuation Proof Window input
A new setting controls the window used to measure follow-through.

- Honest, conservative counting
Each defended pullback is counted once, and a crossed invalidation reference is treated as a
non-follow-through, so the rate stays realistic on the selected market and timeframe.

- Clearer risk badges
The centered pocket badge now uses dark text on its lighter amber background so the state and
score read more crisply, while bull, bear and danger badges keep their established look.

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

- Improved readability of the lighter pocket and context badges

- Preserved the risk pocket, defense, invalidation and target guide lines with owned tags

- Maintained candle-aware label spacing and smart badge lanes

- Left the publication-ready chart layout intact

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

- Added a Continuation Rate row for an at-a-glance follow-through track record

- Added a window setting so the proof measures prompt follow-through

- Kept the existing workflow, trend, risk, target and score hierarchy

- Enhanced overall user experience without changing the core planning logic

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

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

The pocket, guides, continuation score and states are unchanged. The Continuation Rate is a
separate historical track-record layer and does not alter how the score is computed.

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

The script remains a rule-based analytical tool.

Market conditions such as volatility, liquidity, and timeframe differences may affect how
pullbacks, the pocket and the rate 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.

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.