INVITE-ONLY SCRIPT
Updated

Adaptive Market Playbook [AGPro Series]

293
Adaptive Market Playbook [AGPro Series]


🧠 Core Idea

Are you trading the right way for the market you are actually in?
This script reads the current market mode and hands you the matching game plan.


📌 Overview / What It Does

Adaptive Market Playbook is a market-regime and decision dashboard. It classifies live price action into one of four market modes - Trending, Ranging, Expansion or Compression - and adapts everything it shows to that mode.

For each mode it presents a tailored game plan, a directional bias, a 0-100 mode clarity score, and a mode-aware context zone with the key levels that matter for that condition. As the market shifts from one mode to another, the plan, the bias, the zone and the levels all change with it.

It does NOT predict price, generate orders, or automate trading. It is a structured way to recognise what kind of market you are in, so you stop applying trend tactics in a range, or fading a strong breakout, and instead match your approach to the conditions.


🎯 Purpose & Design Philosophy

The single most common mistake in discretionary trading is using the right tactic in the wrong market - buying pullbacks in a range, fading a genuine expansion, or forcing trades during dead compression.

Adaptive Market Playbook was built to fix that. Instead of one fixed behaviour, it changes its guidance based on the detected regime, giving each market mode its own plan and its own levels. It is designed for discretionary traders who want their approach to stay in sync with changing conditions.


⚡ Why This Script Is Different

Most tools apply one fixed logic to every market - the same signal in a trend, a range, or a dead zone - and leave it to you to notice when that logic no longer fits.

This script does NOT assume the market is always trending, and it does NOT show the same guidance in every condition.

Instead, it first classifies the market mode, then adapts: in a trend it points to pullback levels, in a range it frames the extremes and the mid, in an expansion it tracks the breakout level, and in compression it tells you to stand by and prepare. The plan and the levels are a function of the regime, not a fixed overlay.


⚙️ Methodology

1. Trend Measurement
A multi-EMA model with slope produces a 0-100 trend strength reading and a trend direction.

2. Volatility State
ATR is compared to its own baseline to detect contraction, normal, or expansion conditions.

3. Range Framing
A rolling lookback defines the working high, low and mid, and where price sits inside that range.

4. Mode Classification
These inputs are combined into one of four modes - Compression, Trending, Expansion or Ranging - with a clarity score showing how clearly the current mode is defined.

5. Adaptive Output
Each mode maps to its own plan, bias logic, context zone and key levels, which update automatically as the mode changes.


🗺️ How to Read the Chart

- Panel: the current mode, clarity, bias, the matching plan, trend strength, volatility state, range position, and the mode-aware key levels.
- Context zone: a colored box projected to the right with a centered plan label for the active mode.
- History labels: compact mode tags marking where the market mode changed.
- Colors: green and pink tones for directional trending, amber for ranging, indigo for expansion, grey for compression.


🚦 Signals & States

- Trending -> directional conditions dominate; plan favors trading pullbacks with the trend.
- Ranging -> price oscillates in a band; plan favors fading the extremes toward the mid.
- Expansion -> volatility is opening up; plan favors trading the breakout while managing risk.
- Compression -> volatility is contracting; plan favors standing by and preparing.

These describe the current market condition. They are not directives to enter or exit.


🔔 Alerts Logic

- Market Mode Changed -> fires when the classified mode changes.
- Compression to Expansion -> fires when a contracting market begins to expand.
- Trending Mode Started -> fires when the market enters a trending mode.

Alerts are attention markers that the market condition has shifted. They are NOT trade instructions.


🧩 Confluence Logic

A mode is most reliable when its drivers agree - for example, a Trending read backed by high trend strength and normal-to-expanding volatility, or a Compression read confirmed by clearly contracting ATR. The clarity score reflects how cleanly those drivers line up.


📊 When To Use

- Across changing market conditions where a single fixed approach struggles.
- As a top-of-chart context check before choosing a tactic.
- On liquid instruments where trend, range and volatility are meaningful.
- To confirm whether the current market suits trend, mean-reversion or breakout tactics.


⚠️ When NOT To Use

- On illiquid instruments with erratic, unreliable structure.
- During news-driven shocks where mode can flip rapidly.
- As a standalone reason to enter or exit a trade.
- When you would ignore the mode and trade one fixed way regardless.


🎛️ Key Inputs

- Trend Module -> EMA lengths that define trend strength and direction.
- Volatility Module -> ATR length and baseline that set contraction and expansion detection.
- Range Module -> lookback that frames the working high, low and mid.
- Mode Thresholds -> the trend-strength, compression and expansion cutoffs that govern classification.
- Labels & Zone -> history label spacing, label offset, and zone projection length.
- Panel -> theme, location, font size, and show / hide.


