Trendline Retest Planner [AGPro Series]Trendline Retest Planner
🧠 Core Idea
Is the active trendline retest constructive enough to keep the setup under review, or is it starting to fail?
📌 Overview / What it does
Trendline Retest Planner is a chart-first decision tool for traders who review price behavior around active support and resistance trendline retests.
Instead of drawing many trendlines or flagging every break, the script focuses on one active trendline retest context at a time. It measures line age, touch count, retest depth, close response, and volume support, then converts that evidence into a 0-100 Retest Score and a clear next-action state.
The script produces an active trendline, retest pocket, hold/fail labels, invalidation edge, target path, alerts, and a compact AGPro planning panel. It does not predict price movement, automate execution, or provide guaranteed outcomes.
🎯 Purpose & Design Philosophy
This script was built to fill the gap between auto-trendline drawing and practical retest planning.
Many tools can draw diagonals or detect a break. The harder question is what to do after price returns to the line: is the retest holding, weakening, failing, or still waiting for confirmation?
Trendline Retest Planner supports a decision workflow: identify the active retest, read the score, locate the invalidation edge, compare the target path, and decide what deserves review next.
⚡ Why This Script Is Different
Most trendline tools focus on drawing many lines, ranking confluence, or detecting trendline breaks.
This script does NOT clone Auto Trendline Break Quality, Auto Trendlines MTF - Break/Retest, Trendline Confluence Map, Break-Retest Quality, Structure Retest Planner, Swing Retest Quality, or a generic support/resistance zone map.
Instead, it narrows the workflow to one active support or resistance trendline retest and evaluates whether that retest is constructive or failing. The main output is not a buy or sell signal. It is a decision state: READY, MONITOR, FAILING, INVALIDATED, WATCH, WAIT, or SCAN.
⚙️ Methodology
1. Context Detection
The script builds the latest support and resistance trendline candidates from confirmed swing pivots, then selects the nearest valid retest context.
2. Reference Mapping
It maps the active trendline, a retest pocket around the line, an invalidation edge, and a forward target path.
3. Reaction Evaluation
The 0-100 model scores line age, touch count, retest depth, close response, and volume support.
4. Visual Output
The chart shows the active planning objects, compact state labels, and a clean AGPro decision panel.
🗺️ How to Read the Chart
Trendline = the active support or resistance line being evaluated.
Retest Pocket = the ATR-based area around the trendline where a retest is considered active.
Invalidation Edge = the planning reference where the active retest context is considered broken.
Target Path = a forward guide based on the trendline-to-risk distance.
Labels = compact TEST, READY, MONITOR, WEAK, INVALID, PATH, and sparse context labels.
Colors = teal marks support-side retest context, pink marks resistance-side retest context, amber marks caution, indigo marks monitoring/follow-through, and red marks invalidation.
Panel = the AGPro panel summarizes Trendline Side, Retest Score, Hold State, Risk Edge, and Action.
🚦 Signals & States
• READY → the retest is active, holding on the correct side, and the score is strong enough for structured review.
• MONITOR → the retest is developing, but confirmation or score quality is still incomplete.
• FAILING → price touched the pocket, but the response is weak or on the wrong side.
• INVALIDATED → price crossed the invalidation edge and the active context should be rebuilt.
• WATCH → price is approaching the trendline pocket.
• WAIT → a valid trendline exists, but price is not close enough for useful retest review.
• SCAN → no valid trendline context is active yet.
🔔 Alerts Logic
Alerts trigger when price touches the active retest pocket, when READY state appears, when MONITOR state appears, when a failing retest is detected, when the invalidation edge is crossed, and when follow-through appears after an active retest.
Alerts are attention markers only. They are not trade instructions, automated strategy commands, or outcome promises.
🧩 Confluence Logic
The strongest context appears when the active line is fresh enough, has enough touches, retests with controlled depth, closes back on the correct side, and receives supportive relative volume.
When these components conflict, the panel moves toward MONITOR, FAILING, WATCH, WAIT, or INVALIDATED.
📊 When to Use
• Trendline support retests during constructive pullbacks
• Trendline resistance retests during bearish continuation attempts
• Price-action review after a diagonal support or resistance line is already visible
• Retest planning where invalidation and target path matter
• Liquid markets where pivots, candles, and volume behavior are readable
⚠️ When NOT to Use
• Very low-liquidity symbols with irregular candles
• Extremely noisy micro-timeframes
• News-driven spikes where trendline geometry becomes distorted
• Markets where swing pivots are too compressed to form useful lines
• Situations where the user expects a signal-only or auto-trading tool
🎛️ Key Inputs
• Trendline Side → selects Auto, Support Retest, or Resistance Retest.
• Trendline Pivot Length → controls how confirmed swing anchors are detected.
• Max Trendline Age → controls how old a trendline can be before it is ignored.
• Touch Count Lookback → controls how extra line touches are counted.
• Sensitivity → adjusts retest pocket width and activation distance.
• READY Score → sets the score threshold for stronger review states.
• Label and Panel Font Size → controls chart-label and panel readability.
• Panel Location and Theme → adjusts the AGPro panel layout.
🖥️ Interface & Visual Design
The interface is designed to stay chart-first and decision-led.
The active trendline is the main reference. The retest pocket is drawn around that line with centered text so the chart stays readable. The invalidation edge and target path explain where the planning context weakens and what forward room is being mapped.
The AGPro panel uses a merged blue title row and five compact rows so the user can read side, score, hold state, risk edge, and action quickly.
🧪 Practical Usage Workflow
1. Read the panel state and Retest Score.
2. Check whether price is approaching or touching the retest pocket.
3. Compare current price with the invalidation edge.
4. Review whether the label says TEST, READY, MONITOR, WEAK, INVALID, or PATH.
5. Confirm the broader market context before making any decision.
🔍 Interpretation Guidelines
Think in terms of retest quality, not prediction.
A higher score means multiple retest components align inside the script's rule set. A weaker score means the line may be too old, the retest may be too shallow, too deep, missing a constructive close, or lacking participation.
The script helps organize the review process. It does not replace judgment.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not an auto-trading system
• Not a guaranteed signal tool
• Not a broad auto-trendline map
• Not a trendline confluence scanner
• Not a break-and-retest scanner
• Not a generic support/resistance zone map
• Not an order block, FVG, or supply/demand tool
⚠️ Limitations & Transparency
• Pivot-based trendlines appear only after pivots are confirmed.
• Scores can vary across symbols, sessions, and timeframes.
• Volume scoring depends on exchange-provided volume data.
• Fast volatility can cross a trendline before a clean retest can be measured.
• In Live Updating mode, active-bar values can change before the bar closes.
🧠 Market Context Notes
Trendline retests are easiest to interpret when liquidity, volatility, and swing structure are readable.
A trendline touch is not enough by itself. Line quality, response, invalidation distance, and target path all matter.
🧾 Use Case Examples
When price returns to an upward support trendline and closes back above the pocket with a high score, the panel may move toward READY.
When price touches a downward resistance trendline but cannot close back below it, the planner may move toward FAILING or INVALIDATED.
When price is near the line but has not touched the pocket yet, the panel can stay in WATCH or WAIT.
🧱 System Philosophy
Trendline Retest Planner follows the AGPro decision-engine approach: identify context, score quality, map risk, show the next action, and keep the chart readable.
It is designed to help traders evaluate a specific planning question instead of adding another generic signal layer.
🔐 Non-Promise Statement
No score, label, alert, or chart object guarantees any market outcome.
The script organizes retest context and highlights conditions for review. It does not provide certainty.
📉 Risk Disclosure
Trading involves risk.
Users remain responsible for their own decisions, position sizing, execution, and risk management.
This script is for educational and analytical purposes only and does not provide financial advice.
📚 Educational Note
Use the planner as a structured reading layer: trendline context first, retest quality second, invalidation and target path third, broader market context always.
Indicator

