OPEN-SOURCE SCRIPT
Zaktualizowano Gap Fill Reaction Planner [AGPro Series]

Gap Fill Reaction Planner [AGPro Series]
🧠 Core Idea
Is this gap reaction actually ready for planning, or is it just another rectangle on the chart?
📌 Overview / What it does
Gap Fill Reaction Planner [AGPro Series] is a planner-style price action tool built around gap fill behavior, reaction quality, and execution readiness. Instead of simply drawing gap zones, it evaluates whether the active gap reaction has enough structure to become a measurable plan.
The script detects gap support and gap resistance zones, tracks fill progress, classifies reaction state, and converts the active setup into a 0-100 readiness score. It also maps a live entry reference, invalidation level, target projection, and estimated R multiple so the user can review the structure as a plan rather than as an isolated signal.
It does not automate trades, predict future price, or replace independent analysis. Its purpose is to organize gap reaction context into a cleaner decision framework.
🎯 Purpose & Design Philosophy
This script was built to move beyond passive gap marking. A normal gap indicator can show where a gap exists, but it does not answer the questions that matter before a trade idea is considered:
Is the reaction valid?
How strong is the setup?
Where is the invalidation?
Where is the target?
What should the trader watch next?
Gap Fill Reaction Planner was designed for traders who want a structured workflow around opening gaps, continuous-market reaction bands, partial fills, full fills, rejection behavior, and acceptance risk. The mindset is not "take every gap." The mindset is "measure the reaction first."
⚡ Why This Script Is Different
Most gap tools focus on detection. They draw every gap, imbalance, or separation zone and leave the decision process to the user.
This script does NOT act as a generic gap highlighter, generic support/resistance map, or broad imbalance catalog.
Instead, it treats each gap as a planning object. Every active zone is evaluated through fill depth, reaction state, volatility context, participation, age, and structural validity. The panel then translates that context into readiness, next action, invalidation, target, and risk/reward information.
That planner layer is the difference. The script helps the user decide whether a gap reaction deserves attention, not merely whether a gap exists.
⚙️ Methodology
1. Context Detection
The script first searches for gap reaction zones. It prioritizes classic open-to-previous-close gaps, then supports adaptive reaction bands for continuous markets where clean opening gaps may be rare.
2. Reference Mapping
Each detected zone receives a fixed-length rectangular band. The zone is not dragged forward forever; it remains anchored to its origin so old structures do not distort the current chart. Thin zones are displayed with a minimum visual height so the chart keeps a cleaner, more professional planning layer.
3. Reaction Evaluation
The engine tracks fill percentage, partial fill, full fill, rejection, and acceptance. Rejection behavior is treated differently from simple fill behavior because a filled gap and a rejected gap communicate different planning context.
4. Planner Scoring
The readiness score combines gap size, fill quality, reaction behavior, volatility participation, and recency. The score is normalized from 0 to 100.
5. Risk / Target Projection
For the active planner zone, the script calculates an invalidation reference beyond the far side of the gap and projects a target using the selected R multiple.
6. Visual Output
The chart shows gap zones, centered zone labels, optional fill progress, planner labels, and active plan levels. The panel summarizes the decision state.
🗺️ How to Read the Chart
Zones
Gap Support zones represent upward gap reactions that may act as support-style planning areas.
Gap Resistance zones represent downward gap reactions that may act as resistance-style planning areas.
Zone Labels
Focused zones can display a centered label showing the zone role, state, and readiness score. This keeps the chart readable without turning every historical zone into a text cluster.
Colors
Bullish planner context uses the AGPro green state color.
Bearish planner context uses the AGPro pink state color.
Neutral or unfinished context uses restrained secondary colors.
Panel
The panel shows readiness, next action, plan side, gap size, fill/state, invalidation, target/R, and bias.
Plan Levels
When an active planner zone exists, the script can display entry reference, invalidation, and target lines.
🚦 Signals & States
• Fresh → A new gap zone exists but has not reached meaningful fill depth.
• Partial Fill → Price has returned into the gap enough to begin reaction monitoring.
• Rejected → Price filled part of the gap and then closed back away from the zone.
• Full Fill → The gap has reached the full-fill threshold and becomes more neutral.
• Accepted → Price closed beyond the far boundary of the gap, meaning the zone has lost its original reaction role.
• Planner Ready → A rejection setup reached the configured readiness threshold.
🔔 Alerts Logic
New Gap Support Zone
Triggers when a bullish gap support planning zone is created.
New Gap Resistance Zone
Triggers when a bearish gap resistance planning zone is created.
Gap Partial Fill
Triggers when a tracked zone reaches the partial-fill threshold.
Gap Full Fill
Triggers when a tracked zone reaches the full-fill threshold.
Gap Planner Ready
Triggers when a rejection setup reaches the readiness score threshold.
Gap Acceptance
Triggers when price accepts beyond the far side of the gap.
Alerts are attention markers and workflow prompts. They are not trade instructions.
🧩 Confluence Logic
The planner score becomes stronger when multiple conditions align:
• The gap has enough ATR-normalized size
• Fill depth is meaningful but not exhausted
• Reaction behavior confirms away from the zone
• Current volatility and participation support the reaction
• The zone is recent enough to remain relevant
When these pieces align, the gap becomes a stronger planning candidate.
📊 When to Use
• After large opening gaps
• During pullbacks into gap support or gap resistance
• Around partial fill and rejection behavior
• In trending markets where gaps create reaction shelves
• In volatile markets where gap fill behavior matters
• On crypto and FX charts where adaptive reaction bands may help continuous-market analysis
⚠️ When NOT to Use
• Extremely low-liquidity symbols
• Very noisy micro timeframes
• Market conditions where spread, slippage, or data quality is poor
• When the chart is moving too fast for structured planning
• When a trader has not defined broader market context
🎛️ Key Inputs
Detection Mode
Controls whether the script uses only classic open gaps or adaptive reaction bands.
Minimum Gap Size
Filters out small gaps using ATR normalization.
Readiness Threshold
Defines the minimum score required for a planner-ready label.
Target Multiple (R)
Projects the target from the current reference price using the invalidation distance.
Invalidation Buffer
Adds ATR-based spacing beyond the far side of the gap zone.
Zone Right Extension
Controls how far each zone projects from its origin.
Panel / Label Settings
Control panel visibility, panel theme, panel location, and font sizes.
🖥️ Interface & Visual Design
The interface is built for quick decision review. The panel provides the planner summary, while the chart emphasizes the most important structural elements: premium-height zones, focused centered labels, action labels, and active plan levels.
The visual hierarchy is intentionally clean. Zones explain context, labels explain state, and the panel explains what to do next from an analytical standpoint.
🧪 Practical Usage Workflow
1. Read the panel readiness score.
2. Check whether the next action is monitor, wait, plan, or stand aside.
3. Review the active gap zone and its centered label.
4. Compare fill percentage with the reaction state.
5. Review invalidation and target levels.
6. Confirm the idea with broader market context before acting.
🔍 Interpretation Guidelines
A high score does not mean certainty. It means the gap reaction has stronger planning structure.
A partial fill means price has started interacting with the gap, but reaction quality still matters.
A rejection state is more meaningful when it occurs with strong score, clean invalidation, and acceptable target distance.
An accepted zone should usually be treated as a failed reaction context rather than an active planning area.
🚫 What This Script Is NOT
This script is not a prediction engine.
This script is not an automated trading system.
This script is not a financial advice tool.
This script does not provide guaranteed outcomes.
This script does not replace risk management, trade review, or independent confirmation.
⚠️ Limitations & Transparency
Gap behavior can change significantly across symbols and timeframes.
Continuous markets may produce fewer classic opening gaps, which is why the script includes adaptive detection modes.
Volatility expansion can make targets and invalidation levels wider.
Low-liquidity environments may reduce the reliability of reaction labels and score readings.
No rule-based tool can fully account for news events, sudden liquidity shifts, or execution quality.
🧠 Market Context Notes
Gap reactions are often more useful when they are read together with trend structure, volatility, session behavior, and liquidity context. A gap zone is not automatically important because it exists. It becomes more useful when price returns to it, reacts clearly, and produces a measurable planning structure.
🧾 Use Case Examples
When price returns into a Gap Support zone and rejects upward with a high readiness score, the panel can help review whether invalidation and target structure are measurable.
When price fills a Gap Resistance zone and accepts above it, the script marks the context as acceptance rather than treating the zone as a still-valid resistance area.
When the panel shows low readiness, the script is communicating that the structure may exist visually but is not yet a strong planner candidate.
🧱 System Philosophy
AGProLabs tools are built around structured interpretation. The goal is not to add more noise to the chart. The goal is to convert raw market behavior into a cleaner decision framework that traders can review with discipline.
🔐 Non-Promise Statement
No indicator can remove uncertainty.
No score can guarantee a result.
No planner can replace the trader's responsibility to manage risk.
📉 Risk Disclosure
Trading involves risk. This script is provided for educational and analytical use only. It does not provide financial advice, investment advice, or guaranteed trading outcomes. Users remain responsible for their own research, risk management, position sizing, and execution decisions.
📚 Educational Note
The best use of this script is not to chase every gap. The best use is to slow the decision process down, measure the reaction, and decide whether the setup is structured enough to deserve attention.
🧠 Core Idea
Is this gap reaction actually ready for planning, or is it just another rectangle on the chart?
📌 Overview / What it does
Gap Fill Reaction Planner [AGPro Series] is a planner-style price action tool built around gap fill behavior, reaction quality, and execution readiness. Instead of simply drawing gap zones, it evaluates whether the active gap reaction has enough structure to become a measurable plan.
The script detects gap support and gap resistance zones, tracks fill progress, classifies reaction state, and converts the active setup into a 0-100 readiness score. It also maps a live entry reference, invalidation level, target projection, and estimated R multiple so the user can review the structure as a plan rather than as an isolated signal.
It does not automate trades, predict future price, or replace independent analysis. Its purpose is to organize gap reaction context into a cleaner decision framework.
🎯 Purpose & Design Philosophy
This script was built to move beyond passive gap marking. A normal gap indicator can show where a gap exists, but it does not answer the questions that matter before a trade idea is considered:
Is the reaction valid?
How strong is the setup?
Where is the invalidation?
Where is the target?
What should the trader watch next?
Gap Fill Reaction Planner was designed for traders who want a structured workflow around opening gaps, continuous-market reaction bands, partial fills, full fills, rejection behavior, and acceptance risk. The mindset is not "take every gap." The mindset is "measure the reaction first."
⚡ Why This Script Is Different
Most gap tools focus on detection. They draw every gap, imbalance, or separation zone and leave the decision process to the user.
This script does NOT act as a generic gap highlighter, generic support/resistance map, or broad imbalance catalog.
Instead, it treats each gap as a planning object. Every active zone is evaluated through fill depth, reaction state, volatility context, participation, age, and structural validity. The panel then translates that context into readiness, next action, invalidation, target, and risk/reward information.
That planner layer is the difference. The script helps the user decide whether a gap reaction deserves attention, not merely whether a gap exists.
⚙️ Methodology
1. Context Detection
The script first searches for gap reaction zones. It prioritizes classic open-to-previous-close gaps, then supports adaptive reaction bands for continuous markets where clean opening gaps may be rare.
2. Reference Mapping
Each detected zone receives a fixed-length rectangular band. The zone is not dragged forward forever; it remains anchored to its origin so old structures do not distort the current chart. Thin zones are displayed with a minimum visual height so the chart keeps a cleaner, more professional planning layer.
3. Reaction Evaluation
The engine tracks fill percentage, partial fill, full fill, rejection, and acceptance. Rejection behavior is treated differently from simple fill behavior because a filled gap and a rejected gap communicate different planning context.
4. Planner Scoring
The readiness score combines gap size, fill quality, reaction behavior, volatility participation, and recency. The score is normalized from 0 to 100.
5. Risk / Target Projection
For the active planner zone, the script calculates an invalidation reference beyond the far side of the gap and projects a target using the selected R multiple.
6. Visual Output
The chart shows gap zones, centered zone labels, optional fill progress, planner labels, and active plan levels. The panel summarizes the decision state.
🗺️ How to Read the Chart
Zones
Gap Support zones represent upward gap reactions that may act as support-style planning areas.
Gap Resistance zones represent downward gap reactions that may act as resistance-style planning areas.
Zone Labels
Focused zones can display a centered label showing the zone role, state, and readiness score. This keeps the chart readable without turning every historical zone into a text cluster.
Colors
Bullish planner context uses the AGPro green state color.
Bearish planner context uses the AGPro pink state color.
Neutral or unfinished context uses restrained secondary colors.
Panel
The panel shows readiness, next action, plan side, gap size, fill/state, invalidation, target/R, and bias.
Plan Levels
When an active planner zone exists, the script can display entry reference, invalidation, and target lines.
🚦 Signals & States
• Fresh → A new gap zone exists but has not reached meaningful fill depth.
• Partial Fill → Price has returned into the gap enough to begin reaction monitoring.
• Rejected → Price filled part of the gap and then closed back away from the zone.
• Full Fill → The gap has reached the full-fill threshold and becomes more neutral.
• Accepted → Price closed beyond the far boundary of the gap, meaning the zone has lost its original reaction role.
• Planner Ready → A rejection setup reached the configured readiness threshold.
🔔 Alerts Logic
New Gap Support Zone
Triggers when a bullish gap support planning zone is created.
New Gap Resistance Zone
Triggers when a bearish gap resistance planning zone is created.
Gap Partial Fill
Triggers when a tracked zone reaches the partial-fill threshold.
Gap Full Fill
Triggers when a tracked zone reaches the full-fill threshold.
Gap Planner Ready
Triggers when a rejection setup reaches the readiness score threshold.
Gap Acceptance
Triggers when price accepts beyond the far side of the gap.
Alerts are attention markers and workflow prompts. They are not trade instructions.
🧩 Confluence Logic
The planner score becomes stronger when multiple conditions align:
• The gap has enough ATR-normalized size
• Fill depth is meaningful but not exhausted
• Reaction behavior confirms away from the zone
• Current volatility and participation support the reaction
• The zone is recent enough to remain relevant
When these pieces align, the gap becomes a stronger planning candidate.
📊 When to Use
• After large opening gaps
• During pullbacks into gap support or gap resistance
• Around partial fill and rejection behavior
• In trending markets where gaps create reaction shelves
• In volatile markets where gap fill behavior matters
• On crypto and FX charts where adaptive reaction bands may help continuous-market analysis
⚠️ When NOT to Use
• Extremely low-liquidity symbols
• Very noisy micro timeframes
• Market conditions where spread, slippage, or data quality is poor
• When the chart is moving too fast for structured planning
• When a trader has not defined broader market context
🎛️ Key Inputs
Detection Mode
Controls whether the script uses only classic open gaps or adaptive reaction bands.
Minimum Gap Size
Filters out small gaps using ATR normalization.
Readiness Threshold
Defines the minimum score required for a planner-ready label.
Target Multiple (R)
Projects the target from the current reference price using the invalidation distance.
Invalidation Buffer
Adds ATR-based spacing beyond the far side of the gap zone.
Zone Right Extension
Controls how far each zone projects from its origin.
Panel / Label Settings
Control panel visibility, panel theme, panel location, and font sizes.
🖥️ Interface & Visual Design
The interface is built for quick decision review. The panel provides the planner summary, while the chart emphasizes the most important structural elements: premium-height zones, focused centered labels, action labels, and active plan levels.
The visual hierarchy is intentionally clean. Zones explain context, labels explain state, and the panel explains what to do next from an analytical standpoint.
🧪 Practical Usage Workflow
1. Read the panel readiness score.
2. Check whether the next action is monitor, wait, plan, or stand aside.
3. Review the active gap zone and its centered label.
4. Compare fill percentage with the reaction state.
5. Review invalidation and target levels.
6. Confirm the idea with broader market context before acting.
🔍 Interpretation Guidelines
A high score does not mean certainty. It means the gap reaction has stronger planning structure.
A partial fill means price has started interacting with the gap, but reaction quality still matters.
A rejection state is more meaningful when it occurs with strong score, clean invalidation, and acceptable target distance.
An accepted zone should usually be treated as a failed reaction context rather than an active planning area.
🚫 What This Script Is NOT
This script is not a prediction engine.
This script is not an automated trading system.
This script is not a financial advice tool.
This script does not provide guaranteed outcomes.
This script does not replace risk management, trade review, or independent confirmation.
⚠️ Limitations & Transparency
Gap behavior can change significantly across symbols and timeframes.
Continuous markets may produce fewer classic opening gaps, which is why the script includes adaptive detection modes.
Volatility expansion can make targets and invalidation levels wider.
Low-liquidity environments may reduce the reliability of reaction labels and score readings.
No rule-based tool can fully account for news events, sudden liquidity shifts, or execution quality.
🧠 Market Context Notes
Gap reactions are often more useful when they are read together with trend structure, volatility, session behavior, and liquidity context. A gap zone is not automatically important because it exists. It becomes more useful when price returns to it, reacts clearly, and produces a measurable planning structure.
🧾 Use Case Examples
When price returns into a Gap Support zone and rejects upward with a high readiness score, the panel can help review whether invalidation and target structure are measurable.
When price fills a Gap Resistance zone and accepts above it, the script marks the context as acceptance rather than treating the zone as a still-valid resistance area.
When the panel shows low readiness, the script is communicating that the structure may exist visually but is not yet a strong planner candidate.
🧱 System Philosophy
AGProLabs tools are built around structured interpretation. The goal is not to add more noise to the chart. The goal is to convert raw market behavior into a cleaner decision framework that traders can review with discipline.
🔐 Non-Promise Statement
No indicator can remove uncertainty.
No score can guarantee a result.
No planner can replace the trader's responsibility to manage risk.
📉 Risk Disclosure
Trading involves risk. This script is provided for educational and analytical use only. It does not provide financial advice, investment advice, or guaranteed trading outcomes. Users remain responsible for their own research, risk management, position sizing, and execution decisions.
📚 Educational Note
The best use of this script is not to chase every gap. The best use is to slow the decision process down, measure the reaction, and decide whether the setup is structured enough to deserve attention.
Informacje o Wersji
UPDATE NOTES - V1.1This update focuses on visual hierarchy, planner clarity, label control, panel conformity, and publication-ready chart presentation.
The core purpose of the script remains unchanged.
This release improves how the existing gap fill reaction 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
------------------------
* Added Engine Presets
Daily Gap Plan, Intraday Active, and Custom profiles were added so the planner can be cleaner for publication charts or more active for intraday monitoring.
* Refined gap zone presentation
Gap support and resistance zones now use a more readable display height, clearer border logic, and improved fill-progress visualization.
* Improved centered zone labels
Zone labels now act as the main visual anchor, showing gap role, state, readiness score, and fill percentage inside the zone.
* Reduced label stacking risk
Planner action labels now use stronger cooldown behavior, plan level tags are optional, and the default chart avoids unnecessary label clutter.
* Improved active plan levels
Entry reference, invalidation, and target lines remain available, while right-side line tags are disabled by default for a cleaner chart.
* Updated AG Pro panel structure
The panel now follows the standard merged blue header format, includes configurable location, theme, and font size, and adds a Best View row.
* Updated script naming format
The public script title keeps the clean script name with [AGPro Series], while the panel title preserves the AG Pro brand presentation.
------------------------
Visual Improvements
------------------------
* Improved chart readability by refining gap zones, fill progress, centered labels, and active plan lines.
* Reduced visual clutter by making centered zone labels the primary information layer.
* Refined visual hierarchy so active planner zones stand out while resolved zones can remain hidden by default.
* Adjusted label positioning and defaults to avoid overlap with candles and right-side plan lines.
* Preserved enough visual structure for stronger first-glance interpretation without turning the chart into a crowded dashboard.
------------------------
Interface & Usability
------------------------
* Optimized panel layout for clearer information flow.
* Added configurable panel position, theme, and font size.
* Added configurable chart label font size with Normal as the default.
* Added Best View guidance for daily and intraday gap workflows.
* Added separate alert controls for new gaps, planner-ready reactions, and gap resolution states.
------------------------
Behavior Notes
------------------------
This update does not change the core analytical purpose of the script.
The model still focuses on gap detection, fill progress, rejection behavior, acceptance, readiness scoring, invalidation, and target projection.
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 and more disciplined label behavior.
------------------------
Limitations Reminder
------------------------
The script remains a rule-based analytical tool.
Market conditions such as volatility, liquidity, timeframe differences, and session gaps may affect how zones and planner states appear.
Gap behavior can vary significantly between equities, crypto, futures, and low-liquidity symbols.
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.
Informacje o Wersji
UPDATE NOTES - V1.3This update focuses on visible-zone clarity and publication readability.
The core purpose of the script remains unchanged.
This release improves how gap zones explain themselves on the chart, especially when multiple active zones are visible.
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
------------------------
• Every visible zone now keeps a centered badge
When centered zone labels are enabled, displayed gap zones are no longer allowed to remain unlabeled.
• Zone Label Mode now controls detail, not label existence
Focused, Latest Active, and Rejections Only modes can reduce text detail on secondary zones, but they no longer remove the badge from a visible zone.
• Visible Zones is now the publication default
The default setting is now aligned with premium chart presentation and avoids unexplained rectangles.
• Version raised to V1.3
This is a visual clarity update that preserves the V1.2 scoring and planner improvements.
------------------------
Visual Improvements
------------------------
• Prevented unlabeled visible zones
• Improved zone self-explanation and chart trust
• Preserved centered horizontal and vertical zone badges
• Reduced ambiguity when multiple gap areas are shown
------------------------
Interface & Usability
------------------------
• Show Centered Zone Labels remains the main control for zone badges
• Zone Label Mode remains available, but visible zones remain explained
• Panel, theme, location, and font-size controls remain unchanged
------------------------
Behavior Notes
------------------------
This update does not change the core gap detection, fill tracking, reaction scoring, or planner logic.
The goal is to make visible zones easier to understand without changing how the script evaluates gap reactions.
------------------------
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.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Public-free and invite-only TradingView Pine Script tools for market analysis, risk planning, liquidity and execution review.
Script library & access: aligurtuna.com/agprolabs-pine-scriptleri/
Telegram: t.me/agprolabs
Script library & access: aligurtuna.com/agprolabs-pine-scriptleri/
Telegram: t.me/agprolabs
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Public-free and invite-only TradingView Pine Script tools for market analysis, risk planning, liquidity and execution review.
Script library & access: aligurtuna.com/agprolabs-pine-scriptleri/
Telegram: t.me/agprolabs
Script library & access: aligurtuna.com/agprolabs-pine-scriptleri/
Telegram: t.me/agprolabs
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.