🖥️ Interface & Visual Design

The panel uses a single merged header and a clean, color-coded layout so mode, bias and plan read at a glance. The context zone is projected to the right of price - clear of the candles - with a centered plan label, and history labels are kept compact to avoid clutter while preserving a clear visual hierarchy.


🧪 Practical Usage Workflow

1. Read the current mode and clarity in the panel.
2. Note the matching plan and the directional bias.
3. Check the context zone and key levels for that mode.
4. Confirm the supporting reads - trend strength, volatility, range position.
5. Combine this context with your own analysis before any decision.


🔍 Interpretation Guidelines

Treat the mode as the lens for everything else: a plan that fits a trend can be wrong in a range. A high clarity score means the mode is well defined; a low score means conditions are transitional and warrant caution. Always read the mode within the broader market picture.


🚫 What This Script Is NOT

- It is NOT a prediction engine.
- It is NOT financial advice.
- It is NOT an automated trading system.
- It does NOT generate guaranteed signals or outcomes.


⚠️ Limitations & Transparency

Mode classification can change as new bars form, and transitions between modes introduce natural lag. Behaviour varies across timeframes and instruments, and volatility or liquidity conditions affect how modes and levels appear. Outputs should always be read in context.


🧠 Market Context Notes

Modes carry the most meaning when liquidity is sufficient and structure is clear. In thin or erratic conditions the same classification is less dependable, and clarity scores tend to be lower.


🧾 Use Case Examples

- A trader sees Trending mode with high clarity and uses the pullback level as a reference to plan a with-trend entry.
- A trader sees Compression and stands aside, then acts only when the Compression-to-Expansion alert and a clear bias appear.


🧱 System Philosophy

The engine favors matching tactics to conditions over forcing one fixed approach, and keeps its classification logic transparent so the trader stays in control of the interpretation.


🔐 Non-Promise Statement

This script makes no promises about future price movement and offers no certainty. It is a measurement and visualization tool only.


📉 Risk Disclosure

Trading involves substantial risk. This script is provided for educational and analytical purposes only and does not constitute financial advice. All trading decisions and their outcomes are the sole responsibility of the user. Past behavior of any indicator does not guarantee future results.


📚 Educational Note

Use Adaptive Market Playbook to study how markets rotate between trending, ranging, expansion and compression phases, and how the right approach changes with each. Over time it can help build a more adaptive, condition-aware trading mindset.
Release Notes
UPDATE NOTES - 2.0

This update focuses on clarity and consistency: refining how the adaptive playbook is
presented and read on the chart.

The core purpose of the script remains unchanged. It still classifies price action
into trending, ranging, expansion or compression, and presents a tailored plan,
directional bias, clarity score and a mode-aware context zone for each one.

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

- Cleaner panel layout
The dashboard is organized into clear blocks - the mode verdict, the plan, the
supporting trend and volatility reads, and the mode-aware key levels - so the current
context is readable at a glance.

- Consistent state presentation
Bias, plan and key levels now line up consistently with the active mode, so the
guidance and the levels always describe the same market state.

- Refined visual hierarchy
The mode label, context zone and sparse history markers are tuned so the active mode
and its plan stand out without crowding the chart.


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

- Improved chart readability by keeping the context zone, centered plan label and
sparse mode-history markers clean and well spaced.

- Reduced visual clutter so the first-glance read is the current mode and its plan.

- Refined the panel grouping so each block of information is visually distinct.

- Adjusted default presentation for a more balanced, premium appearance.


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

- Organized the panel into four blocks: Verdict, Plan, Supporting Reads and Key
Levels.

- Enhanced overall user experience while keeping panel theme, location and font size
fully adjustable, with the panel shown by default.

- All trend, volatility, range and threshold settings remain available and unchanged.


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

This update does not change the core analytical logic of the script. The mode
classification, clarity score, bias and key-level logic are unchanged.

The goal is to improve clarity and usability, not to introduce new predictive
behavior. Users should interpret outputs the same way as before, with a cleaner and
more consistent presentation.


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

The script remains a rule-based analytical tool.

Mode classification varies with timeframe, instrument, volatility and the chosen
thresholds. A clear reading does not guarantee any individual outcome.

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

This update focuses on regime consistency, breakout-reference accuracy, context-zone precision, analytical wording, panel behavior, and completed-bar alert stability.

The core purpose of the script remains unchanged.
This release preserves the four-mode Adaptive Market Playbook while correcting a small set of verified inconsistencies in the existing implementation.

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

• Corrected Trending-mode directional consistency.
Trending mode now requires both the configured trend-strength threshold and a valid directional EMA alignment. This prevents a steep but unaligned EMA structure from appearing as Trending with a Neutral bias.