Price Rejection Readiness [AGPro Series]Price Rejection Readiness
🧠 Core Idea
Is the current price rejection strong enough to deserve attention now?
📌 Overview / What it does
Price Rejection Readiness is a chart-first rejection planning tool built to evaluate whether a wick-based rejection is only noise, a watch condition, a confirmed context, or a failed attempt.
The script produces a 0-100 Readiness Score, a rejection pocket, wick-quality label, confirmation rail, invalidation rail, target review rail, controlled chart labels, and a compact AG Pro decision panel.
It does not predict price direction, automate execution, or mark every wick as important. Its role is to organize rejection context into a cleaner planning workflow.
🎯 Purpose & Design Philosophy
Many rejection tools stop at candle recognition. They mark long wicks, pin bars, or local reactions without showing whether the context is ready, waiting, confirmed, or failing.
This script was built for traders who want a decision-support layer around rejection behavior. It helps users evaluate validity, quality, confirmation, risk boundary, target room, and the next action from one clean visual structure.
The design philosophy is planning first. A rejection candle should not be treated as a conclusion by itself. It should be evaluated through structure, participation, follow-through, and risk context.
⚡ Why This Script Is Different
Most tools focus on detecting a wick or highlighting a candle pattern.
This script does NOT clone Rejection Block Quality, Pin Bar Quality Filter, Reaction Efficiency Meter, order-block tools, or generic support/resistance maps.
Instead, it asks whether the current rejection is ready to be monitored as a structured plan. It scores wick dominance, close location, local reference pressure, volume response, and follow-through, then maps a practical confirmation rail, invalidation rail, and target review area.
⚙️ Methodology
1. Context Detection
The script measures the current candle body, wick dominance, wick share, close location, volume response, and local reference pressure.
2. Reference Mapping
When a valid rejection forms, the script draws a candle-native rejection pocket from the wick extreme to the rejection body area. This is not a broad support/resistance zone.
3. Reaction Evaluation
The engine converts wick quality, close strength, reference pressure, volume behavior, and follow-through into a 0-100 Readiness Score.
4. Visual Output
Accepted plans create a rejection pocket, confirmation rail, invalidation rail, target review rail, event labels, and a compact AG Pro panel.
🗺️ How to Read the Chart
Rejection Pocket = the candle-native area where the rejection originated.
Confirmation Rail = the price boundary that must be respected or exceeded according to the selected confirmation mode.
Invalidation Rail = the price boundary beyond the wick where the rejection plan is no longer valid.
Target Review Rail = a projected review area based on the distance from active price to invalidation.
Labels = compact event markers for Ready, Confirmed, Failed Rejection, and Target Review.
Colors = teal for bullish rejection context, pink for bearish rejection context, indigo for confirmation, gold for target review, and red for invalidation.
Panel = shows Rejection Side, Readiness, Wick Quality, Confirmation, Invalid / Target, and Action.
🚦 Signals & States
• Scan → no active rejection plan exists.
• Watch → rejection quality meets the minimum threshold but still needs confirmation.
• Ready → rejection quality is strong enough to review risk and confirmation context.
• Confirmed → the active rejection plan confirmed according to the selected confirmation mode.
• Failed → price closed beyond the invalidation rail.
• Target Review → price reached the projected target review rail.
🔔 Alerts Logic
Bullish Rejection Ready triggers when a bullish rejection reaches the configured readiness threshold.
Bearish Rejection Ready triggers when a bearish rejection reaches the configured readiness threshold.
Rejection Confirmed triggers when the active rejection plan confirms according to the selected confirmation mode.
Rejection Failed triggers when the active plan closes beyond its invalidation rail.
Target Review Reached triggers when price reaches the projected target review rail.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The readiness score becomes stronger when wick dominance, close location, local reference pressure, volume response, and directional follow-through align.
No single component is treated as absolute. A visually strong wick can still receive a weaker score if close location, participation, or follow-through are poor.
📊 When to Use
• Price-action review after a visible wick rejection
• Pullback or reaction environments where rejection quality matters
• Breakout failure, continuation delay, or reversal-watch contexts
• Charts where traders need risk and confirmation boundaries, not just a candle marker
⚠️ When NOT to Use
• Extremely low-liquidity symbols
• Very noisy micro timeframes with poor candle quality
• News spikes where wick structure can be unstable
• Markets where volume data is missing or unreliable
🎛️ Key Inputs
• Sensitivity → controls how strict the rejection engine is.
• Reference Lookback → defines the local edge used for context.
• Minimum Readiness Score → filters weak rejection plans.
• Confirmation Mode → controls how strict the confirmation rail behavior must be.
• Invalidation Buffer ATR → places the risk rail beyond normal candle noise.
• Target Review Multiple → projects the target review rail from risk distance.
• Visual settings → control pockets, rails, labels, object count, label size, panel visibility, panel location, theme, and panel font size.
🖥️ Interface & Visual Design
The interface is built around a compact AG Pro panel and a chart-first planning layer.
The pocket, rails, and labels are intentionally direct: they show where the rejection originated, where confirmation is evaluated, where the plan fails, and where review becomes relevant.
The design avoids crowded signal dumping and keeps the chart readable while still providing enough visible labels for publication-quality context.
🧪 Practical Usage Workflow
1. Read the panel to identify the active rejection side and readiness score.
2. Check the rejection pocket to see where the wick response originated.
3. Compare price behavior against the confirmation rail.
4. Use the invalidation rail and target review rail as planning context.
5. Interpret the next-action state instead of treating the label as a command.
🔍 Interpretation Guidelines
A high readiness score means the rejection has stronger structural qualities, not certainty.
A confirmed rejection means price respected the selected confirmation rule, not that future direction is guaranteed.
A failed rejection means the active plan lost its defined risk boundary and should be reviewed as invalidated context.
Target Review means the projected review area was reached and the context should be reassessed.
🚫 What This Script Is NOT
• Not a prediction engine
• Not financial advice
• Not auto trading
• Not guaranteed signals
• Not an order-block or rejection-block detector
• Not a generic support/resistance map
⚠️ Limitations & Transparency
Rejection quality can vary across symbols, timeframes, volatility regimes, and volume conditions.
The local reference component is designed for context, not complete market-structure mapping.
The target rail is a review boundary, not a promised destination.
The script is rule-based and reactive. It organizes information after conditions appear on the chart.
🧠 Market Context Notes
Wick rejection can be more meaningful when it appears near a local edge, forms with clear close behavior, and receives follow-through.
It can be weaker when the candle is isolated, the close location is poor, or the market is moving through unstable volatility.
Use the tool as a structured context layer inside a broader trading plan.
🧾 Use Case Examples
When price forms a lower-wick rejection near a recent local low and closes strongly above the body area, the planner may create a bullish readiness state with a visible pocket and confirmation rail.
When price forms an upper-wick rejection near a recent local high but later closes beyond the invalidation rail, the planner marks the setup as failed instead of keeping the rejection narrative active.
🧱 System Philosophy
AGPro tools are designed to turn raw chart events into structured interpretation.
This script follows that philosophy by transforming rejection candles into a readiness workflow: score, state, risk, confirmation, target review, and next action.
🔐 Non-Promise Statement
No script can remove uncertainty from markets.
This tool highlights rule-based rejection context and leaves final interpretation to the user.
📉 Risk Disclosure
Trading involves risk.
This script is for educational and analytical use only.
It does not provide financial advice, investment advice, or guaranteed trading outcomes.
Users are responsible for their own decisions, risk management, and market interpretation.
📚 Educational Note
Use Price Rejection Readiness as a structured reading layer for rejection behavior, not as a standalone decision system.
Indicator

Multi-Timeframe EMA Distance & % Change TableDescription of Multi-Timeframe EMA Distance & % Change Table
The Multi-Timeframe EMA Distance & % Change Table indicator is designed to display the distance and percentage change between the current price and the Exponential Moving Averages (EMAs) on multiple timeframes. It creates a table to show these values, with customizable options for decimal precision .
Key Features:
Inputs:
- Timeframes (tf1, tf2, tf3, tf4): User-defined timeframes for EMA calculations (e.g., 1 minute, 15 minutes, daily, etc.).
- EMA Levels (emaLevel, emaLevel2, emaLevel3): User-defined periods for three different EMAs.
EMA Calculations:
- Computes EMAs for the specified levels (50, 100, 200) on each of the user-selected timeframes.
Plotting:
- Plots the EMAs on the chart with distinct colors: Orange, Teal, and Green for different EMAs.
Display Options:
- Checkbox (displayAsPercentage): Allows the user to toggle between displaying distances or percentage changes.
- Decimal Precision:
- decimalPlacesDistance: Specifies the number of decimal places for rounded distance values.
- decimalPlacesPercentage: Specifies the number of decimal places for rounded percentage values.
Table Creation:
- Location: Table is placed in the top-right corner of the chart.
- Headers: Includes columns for each timeframe and EMA distance/percentage.
Distance and Percentage Calculations:
- Distances: Calculated as the difference between the current price and the EMA values for each timeframe.
- Percentages: Calculated as the distance divided by the EMA value, converted to a percentage.
Decimal Rounding:
- Custom Rounding Function: Ensures that distance and percentage values are displayed with the user-specified number of decimal places.
Color Coding:
- Distance Values: Colored green if positive, red if negative.
- Table Entries: Display either the rounded distance or percentage, based on user selection.
Table Update:
- The table is dynamically updated with either distance or percentage values based on the user's choice and rounded to the specified number of decimal places.
This indicator provides a comprehensive overview of EMA distances and percentage changes across multiple timeframes, with detailed control over the precision of the displayed values. Indicator