• Corrected the Expansion breakout reference.
The breakout level now uses the completed range that existed before the current bar. The active expansion bar can no longer move its own reference boundary to a newly printed high or low.

• Refined the context zone to match the active market mode.
Trending uses the corridor between the mid EMA and working range midpoint. Expansion uses an ATR-scaled corridor around the pre-breakout boundary. Ranging and Compression retain their full working range frames.

• Confirmed all regime alerts at candle close.
Market Mode Changed, Compression to Expansion, and Trending Mode Started now require barstate.isconfirmed.

• Corrected panel hide behavior.
The panel is cleared on the last bar before it is conditionally rebuilt. Disabling Show Panel now removes the existing cells instead of leaving stale content visible.


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

• Replaced the oversized all-purpose context box with a narrower, mode-aware analytical corridor.

• Preserved the centered context badge inside every visible zone.

• Standardized chart-facing mode and context badges to premium uppercase casing.

• Added contrast-aware badge text: dark text on teal, pink, amber, and grey surfaces; white text on the indigo Expansion surface.

• Expanded the merged blue header to the full product name: AG Pro Adaptive Market Playbook.

• Preserved ATR displacement so historical labels remain clear of candles.


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

• Replaced the panel's Plan row with Context.

• Replaced direct-looking phrases with analytical wording: Pullback Review, Range Review, Breakout Review, and Compression Watch.

• Preserved Show Panel, Panel Theme, Panel Location, panel font size, label font size, context-zone visibility, history-label visibility, spacing, offset, and projection controls.

• Preserved the existing Trend, Volatility, Range, and Mode Threshold input groups and their default values.


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

The classification priority remains Compression, Trending, Expansion, then Ranging.

Trend strength, ATR-ratio thresholds, range framing, clarity scoring, directional bias logic, and mode colors retain their original design. The Trending integrity guard only prevents a contradictory Trending / Neutral result when directional EMA alignment is absent.

Expansion direction continues to reflect recent price travel, while its displayed breakout level now represents the completed pre-expansion boundary.

Context values and alerts are analytical attention markers. They are not entry or exit instructions.


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

The script remains a rule-based analytical tool.

EMA alignment, ATR ratios, rolling ranges, and threshold-relative clarity can vary across instruments and timeframes. Completed-bar confirmation reduces transient alerts but naturally introduces close-of-bar timing.

Market conditions such as volatility, liquidity, gaps, and timeframe differences may affect how regimes, labels, and context zones appear.


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

• Refreshed the publication and access routing information.
• Core adaptive-market playbook logic, panel behavior, inputs, alerts, visuals, and outputs remain unchanged.
Release Notes
🔧 UPDATE NOTES - V2.1.1

This maintenance update restores reliable panel contrast across chart backgrounds and both built-in panel themes.

The analytical model, regime logic, statistics, chart labels and alert behavior remain unchanged.

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

• Replaced translucent alternating panel rows with explicit opaque theme colors.

• Dark Theme now keeps every data row on a consistently dark surface, even when the chart background is white.

• Light Theme now uses a controlled light-gray alternate row that preserves readable dark text.

• Preserved the existing question header, panel hierarchy, row order and all analytical values.

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

• Eliminated washed-out rows caused by chart-background blending.

• Restored clear contrast for Clarity, Current Review, Volatility, Bars in Mode, 90% Floor and level rows.

• Kept alternating row separation without sacrificing legibility.

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

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

It is a presentation-only correction for panel readability.

Release Notes
Version 2.2.0 – Active Playbook Ownership and Key-Level Map

This update strengthens the current-regime chart story while preserving the four-mode classification engine, clarity model, mode-aware bias, stability evidence and completed-bar alerts.

• Rebuilt the centered context badge as an ACTIVE PLAYBOOK card that now combines regime, bias, clarity, volatility, stability and the current review in one owned visual hierarchy.

• Added two right-side key-level badges for the active mode and connected each badge back to its exact analytical level, making the panel’s mode-aware references directly readable on the chart.

• Added font-aware collision spacing and vertical ownership guides when the two key levels are too close to display safely at their exact visual positions.

• Renamed historical regime markers as PRIOR mode labels, added bias ownership and increased candle-cluster clearance so past states cannot be mistaken for the live playbook.

• Increased the default history-label spacing to keep regime transitions selective while the current playbook remains continuously visible.

• Converted the panel Mode row into a contrast-safe filled state band and gave Compression a durable indigo visual treatment for reliable dark- and light-chart readability.

• Preserved the Trending, Ranging, Expansion and Compression classification priority, EMA trend model, ATR regime thresholds, range framing, key-level calculations, statistical evidence arrays and all three alert conditions.

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.