Regime Transition Intelligence [AGPro Series]Regime Transition Intelligence
Most regime scripts answer a single question: "what regime are we in right now?". Regime Transition Intelligence is designed to answer a different, more actionable set of questions: how long does this regime usually last, how close to its typical end is it, how likely is it to flip within the next N bars, and where does it historically go when it does flip. Instead of treating the current regime as a standalone snapshot, it builds a living, self-calibrating statistical profile of the symbol's own regime behavior and presents it in a compact on-chart dashboard.
The engine runs on three independent axes — Trend Strength (Kaufman Efficiency Ratio + ADX), Chop Risk (Choppiness Index + inverse trend), and Volatility (ATR% normalized over a user-defined lookback). Each axis is classified as LOW / MID / HIGH, either with fixed 33/67 thresholds or with an adaptive percentile rank engine that learns the symbol's own statistical envelope over a rolling window. The three axes are then combined into a discrete regime state: TREND, MIXED, or RANGE / CHOP.
🟦 Overview / What it does
Regime Transition Intelligence is a single-pane overlay indicator that continuously classifies the market into one of three regimes and then layers a full transition intelligence stack on top of that classification:
- A per-regime dwell-time distribution learned from the chart's own completed regime blocks
- A Bayesian-style flip probability that answers "how likely is a regime change within the next N bars, given the current age"
- A 3x3 transition matrix that ranks the most likely next regime with a secondary fallback
- A fatigue score comparing the current regime's age to its historical mean (FRESH / MATURE / EXTENDED)
- A confidence decay tracker that shows whether conviction is BUILDING, STABLE, or FADING within the current regime block
- A compact history ribbon showing the last completed regime blocks with their durations
- Higher-timeframe alignment with a SYNC / DIV indicator and a live beacon at the right edge of the chart
All of this is delivered inside a single configurable dashboard, a directional transition marker layer on the chart, optional regime tint and candle coloring, and a right-edge beacon summarizing the current state.
🟣 Unique Edge / Why it is not a basic mashup
Standard regime indicators report the current state and stop there. Regime Transition Intelligence adds six distinct statistical layers that together form a transition-aware view:
1. Dwell Time Statistics — the script stores every completed regime block in a rolling array (configurable depth) and continuously updates running mean, running variance, running max, and running count per regime code. Statistics are only shown after a minimum number of blocks per regime have been collected, so the user always knows when the sample size is still too small.
2. Exponential Hazard Flip Probability — the baseline flip probability uses P(flip within H bars) = 1 - exp(-H / mean), a standard survival-analysis construction assuming constant hazard. The result is then fatigue-adjusted: if the current age is far above the historical mean, the probability is boosted; if the regime has just started, the probability is damped. The final value is capped at 95% to avoid certainty claims.
3. Transition Matrix — a 3x3 counter records every observed regime transition and is read as a conditional distribution: "given the current regime ends, which regime is it most likely to move to, and what is the runner-up". Both the top candidate and the secondary candidate are displayed with their percentages.
4. Fatigue Score — the ratio of the current age to the historical mean is bucketed into three zones (FRESH, MATURE, EXTENDED) using user-configurable thresholds. It tells the user whether the current regime is still in its early lifecycle or already past its typical end.
5. Confidence Decay Tracker — conviction in the current regime is sampled at the start of each new block and compared to the current conviction. The delta is classified as BUILDING, STABLE, or FADING, which gives an early read on whether the regime is strengthening or losing its grip.
6. History Ribbon — the last N completed regime blocks are compressed into a single compact line such as "C2·M4·C8·M1·M7*", where letters are regime codes and numbers are bar counts, with the current block marked by an asterisk. It gives immediate context on recent regime rhythm at a single glance.
None of these layers is a repackaged classic indicator. They are built on top of a trend / chop / volatility engine but deliver information that is categorically different from a simple "regime yes / no" readout.
🟢 Methodology / Conceptual data flow
1. Feature extraction. Kaufman Efficiency Ratio (net move over lookback divided by summed absolute moves) and normalized ADX are combined into a trend score. The Choppiness Index is normalized against its operating range and blended with inverse trend to produce a chop score. ATR as a percentage of price is normalized against its own lookback min/max to produce a volatility score.
2. Classification. Each score is mapped to LOW / MID / HIGH using either fixed thresholds (Static mode) or percentile rank over an adaptive lookback (Adaptive mode). The three bands are combined into a discrete regime state: TREND when trend is HIGH and chop is LOW, RANGE / CHOP when chop is HIGH, and MIXED otherwise.
3. Block tracking. Every time the regime state changes on a confirmed bar, the previous block is closed: its duration is pushed to a rolling history array and added to the running sum / sum-of-squares / count / max for its regime code. When the history array exceeds its configured depth, the oldest block is popped and its contribution is subtracted from the running totals, which keeps the statistics adaptive and non-expanding.
4. Transition matrix update. When a block closes into a new regime, the 3x3 counter is incremented at the corresponding cell, and the row total is incremented. The conditional distribution for the current regime is read from its row at display time.
5. Statistical outputs. Mean dwell, fatigue ratio, exponential-hazard flip probability, fatigue-adjusted flip probability, top and secondary next regimes, and confidence delta are all derived from the running state and rendered into the dashboard.
6. Higher-timeframe alignment. The same three-axis engine is run on a user-selected higher timeframe via request.security and compared against the current-timeframe regime; the result appears as SYNC or DIV in the header and as an optional HTF row in the dashboard.
🔔 Signals & Alerts / Interpretation
Regime Transition Intelligence is a state-mapping and statistical context tool rather than a directional buy / sell engine. The main on-chart events are:
- Regime Shift — fires when the regime state changes on a confirmed bar
- High Flip Probability — fires when the fatigue-adjusted flip probability crosses a high threshold
- Regime Fatigue Extended — fires on the transition into the EXTENDED fatigue zone
- Confidence Fading — fires on the transition into the FADING confidence zone
How to read the panel:
- Summary + Age tells the user which regime is active and how long it has been active.
- Dwell Context compares the current age to the historical mean in the form "age / mean · % of typical lifespan".
- Fatigue summarizes that comparison as FRESH, MATURE, or EXTENDED.
- Flip Probability reports the statistical odds of a regime change within the user-defined horizon.
- Next Likely names the most probable next regime with its percentage and a secondary fallback.
- Confidence and Conf Decay together tell the user whether the current read is reliable and whether conviction is rising or fading.
- History gives quick situational awareness of recent regime rhythm.
None of these rows should be interpreted as a trade instruction. They are a context layer meant to be combined with the user's own structure and entry framework.
🎛️ Key Inputs
Regime Engine Core — Trend Persistence Length, DMI/ADX Length, Chop Length, ATR Length, Volatility Normalize Lookback.
Adaptive Boundaries — Band Classification Mode (Adaptive / Static), Adaptive Lookback, Adaptive Low / High Percentile.
Transition Intelligence — Regime History Depth, Flip Probability Horizon, Min Blocks Before Stats Activate, Fatigue Fresh / Extended thresholds.
HUD — Display Mode (PRO / MINIMAL), HUD Position, Text Size, transparency controls, individual row toggles, history ribbon length.
Add-ons — Chart Regime Tint, Regime Candle Coloring (Soft / Strong), HTF Peek Timeframe, Transition Markers (location, cooldown, stagger, size, ATR offset), Live Regime Beacon (position, size, stats toggle).
🧭 How to use
1. Add the script to any chart and timeframe. The engine is tuned to work from 15m up to Daily; very low timeframes on illiquid instruments can produce unstable regime blocks and are not the intended use case.
2. Give the script time to collect blocks. Statistics stay in N/A until the configured minimum number of completed blocks per regime has accumulated. On a fresh chart or an illiquid instrument this is expected behavior, not a bug.
3. Read the dashboard top-down. Start with the three axis rows to understand the current market shape, then move to Summary and Age to see what is active and for how long, then use Dwell / Fatigue / Flip / Next Likely to place the current regime inside its historical distribution, and finally use Conf Decay and HTF to sanity-check reliability and alignment.
4. Treat EXTENDED fatigue and high flip probability as context, not as a reversal signal. Regimes can remain in the EXTENDED zone for a while before actually flipping; the statistical profile is descriptive, not deterministic.
5. Combine with structural context. The script does not know about support / resistance, order blocks, or news. It only knows about the symbol's own regime rhythm. Use it as a regime-aware filter on top of the user's existing framework.
⚠️ Limitations & Transparency
This is not a strategy and not a complete trading system. It does not predict price direction and does not generate buy or sell signals. All statistics are estimated from a rolling history of the chart's own regime blocks, so they are sensitive to the chosen engine parameters, the timeframe, and the symbol; different timeframes and different instruments will produce different statistical profiles, and that is by design.
The exponential-hazard flip probability assumes a constant hazard within the current regime, which is a simplification. Real-world regime durations are not perfectly memoryless and the fatigue multiplier is a heuristic correction, not a formal model. The probability is capped at 95% on purpose, because even a heavily aged regime cannot be considered a certainty and the script deliberately avoids certainty language.
The transition matrix is read as a conditional frequency over completed blocks; it is informative about the symbol's own past behavior and should not be interpreted as a forward-looking forecast. Very small samples produce unstable conditional probabilities, which is why stats stay in N/A until a minimum number of blocks is collected.
Regime classification itself reacts to confirmed bars and can change as new data arrives, which is expected for any regime filter. Users who prefer fully non-repainting alerts should rely on the barstate.isconfirmed-gated alert conditions provided.
📜 Risk Disclosure
Trading involves substantial risk of loss and is not suitable for every investor. Past performance is not indicative of future results. This indicator is provided for educational and analytical purposes only and should not be interpreted as financial advice, an investment recommendation or a solicitation to trade. Always combine multiple forms of analysis, manage position size responsibly, and never risk capital you cannot afford to lose. Indicator

Value Migration Bands [AGPro Series]Value Migration Bands
Value Migration Bands is a chart-first value migration engine that visualizes where the market's accepted-value region has been drifting over time. Instead of a single moving average, it builds a three-layer band (upper / middle / lower) from a rolling percentile window of typical price, then classifies the current environment as Rising, Flat, or Falling Value using an ATR-normalized slope of the migration midline. The result is a scale-invariant, regime-aware view of how "fair value" migrates across trending and ranging conditions — on crypto, equities, indices, forex and futures alike.
🔷 OVERVIEW
Most band-style indicators build their envelope from volatility (Bollinger, Keltner, Donchian). Value Migration Bands is built from acceptance — the region where price has actually spent its time during the lookback, captured as a percentile window of typical price (hlc3). The outer bands mark the edges of that accepted-value region. The midline marks its core. When the whole region drifts upward, the market is accepting higher prices (Rising Value). When it drifts downward, lower prices are being accepted (Falling Value). When it stays level, participants are agreeing on a stable range (Flat Value).
This reframes the classic "trend vs range" question in terms of value migration, which is a cleaner structural signal than price slope alone. You see not just where price is going, but where the market's center of gravity is going.
🔶 UNIQUE EDGE
Value Migration Bands is distinct from moving-average envelopes, volatility bands and standard channels in several structural ways:
• Percentile-based construction — the band is a percentile window of typical price, not a standard deviation or ATR multiple. This directly captures acceptance, not dispersion.
• Three-state migration classification — Rising / Flat / Falling Value, driven by an ATR-normalized slope of the midline. The classification is scale-invariant, so the same sensitivity works across BTC, SPX, EURUSD, gold and small-cap equities without retuning.
• Regime-aware event markers — Reclaim and Lost markers are filtered by the current regime. Reclaim events are suppressed when the market is in Falling Value; Lost events are suppressed in Rising Value. You only see the events that matter for the active regime.
• Strict Value Filter — during extreme compression, the indicator refuses to classify a regime until the band is meaningfully wide relative to ATR. This prevents false regime flags in low-volatility micro-bands.
• Distance + cooldown gating — new event markers require a minimum ATR distance from the previous event and a minimum bar spacing, producing a clean chart even on long histories.
🔷 METHODOLOGY
Band construction:
1. Typical price (hlc3) is sampled across a configurable lookback window (Band Length).
2. Two percentiles are computed — a lower percentile and an upper percentile, selected by the Band Width Mode (Tight, Balanced, Wide).
3. The midline is the mean of those two percentiles.
4. Light EMA smoothing (adaptive to Band Length) stabilizes the visual without adding structural lag.
Regime classification:
1. The midline slope is measured over a rolling window (adaptive to Band Length).
2. The slope is normalized by ATR(14) to make the threshold scale-invariant.
3. A user-controlled Migration Slope Sensitivity divides the normalized slope into Rising / Flat / Falling bands.
4. A 2-bar confirmation layer prevents rapid regime flipping during transitions.
Event detection:
• Reclaim — price re-enters the band from below after previously being lost.
• Lost — price falls out of the band after previously being inside.
Both pass a regime gate, an ATR-distance gate and a bar-cooldown gate before being plotted or alerted.
🔶 SIGNALS & ALERTS
Four built-in alert conditions:
• Value Band Shifted Up — fires when the confirmed regime transitions into Rising Value.
• Value Band Shifted Down — fires when the confirmed regime transitions into Falling Value.
• Band Reclaimed — fires when price re-enters the accepted-value region (regime-gated).
• Band Lost — fires when price falls out of the accepted-value region (regime-gated).
Alerts and on-chart markers share identical gating, so the alert log and the chart stay in sync.
🔷 KEY INPUTS
Band Engine:
• Band Length (default 100) — lookback for the percentile window.
• Band Width Mode — Tight, Balanced, Wide. Selects the percentile pair.
• Strict Value Filter — requires a minimum band width vs ATR before classifying a regime.
• Migration Slope Sensitivity (default 0.5) — threshold between Rising / Flat / Falling.
Visuals:
• Show Midline, Show Band Fill, Active State Label, Show Reclaim / Lost Markers, Show Info Panel.
• Panel Location — six options (Top / Middle / Bottom × Right / Left).
• Panel Font Size and Label Font Size — default Normal.
Colors:
• Rising Value Color, Falling Value Color, Flat Value Color.
• Band Fill Opacity.
Alerts:
• Individual toggles for the four alert conditions above.
🔶 HOW TO USE
Structural reading:
• Rising Value — treat Reclaim events as continuation confirmations, not counter-trend signals. Expect pullbacks to the midline to be bought.
• Falling Value — treat Lost events as continuation confirmations. Expect rallies back to the midline to be sold.
• Flat Value — neither regime is active. The band can be used as a range reference; directional events are suppressed because they do not carry regime confirmation.
Location reading:
• Inside Band — price is trading within the accepted-value region. This is the default state.
• Above Band — price is trading above accepted value. In Rising Value, this is constructive; in Falling Value, it is a rally to be evaluated.
• Below Band — price is trading below accepted value. In Falling Value, this is the dominant state; in Rising Value, it is a dip.
Timeframe guidance:
• 1H–4H — best balance for swing use with the default Band Length of 100.
• 15m–1H — reduce Band Length to 40–60 for intraday use.
• Daily — Band Length 100 gives a structural multi-month migration view.
Pairing suggestions:
• Higher-timeframe VMB for bias, lower-timeframe execution tools for entry.
• Combining with volume-based or anchored-VWAP tools can confirm whether value migration is participation-backed.
🔷 LIMITATIONS & TRANSPARENCY
• This is an analytical visualization tool, not a strategy. It does not backtest, does not place orders and does not generate buy / sell recommendations.
• Regime classification is based on historical midline slope. Like all rolling measures, it is a lagging read of structure — it describes what has been happening, not what will happen.
• During abrupt regime changes, the 2-bar confirmation layer introduces a small delay by design, trading reactivity for stability.
• Percentile bands are descriptive of past acceptance. Future acceptance may differ, especially around news events, regime breaks and illiquid sessions.
• The Strict Value Filter can force a Flat reading during extreme compression even when a visual direction appears present; this is intentional and protects against false regime flags.
🔶 RISK DISCLOSURE
This indicator is published for educational and analytical purposes. It is not financial advice, not a trading recommendation and not a guarantee of performance. Trading and investing involve substantial risk, including the risk of total loss. Past behaviour of any instrument does not guarantee future results. Users are solely responsible for their own decisions and should perform their own due diligence, including independent risk management and position sizing.
Published as open-source under the Mozilla Public License 2.0. Feedback, questions and discussion are welcome in the comments.
Indicator

Volatility Shape Classifier [AGPro Series]Volatility Shape Classifier
🔹 Overview
Volatility Shape Classifier is a context and diagnostics tool that does not stop at telling you whether volatility is high or low. Instead it classifies the SHAPE of that volatility on every bar — Smooth, Chaotic, Choppy, Drift, or Dead — using three independent dimensions combined into a single regime read. The result is a continuous visual narrative made of a subtle background tint, throttled transition badges, and a compact metrics panel.
It is designed to sit on your chart as a pure awareness layer. It does not generate buy or sell signals and it is not a trading strategy.
🔷 Unique Edge
Most volatility tools compress the market into one axis — high vs low (ATR, Bollinger Band Width), or trend vs range (Choppiness Index, ADX). They answer half of the question.
This script asks three questions at once and fuses the answers:
1. Magnitude — is ATR above or below its own long baseline?
2. Smoothness — are bar-to-bar moves consistent in size, or erratic?
3. Directional Consistency — do bars point the same way, or cancel each other?
Only the combination of these three can distinguish a controlled trend run (Smooth) from a violent whipsaw (Chaotic) from a wide directionless thrash (Choppy) — all three of which can show identical ATR readings. That shape distinction is the core value this script adds, and it is the gap left by standard volatility and chop indicators.
🔶 Methodology
Engine layer (per bar):
• Volatility Level = ATR(volLen) / SMA(ATR, volLen * 3)
• Smoothness = StDev(|close − close |) / SMA(|close − close |) over volLen
• Direction = |sum(close − close )| / sum(|close − close |) over volLen
Classification layer maps the three readings into six mutually exclusive codes:
0 — Forming (warm-up / in-between space, no tint)
1 — Expansion · Smooth (high vol, low CV, directional)
2 — Expansion · Chaotic (high vol, high CV)
3 — Expansion · Choppy (high vol, low direction)
4 — Low-Vol · Drift (low vol, low CV, mild direction)
5 — Low-Vol · Dead (low vol, low CV, no direction)
Stability layer applies a configurable Confirmation Bars window so a new shape must persist for N consecutive bars before the chart commits to it. This prevents single-bar flicker. Between-state readings do not reset the current shape, they hold it — avoiding the classic "blink to neutral" problem of switch-based classifiers.
🔸 Signals & Alerts
Four alert conditions are published:
• Shape Shifted to Smooth Expansion
• Shape Shifted to Chaotic Expansion
• Shape Shifted to Choppy Expansion
• Shape Collapsed (any expansion state falling into low-vol Drift or Dead)
Alerts fire only on confirmed shape transitions and only on bar close, so repaint on the signal bar is not a concern.
🔹 Key Inputs
• Volatility Length — window for ATR, smoothness, and direction (default 20)
• Confirmation Bars — persistence requirement before committing to a new shape (default 3)
• Badge Cooldown — minimum bars between visible badges (default 15; tint updates continuously regardless)
• Panel Position / Size — six anchor points, four size presets
• Badge Font Size — four size presets
🔷 How to Use
• Use the SHAPE read as a setup filter, not as the signal itself. Smooth Expansion is where trend-following tools tend to perform well. Chaotic and Choppy Expansion are where they tend to fail even when the raw volatility reading looks attractive.
• The Drift state often precedes an expansion in the direction of the drift.
• The Dead state is a compression warning — a shape collapse alert from Expansion into Dead is a common precursor to a fresh expansion move in either direction.
• Pair with your own entry logic (structure, moving averages, volume). This tool answers "what kind of market am I in right now?" — it does not answer "where do I enter?"
🔶 Limitations & Transparency
• Thresholds (1.15x / 0.70x / 0.80 / 1.10 / 0.18) were tuned on crypto and FX data across 15m to 1D timeframes. Very illiquid instruments and very low timeframes (< 5m) may require a longer Volatility Length.
• Shape classification is inherently backward-looking (it reads the last volLen bars). It describes the character of recent volatility, not future volatility.
• The script is a context layer. It is not a strategy and should not be used in isolation for trade decisions.
• Past behavior of a shape does not guarantee future behavior.
🔸 Risk Disclosure
This indicator is an educational and analytical tool. It does not constitute financial advice, trade recommendations, or a signal service. All trading involves risk. You are solely responsible for your own trading decisions. Indicator

Dynamic Acceptance Channel [AGPro Series]Dynamic Acceptance Channel
🔷 Overview
Dynamic Acceptance Channel is an adaptive volatility channel that builds a dynamic upper and lower edge around a robust median midpoint. The channel width breathes with the market's own return distribution and volatility regime, so it naturally widens when the market expands and tightens when it compresses. Every bar is classified as Inside, Breaching, or Respecting the channel, while the width itself is independently tracked as Compressed, Normal, or Expanded. The tool is designed to give traders a clean, consistent framework for reading acceptance, mean-reversion context, volatility squeezes, and adaptive range behavior across crypto, FX, and equities.
🟢 Unique Edge
Most channel indicators on the market rely on a single dispersion model — typically a moving average plus a fixed standard deviation or ATR multiplier. Dynamic Acceptance Channel takes a different route:
▪ Robust median midpoint instead of a simple mean, which stays stable when the market wicks or spikes and is not dragged around by outliers.
▪ Hybrid width model that combines the percentile spread of recent returns with a clamped ATR regime ratio. The user can switch between Hybrid, Return Percentile, or Volatility Regime, depending on whether distribution shape or raw volatility is the priority.
▪ Independent width regime classification (Compressed / Normal / Expanded) ranked against the channel's own history, with hysteresis applied so the regime does not flip-flop around threshold boundaries.
▪ Bar-level state machine (Inside, Breach, Respect) separated from the width regime, so traders can read location and regime as two orthogonal dimensions.
▪ Double-EMA smoothing on both the midpoint and the half-width, producing a calm, professional channel that is readable on any timeframe without looking jagged.
This combination is not found in common Bollinger Bands, Keltner Channels, or generic ATR channels.
🧭 Methodology
The midpoint is computed as a rolling median using linear-interpolation percentile logic, which is statistically more robust than an arithmetic mean when the return distribution is skewed or heavy-tailed. The half-width is then derived from two independent signals. The first is a return-percentile dispersion term: the script measures the 85th and 15th percentiles of recent per-bar returns, symmetrizes them, and scales by the square root of the lookback window to produce a percentile-based half-width proxy. The second is a volatility regime term: the current 14-bar ATR is compared to its own baseline over the adaptive window, and the resulting ratio is clamped between 0.6 and 1.8 to prevent explosive widths during regime shocks. The final half-width is either one of the two terms or their average, depending on the selected model, then scaled by a user-defined global multiplier and smoothed with double EMA. The width regime classification uses linear-interpolation percentiles of the channel width itself over a separate regime lookback, and a 10% hysteresis buffer prevents rapid state flipping around the Compressed and Expanded thresholds.
🎯 Signals & Alerts
▪ Channel Breached — fires on a fresh upper or lower breach, edge-triggered with a minimum three-bar gap to avoid clusters on choppy bars.
▪ Channel Compressed — fires when the width regime transitions into the Compressed state.
▪ Channel Expanded — fires when the width regime transitions into the Expanded state.
▪ Channel Respected — optional, fires when price wicked outside on the prior bar and closed back inside on the current bar, confirming a rejection at the edge.
Visuals include color-coded upper and lower lines, a regime-tinted fill, small circular breach markers on the breached line (no text labels to avoid clutter), and spaced Compressed or Expanded transition labels anchored outside the channel.
⚙️ Key Inputs
Adaptive Engine
▪ Adaptive Length — lookback window for the channel (default 60).
▪ Channel Width Model — Hybrid, Return Percentile, or Volatility Regime.
▪ Width Scale — global multiplier for tightening or loosening the channel.
▪ Channel Smoothing — EMA length for line smoothness.
▪ Strict Breach Logic — close-based versus wick-based breach.
Width Regime
▪ Compression Threshold — percentile below which the width is Compressed (default 25).
▪ Expansion Threshold — percentile above which the width is Expanded (default 75).
▪ Regime Lookback — lookback for the width percentile ranking (default 150).
Visuals
▪ Show Channel Fill, Show Midline, Show Breach Markers, Show Regime Transition Labels, Regime Label Spacing.
Panel
▪ Show / hide panel, Panel Location (6 options), Panel Font Size, Label Font Size.
Alerts
▪ Channel Breached, Compressed, Expanded, and Respected can be toggled independently.
🧠 How to Use
A common reading is to combine channel state with width regime. When the channel is Compressed and price is riding the edges, the market is often preparing for an expansion phase. When the channel transitions into Expanded, continuation on the active edge is more likely than immediate mean reversion. Respect events at either edge during Normal or Compressed regimes often line up with fade opportunities, while breaches during Expanded regimes often line up with trend continuation context. The midline can be used as a dynamic fair-value reference for pullback entries inside the channel. Traders typically overlay this script with their own structure, momentum, or higher-timeframe bias tools rather than using channel events in isolation.
⚠️ Limitations & Transparency
▪ The indicator is a context and structure tool. It does not generate buy or sell decisions and does not claim to identify every meaningful reversal or breakout.
▪ The channel is recomputed each bar from recent data, which means the current bar's channel values can refine until bar close.
▪ Width regime classification is relative to the regime lookback, not absolute. On instruments or timeframes with very low variance, the regime may behave differently than on highly volatile markets.
▪ The ATR ratio is intentionally clamped between 0.6 and 1.8. This prevents explosive widths but also means the channel will not fully mirror extreme volatility shocks; this is a deliberate design choice for readability.
▪ Alerts are configured to fire once per bar close to reduce noise. Intrabar conditions may change until close.
🛡 Risk Disclosure
This script is provided for educational and analytical purposes only. It is not a strategy, not financial advice, and not a trade recommendation. Past channel behavior on any instrument or timeframe does not imply future performance. Users are fully responsible for their own risk management, position sizing, and trading decisions. Indicator

Delivery Regime Map [AGPro Series]Delivery Regime Map
🔹 Overview
Delivery Regime Map classifies the market's delivery character into four distinct regimes — Balanced, Directional, Fragmented, and Exhausted — giving traders instant context on whether the tape is trending with conviction, consolidating, breaking into volatile chop, or fading after an extended move. Rather than asking "is this bullish or bearish?", DRM answers a more useful question: "what kind of market am I in, and what kind of setup is appropriate here?"
The indicator overlays a soft state ribbon across the chart, prints confirmed regime shift labels at the moment of transition, and maintains a compact status panel with the active regime, a composite conviction score, regime duration, and time since the last shift. All outputs are confirmed on bar close with dwell-based hysteresis to suppress noise.
🎯 Unique Edge
Most regime or trend-strength tools collapse the market into a single linear axis (strong ↔ weak, bullish ↔ bearish). Delivery Regime Map is categorical, not linear — it identifies the qualitative character of price delivery by fusing four independent dimensions:
• Displacement quality (how much of each bar's range is body vs. wick)
• Directional persistence (close-to-close consistency + EMA slope alignment)
• Continuity (same-side runs penalized by gap noise)
• Range expansion (current range normalized by ATR baseline)
These dimensions combine into a composite score, but the regime classification uses banded thresholds with hysteresis — meaning a Directional tape must decisively lose its edge before flipping to Fragmented or Exhausted. This produces sparse, high-conviction transitions rather than the constant flipping typical of single-value strength meters.
⚙️ Methodology
The engine computes five rolling metrics across a user-defined window (default 20 bars):
1. Displacement Quality — |close − open| / range, smoothed. High values mean strong, decisive bars with minimal wick rejection.
2. Directional Persistence — average signed close direction plus an EMA slope-alignment check. Rewards tapes that move one way without reversing.
3. Continuity — the proportion of consecutive same-side candles, penalized by an average gap-size term (opens far from prior closes indicate fractured delivery).
4. Range Expansion — current range vs. ATR baseline, clipped to . High expansion combined with low continuity flags Fragmented tapes.
5. Exhaustion Proxy — the decay rate of displacement quality after a period of high persistence. Triggers near trend terminations where bars shrink while direction lingers.
A classifier selects the active regime by priority (Directional → Exhausted → Fragmented → Balanced), and a dwell-bar confirmation (default 5 bars, or 8 under Strict mode) plus a minimum-gap filter (default 10 bars) prevent whipsaw transitions.
🚦 Signals & Alerts
Four alert conditions are built in, each firing only on a confirmed regime shift:
• Regime shifted to Directional — conviction is rising; the tape is trending
• Regime shifted to Fragmented — wide, disconnected bars; chop risk elevated
• Regime shifted to Exhausted — prior trend is losing steam; mean-reversion risk
• Regime shifted to Balanced — low-conviction state; breakout potential building
All alerts include the ticker and interval in the message payload.
🎛️ Key Inputs
• Regime Window (8–60) — length of the measurement window
• Regime Sensitivity (Low / Normal / High) — hysteresis band width
• Strict Classifier — extends dwell requirement from 5 to 8 bars
• Minimum Bars Between Shifts — anti-chop spacing filter
• Show State Ribbon / Regime Shift Labels — visual toggles
• Panel Position + Font Size — 6 anchor positions, 5 size options
• Label Font Size — matches user's chart density preference
Every input carries an inline tooltip explaining its behavior and tradeoffs.
📚 How to Use
• Use Directional regimes to favor trend-following entries and trailing stops
• Use Balanced regimes to prepare for breakouts; volatility compression often precedes expansion
• Use Fragmented regimes as a caution flag — reduce size, widen stops, or stand aside
• Use Exhausted regimes to tighten trailing stops on open trend positions; the edge may be fading
DRM is designed to be asset-agnostic and timeframe-agnostic. On lower timeframes (1m–15m), consider Strict mode and a larger minimum-gap value. On daily charts, defaults typically work well. Combine with any entry framework — order blocks, breakout levels, VWAP reclaims — as a regime filter that answers "should I even be looking for a setup here?"
⚠️ Limitations & Transparency
• The classifier is reactive, not predictive — it confirms regime changes on close, so a Directional label appears a few bars after the trend has begun. This is by design: dwell confirmation is the primary noise filter.
• Regime definitions are categorical interpretations of price statistics. They are not forecasts.
• The composite score reflects regime conviction, not directional bias. A high score in Fragmented means "confidently choppy", not "confidently bullish".
• This indicator is not a strategy. It produces no entry signals, no take-profit targets, and no stop-loss levels. It is a market-context tool intended to be combined with a trader's existing framework.
• Past regime behavior does not guarantee future regime behavior. Market character can change abruptly on news or macro events.
📜 Risk Disclosure
This indicator is published for educational and analytical purposes only. It does not constitute financial advice, a trading recommendation, or an offer to buy or sell any instrument. Trading and investing carry risk of loss, and past performance does not guarantee future results. Users are solely responsible for their own decisions and should consult qualified professionals before committing capital. Indicator

Trend Stability Ribbon [AGPro Series]Trend Stability Ribbon
🔹 OVERVIEW
Most trend tools tell you WHICH WAY price is going. Trend Stability Ribbon tells you HOW WELL it is getting there. By pairing an ATR-normalized slope engine with a Kaufman path-efficiency score, it projects every bar into one of four rules-based states — Stable Up, Noisy Up, Stable Down, Noisy Down — and paints them onto a clean, adaptive ribbon that stays out of the candles' way. The result is a context layer that separates decisive trending from directional-but-choppy travel, without adding a second indicator pane.
🧭 UNIQUE EDGE — WHY THIS IS NOT "JUST ANOTHER TREND INDICATOR"
Direction alone is cheap. Every moving-average cross, every supertrend, every slope color tells you "up" or "down" — and then leaves you holding the bag when the trend is technically up but structurally a mess.
Trend Stability Ribbon adds the missing second dimension: path quality. The same 34-bar window that defines direction also feeds a Kaufman efficiency calculation (net travel divided by total path travel). An ER near 1.00 means price walked a near-straight line; an ER near 0.00 means it zig-zagged its way to the same point. Mapping that score against a calibrated threshold band produces the four composite states — and a visual language that finally distinguishes "trend worth trusting" from "trend worth fading".
Additional design choices that set it apart:
• Dual-layer event engine — direction flips, stability upgrades, and stability downgrades are tracked as independent transitions, each with its own alert.
• Badge/alert separation — on-chart badges are throttled by a cooldown for visual hygiene, but alerts are always raw so automation pipelines never miss an event.
• Reset state — when the slope-confirmation filter rejects a direction, the ribbon goes neutral instead of flipping false. Chop gets ignored, not misreported.
🧪 METHODOLOGY
1. TREND DIRECTION ENGINE
• A slow EMA (default length 34) anchors the trend path and serves as the ribbon centerline.
• Slope is measured over a 3-bar lookback and normalized by a 14-period ATR, making it instrument-agnostic across crypto, FX, equities, and futures.
• With Slope Confirmation enabled (default), direction is only accepted when price position AND slope agree. Disagreement returns a Reset state.
2. PATH EFFICIENCY (STABILITY) ENGINE
• ER = |close − close | ÷ Σ|close − close | over the same trend window.
• Three classes: Stable (ER ≥ 0.45), Noisy (ER ≤ 0.25), Mixed (between). Thresholds scale with the Stability Sensitivity input.
• The Mixed zone is a deliberate dead-band — during uncertain phases the previous state persists rather than flickering.
3. COMPOSITE STATE MACHINE
• Direction × Stability yields five possible states: Stable Up, Noisy Up, Stable Down, Noisy Down, Reset.
• Bars-in-state is tracked live, giving a simple persistence read on each state.
4. RIBBON RENDERING
• Ribbon is anchored to the EMA centerline with height driven by ATR × a user-selected multiplier (Thin / ATR-Adaptive / Thick).
• Fill opacity and border weight shift by state — Stable states are saturated, Noisy states are faded, Reset is a soft amber.
🔔 SIGNALS & ALERTS
Three transition events are detected and exposed as separate, user-toggled alerts:
• Trend State Flipped — direction changed (Up ↔ Down). Raw, never throttled.
• Stability Improved — path upgraded from Noisy to Stable while direction held. Raw — delivered regardless of badge cooldown.
• Stability Degraded — path downgraded from Stable to Noisy while direction held. Raw — delivered regardless of badge cooldown.
Matching on-chart badges appear at the same moments, subject to the Stability Badge Cooldown for visual cleanliness. Direction-flip badges are never throttled.
⚙️ KEY INPUTS
Engine
• Trend Length (default 34) — lookback for both direction and path-efficiency windows.
• Stability Sensitivity (default 1.0) — scales the Stable / Noisy thresholds.
• Require Slope Confirmation (default on) — enforces price-and-slope agreement; rejects chop.
Ribbon & Badge
• Ribbon Height — Thin / ATR-Adaptive / Thick.
• Show State Badge — toggle on-chart transition labels.
• Label Font Size — tiny / small / normal / large (default normal).
• Minimal Mode — hides panel and badges for pairing with other overlays.
• Stability Badge Cooldown (default 5 bars) — visual throttle for stability transitions.
Info Panel
• Panel Position, Panel Font Size, Efficiency Ratio display, Active Thresholds display.
Alerts
• Independent toggles for each of the three transition events.
🧠 HOW TO USE
• CONTEXT FILTER — use Stable states as a "green light" for continuation setups on your primary system; treat Noisy states as a headwind.
• REGIME BREAKS — a Stability Degraded event mid-trend is often an early warning that the move is maturing, even before price has flipped.
• CLEAN ENTRIES — pair a direction flip (Trend Up / Trend Down) with an immediate Stable classification to filter out whipsaw-prone breakouts.
• CHOP AVOIDANCE — when the ribbon sits in a Reset or Mixed state, the script is telling you the underlying path is not tradeable as a trend. Stand aside or switch to range tactics.
• PAIRING — with Minimal Mode on, the ribbon layers cleanly under structure tools, VWAPs, or S/R zones without visual conflict.
⚠️ LIMITATIONS & TRANSPARENCY
• This is an indicator, NOT a strategy. It does not generate buy or sell orders, has no backtest, and makes no claim of performance.
• Efficiency Ratio is a lagging measure — it describes the path already travelled. The ribbon should be read as context, not as a leading signal.
• The Mixed zone is intentional persistence; expect the composite state to hold through brief chop rather than flipping on every bar.
• Lower timeframes (<5m on thin-liquidity markets) can push ER values into erratic ranges. Start with the defaults on 15m–4h and tune from there.
• All calculations are closed-bar. Intra-bar values may shift until the bar confirms.
🛡️ RISK DISCLOSURE
This script is published for educational and analytical purposes only. It is not financial advice, not a signal service, and not a solicitation to buy or sell any instrument. Past behavior of markets does not predict future results. Always do your own research, apply proper risk management, and consult a licensed professional before making trading decisions. The author assumes no responsibility for losses incurred through use of this indicator. Indicator

MTF Trend Agreement Map [AGPro Series]MTF Trend Agreement Map
🔹 **Overview**
MTF Trend Agreement Map is a multi-timeframe alignment engine that reads the trend across five timeframes at once and distills the result into a single transparent agreement score. Instead of forcing you to flip between charts, the map tells you, on every bar, how many timeframes agree, which side wins, and whether the market is in a locked regime, a forming trend, or a conflict phase. It is built for swing traders, HTF-bias scalpers, position traders, and anyone who uses top-down analysis as part of their process.
🔸 **What Makes It Different**
Most MTF indicators show a single method (usually a moving-average cross) repeated across timeframes, which means five rows that all agree with each other by construction. This map does something different: for each timeframe it runs three independent methods — an EMA regime filter, a pivot-based market-structure read (HH/HL vs LH/LL), and a normalized momentum slope — and blends their individual votes into the final score. You see not only the agreement across timeframes but also the agreement across methods, which exposes weak or borderline regimes that a single-method tool would quietly hide.
🔺 **Methodology**
• EMA Trend: a timeframe is bullish when EMA50 is above EMA200 and price is above EMA50; bearish on the mirror condition; neutral otherwise.
• Market Structure: confirmed pivots are tracked in real time. A timeframe is bullish while the last two confirmed swings form higher highs and higher lows, bearish on lower highs and lower lows.
• Momentum Slope: the change in linear regression across a configurable lookback, normalized by ATR so that fast and slow assets are comparable.
• Consensus per timeframe: each active method casts a vote; bulls minus bears determines the row's net direction and strength.
• Overall alignment: bull and bear votes are summed across all active timeframes; the dominant side's share defines the agreement percentage.
◆ **Three-State Regime Engine**
• **LOCKED** — agreement above the strong threshold (default 80%). High-conviction regime, continuation-friendly, background tint activates.
• **TRENDING** — agreement between 50% and the strong threshold. Directional bias forming but not yet fully aligned. Trade with reduced size or wait for confirmation.
• **SPLIT** — agreement below 50%. Timeframes are in conflict, no majority side. Classic chop phase, favors mean-reversion strategies or standing aside.
🔔 **Signals & Alerts**
• Regime Lock (Bull or Bear): fires the first bar agreement crosses above the strong threshold while one side dominates. Designed as a continuation trigger, not a reversal signal.
• Chop / Conflict: fires when no side holds the majority, a classic filter for mean-reversion systems or a stand-aside cue for trend traders.
• Both generic and directional alertcondition() hooks are exposed so you can wire the map into automations.
⚙️ **Key Inputs**
• Core Engine: toggle any of the three methods on or off, and tune the pivot length and momentum lookback independently.
• Timeframes: four user-selected timeframes plus an optional Current row that auto-adapts to the chart TF. If the chart TF matches any selected TF, the Current row is hidden automatically to avoid double-counting.
• Panel: six location presets, four text sizes (default Normal), dark or light theme, optional per-method breakdown row.
• Background Tint: enable or disable, set the strong-alignment threshold (50–95%) and control transparency (70–99) to keep the chart premium.
📖 **How to Use**
• Top-down confirmation: take trades on your execution timeframe only when the higher rows in the map agree with your thesis.
• Regime filter: enable Regime Lock alerts to catch moments when the full map snaps into alignment — these are typical continuation windows.
• Conflict filter: when the map prints SPLIT, widen stops, reduce size, or step aside; trend strategies historically underperform during these phases.
• Method debugging: turn on the per-method breakdown to see which methods are driving the score and which are fighting it.
⚠️ **Limitations & Transparency**
• All timeframe values are non-repainting at bar close (lookahead is disabled), but intrabar values can update until the parent bar closes — this is expected MTF behavior.
• Market Structure requires enough history on each timeframe to confirm two swings; on very young assets or short charts the structure vote may be neutral until pivots print.
• The map is a context tool, not a standalone entry system — combine it with your own execution logic, risk management, and bias.
📌 **Risk Disclosure**
This script is provided for educational and analytical purposes only. It does not constitute financial advice, a recommendation, or a solicitation to trade any instrument. Markets involve substantial risk and past behavior does not guarantee future results. Always do your own research and manage risk responsibly. Indicator

Indicator

Multi-Oscillator Consensus Engine [AGPro Series]Multi-Oscillator Consensus Engine
🔹 Overview
Multi-Oscillator Consensus Engine aggregates ten independent momentum
oscillators into a single regime classifier with overlay Consensus Zones,
flip event labels, and agreement persistence tracking. Instead of watching
ten charts separately, traders see one unified answer: are the oscillators
in agreement, and what is the consensus saying right now?
The script monitors RSI, Stochastic, CCI, MFI, Williams %R, ROC, Ultimate
Oscillator, MACD, DMI balance, and Aroon balance. Each oscillator is
normalized to a 0–100 scale and votes bullish, bearish, or neutral against
configurable thresholds. The aggregated vote determines the market regime
and drives everything else on the chart.
🔹 Unique Edge
Most multi-oscillator tools stop at a dashboard or a simple agreement
percentage. This engine goes further:
- Regime Classification — four distinct states (Consensus Bull, Consensus
Bear, Divergent, Transition) instead of a binary signal.
- Consensus Zones — a horizontal price zone is born at every regime flip
and stays alive while the regime holds. When the regime ends, the zone
becomes historical structure.
- Flip Event Labels — regime transitions are marked directly on price
with merged flip + extreme agreement tags.
- Persistence Tracking — streak bars, last flip distance, and historical
extreme rate tell you how trustworthy the current consensus is.
- Label Discipline — cooldown, horizontal stagger, and flip+extreme merge
logic keep the chart readable even in choppy regimes.
🔹 Methodology
Step 1. Ten oscillators are computed with their classic defaults and
normalized to a 0–100 range. Indicators with native 0–100 output (RSI,
Stochastic, MFI, Ultimate) pass through directly. Others (CCI, ROC, MACD
histogram) are rescaled against their own recent range. Williams %R is
flipped from its native -100..0 scale.
Step 2. Each normalized oscillator casts a vote. Values above the bullish
threshold vote +1, values below the bearish threshold vote -1, everything
else is neutral. Vote counts and agreement percentage are computed bar by bar.
Step 3. Regime is assigned from the vote distribution. Seven or more votes
in one direction triggers Consensus Bull or Consensus Bear. A tight spread
(bull-bear difference ≤ 2) triggers Divergent. Everything else is a
Transition state.
Step 4. On every bull↔bear regime entry, a new Consensus Zone is born at
the current close ± a configurable ATR multiple. The zone extends forward
while the regime is active and locks in place when the regime ends. A
maximum of five active zones keeps the chart clean.
Step 5. Labels are rendered only when cooldown and merge rules allow.
Extreme agreement events (80%+ by default) are either merged into the flip
label or drawn separately with larger offset.
🔹 Signals & Alerts
Seven alert conditions ship with the script:
- Consensus Bull Entry — regime has just entered Consensus Bull
- Consensus Bear Entry — regime has just entered Consensus Bear
- Consensus Bull Flip — direct Bear → Bull transition
- Consensus Bear Flip — direct Bull → Bear transition
- Extreme Bullish Agreement — agreement crosses the extreme threshold up
- Extreme Bearish Agreement — same, on the bearish side
- Consensus Streak 20+ — current regime has held for twenty bars
🔹 Key Inputs
- Oscillator Periods — individual length settings for all ten oscillators
- Bullish / Bearish Thresholds — the normalized levels that define a vote
- Consensus Threshold — how many oscillators must agree for a regime (default 7/10)
- Extreme Agreement — agreement percentage for extreme events (default 80%)
- Consensus Zones — show/hide, ATR length and multiplier, max active count,
closed zone trail
- Label Cooldown — minimum bars between flip labels, prevents clutter
- Merge Flip + Extreme — combine same-bar events into one label
- Panel — six location options, Dark/Light theme, font sizes
🔹 How to Use
Trend traders: wait for a Consensus Bull or Consensus Bear regime to
establish (streak > 5 bars), then use pullbacks into the active Consensus
Zone as entries in the regime direction. Exit on opposite regime flip.
Reversion traders: Extreme Agreement events mark moments where all
oscillators are stretched in the same direction. These are classic mean
reversion setups. Wait for a regime flip against the extreme, confirmed on
the next bar.
Regime filter: overlay the panel on any chart and use the Regime and
Agreement readings as a binary filter for your primary system. Only take
longs when regime is Bull, only take shorts when regime is Bear.
Works on all timeframes from 1m to 1W. Higher timeframes produce fewer
but higher-conviction signals.
🔹 Limitations & Transparency
- The oscillator votes use normalized thresholds. On extremely narrow
ranges, the normalization may produce unstable votes. Raising the
Bullish/Bearish Thresholds reduces this sensitivity.
- Consensus Zones are drawn from close price at the flip bar. Large wick
bars may place the zone slightly away from the visual pivot.
- The script is not a standalone trading system. It is a confluence and
regime tool to combine with your own structure, volume, or price action
analysis.
- All signals repaint only within the current forming bar. Once a bar
closes and barstate.isconfirmed is true, flip labels and zones are final.
🔹 Risk Disclosure
This indicator is provided for educational and analytical purposes only.
It is not financial advice. Trading involves substantial risk. Past
behavior of regime transitions does not guarantee future performance.
Always use proper risk management and never risk more than you can afford
to lose. Indicator

Yield Curve Regime Yield Curve Regime – Pro Edition
=== WHAT IT DOES ===
This indicator classifies the U.S. Treasury yield curve into six canonical
regimes by comparing the current behavior of a short-maturity yield
(default 2Y) and a long-maturity yield (default 10Y) against their values
N bars ago. It paints the chart background (or bar color) with the
regime color and renders a modular on-chart dashboard showing the active
regime, a curve-delta trend arrow, live yield snapshots, a quantitative
strength score, multi-horizon confluence, dwell-time, rolling regime
frequencies, and a transition log.
=== WHY IT IS DIFFERENT ===
Most public yield-curve scripts plot the 10Y-2Y spread or flag a single
inversion event. This script decomposes every curve move into the two
dimensions that actually matter for fixed-income interpretation:
1) Curve direction : did the spread steepen or flatten?
2) Yield direction : did short and long yields rise or fall?
Crossing these dimensions produces six distinct regimes, each with a
different macro meaning. A +10 bp move in the 2s10s spread can be a
"Bull Steepener" (Fed easing – risk-on friendly) or a "Bear Steepener"
(inflation / term-premium driven – risk-off friendly). Flagging only
the spread hides that distinction; the six-regime framework exposes it.
On top of that six-regime base, this indicator adds four analytical
layers that, to the best of our knowledge, are not combined in any
existing public yield-curve script:
• A Z-score-based Strength score (0–100) that quantifies *how
convincing* each regime is instead of treating it as a binary flag.
Calibrated so |Z| = 2.0 (the 95 % confidence band) maps to 100.
• A Multi-Horizon Confluence score (0/3, 1/3, 2/3, 3/3) computed by
running the same regime detection on three independent offsets
(fast / mid / slow) and measuring agreement across horizons.
• A Dwell-Time counter plus a rolling history of the last N regime
transitions, so the viewer can see not just the current regime
but its persistence and transition path.
• A rolling Regime-Frequency statistic showing what percentage of
the last freqLen bars each regime occupied, rendered as an inline
bar and a precise percentage in a dedicated dashboard block.
These are genuine additions to the calculation – not cosmetics.
All of them are visualized in the on-chart dashboard so the reader
can consume the extra information at a glance.
=== THE SIX REGIMES (core logic) ===
Let curve = longRate - shortRate, compared against its value "offset"
bars ago. A regime fires when all three conditions hold simultaneously:
Bull Steepener : curve widens, short falls, long falls
(short falls faster – classic early easing cycle)
Bear Steepener : curve widens, short rises, long rises
(long rises faster – inflation / term premium / supply)
Steepener Twist : curve widens, short falls, long rises
(reflation pivot / policy-vs-inflation divergence)
Bull Flattener : curve narrows, short falls, long falls
(long falls faster – flight to quality / recession bid)
Bear Flattener : curve narrows, short rises, long rises
(short rises faster – aggressive Fed tightening)
Flattener Twist : curve narrows, short rises, long falls
(stagflation signal / tightening into weakness)
Exactly one regime fires per bar (the six conditions are mutually
exclusive by construction). When none triggers, the background stays
clean.
=== HOW TO READ THE DASHBOARD ===
• Header row – ticker + timeframe context.
• Active row – the regime currently firing, tinted in its own
color, with a ▲ / ▼ / ▬ arrow showing the signed
change of the curve over the fast offset window.
• Strength bar – █-fill from 0 to 100 plus the exact score.
• Confluence row – ●●● / ●●○ / ●○○ / ○○○ plus score 0/3 … 3/3.
• Dwell row – bars elapsed inside the current regime.
• Yields block – live short, long, and curve values.
• Legend block – every enabled regime with a colored dot and a
live "● aktiv" / "○ ruhend" status.
• Frequency block – each regime's share of the last freqLen bars,
shown as a 10-step bar plus exact percentage.
• Transitions – a log of the most recent regime changes
(newest first).
• Background/bars – tinted in the active regime's color, optionally
dimmed when Strength is low.
=== HOW TO READ THE ANALYTICAL LAYERS ===
• Strength bar (█████░░░░░ 65 / 100) – the farther right it fills,
the more statistically significant the regime move is relative to
its rolling volatility. Calibrated so a Z-aggregate of 2.0 (roughly
the 95 % band of a normal distribution) maps to a score of 100.
• Confluence (●●○ 2/3) – how many of the three horizons confirm the
fast-horizon regime. 3/3 is a strong multi-timeframe signal; 1/3 is
fast-only; 0/3 means no active regime on any horizon.
• Dwell – bars elapsed inside the current regime. Useful for spotting
exhausted vs. freshly-started regimes.
• Frequency – every regime's rolling share of the freqLen window,
letting you see at a glance which regime has dominated the current
macro cycle.
• Transitions – a compact log of the most recent regime changes.
=== SETTINGS (all inputs are grouped and collapsible) ===
• Symbols & Offset – pick any two yield tickers plus three lookback
windows (fast / mid / slow) for confluence.
• Detection – rolling window for frequency statistics,
maximum stored transitions.
• Display – background vs. bar coloring, transparency,
optional strength-coupled transparency.
• Regime selection– enable/disable any subset of the six regimes.
• Color palette – fully user-overridable regime colors.
• Dashboard – master toggle, compact mode (active regime only),
independent per-section toggles for header,
active+strength, confluence, dwell, yields,
legend, frequency, and transitions, plus
configurable position and text size.
=== HOW TO USE IT ===
• As a macro / risk-regime filter on SPX, NDX, DXY, TLT, HYG, BTC,
gold or any risk-sensitive instrument: the regime in force often
explains why cross-asset correlations are behaving the way they are.
• To disambiguate yield-curve headlines: a "curve is steepening"
print means something very different if it is a Bull Steepener vs.
a Bear Steepener; this indicator answers that question at a glance.
• To study historical regime transitions: switch background mode on
and scroll back through past cycles to see how regimes clustered
around recessions, pivots, and inflation shocks.
• The offset inputs let you tune sensitivity: 1 bar for intraday
regime nowcasting, 5–20 bars for swing and macro framing.
=== NOTES & LIMITATIONS ===
• Defaults to US02Y and US10Y but accepts any two yield symbols –
not hard-coded to U.S. Treasuries; works on Bund, Gilt, JGB curves
if the data is available on your plan.
• Regimes are evaluated on bar-close comparisons and can flip
intrabar on lower timeframes; use daily or weekly for stable macro
readings.
• The Strength score relies on rolling standard deviations over a
50-bar window. On low-liquidity / low-frequency data the σ estimate
can be unstable for the first 50 bars after loading.
• Multi-Horizon Confluence runs the raw regime detection on mid and
slow offsets, so slower horizons can confirm a faster signal even
when their Δcurve is small – this is by design, not a bug.
• The Steepener Twist and Flattener Twist cases are structurally
rarer than the four main regimes and often mark transitions rather
than trends – treat them as context, not as standalone signals.
• This is an analytical / visual tool, not a buy/sell system. It does
not generate entries, exits, or forecasts.
Indicator

Convergence Protocol [JOAT]
Convergence Protocol
Introduction
Convergence Protocol is an open-source strategy that combines four analytical modules — structural trend, volatility regime, delta pressure, and liquidity/structure break detection — into a multi-pathway entry and exit system. The strategy generates trade signals through five independent entry mechanisms, each requiring alignment between different analytical dimensions, and manages positions with ATR-based stops, dual take-profit levels, and an optional trailing stop that activates after the first target is reached.
The design rationale for combining these four modules is that each answers a different question about the market. Structure and trend analysis answers: what direction is the market likely to move? Volatility regime answers: does the market have the energy to sustain a directional move? Delta pressure answers: is volume supporting the proposed direction? Liquidity and structure break detection answers: has the market made a meaningful structural commitment that confirms directional intent? No single module alone provides a robust enough basis for a trade. Convergence across multiple modules provides a higher-quality signal set that reduces the frequency of marginal trades while maintaining enough opportunities to be practical.
Strategy Properties and Backtesting Settings
Default settings used for publication:
Initial Capital: Default PulseWire account size
Position Size: 5% of equity per trade
Commission: 0.04% per side (realistic for most crypto and equity platforms)
Slippage: 1 tick
Risk Per Trade: 5% of equity maximum (within sustainable limits)
Stop Loss: 1.5x ATR from entry
TP1: 1.2x risk (50% of position closed)
TP2: 2.5x risk (remaining position)
Trailing Stop: 1.0x ATR trailing offset, activates after TP1 hit
Backtesting results will vary significantly by instrument and timeframe. This strategy is intended to be evaluated across multiple instruments and market conditions before drawing conclusions. A single backtest run does not constitute evidence of future performance.
Core Modules
Module 1: Structural Trend Engine
The baseline uses a double-smoothed moving average (SMEMA). Swing highs and lows are tracked to classify market structure as bullish (HH+HL), bearish (LH+LL), or neutral. A 0-7 confluence score is assembled from: regime direction, structural alignment, volatility expansion, absence of squeeze, delta pressure, structure break confirmation, and liquidity sweep confirmation. Each module contributes a binary point to the score.
Module 2: Volatility Regime
Short-period ATR is compared to long-period ATR. A ratio above 1.05 with a rising oscillator confirms volatility expansion — the market has enough energy for directional moves. A squeeze condition (fast ATR well below slow ATR and its own moving average) signals that the market is coiling; entries are filtered or blocked depending on settings.
Module 3: Delta Pressure
Bar-by-bar delta (positive on bullish bars, negative on bearish bars) is smoothed into fast and slow EMAs. Their cross and relative position provide a directional bias from the volume perspective.
Module 4: Liquidity and Structure
A break of structure (BOS) is confirmed when price closes beyond the most recent pivot in any direction on a confirmed bar. Liquidity sweeps are detected when price wicks beyond a prior swing and closes back on the correct side. Both conditions contribute to the confluence score.
Entry Mechanisms
1. Confluence Score Entry
All four modules must be aligned and score at or above the minimum threshold (default: 2 of 7). This is the primary high-conviction entry.
2. Baseline Pullback Entry
In an established trend (regime confirmed), when price returns to within the step band of the baseline with positive delta confirmation, a pullback entry is generated. This produces more frequent entries by adding trend-continuation trades within an established directional move.
3. Squeeze Breakout Entry
When a detected squeeze condition resolves (squeeze ends) with trend and delta alignment, a breakout entry fires. This targets the expansion phase immediately following volatility compression.
4. Delta Crossover Entry
When the fast delta EMA crosses above the slow delta EMA in the direction of the regime, and the market is not in a squeeze, a momentum entry is generated.
5. Sweep Reversal Entry
When a liquidity sweep occurs with confirming delta pressure, a reversal entry is generated in the direction of the sweep reversal. This targets the classic sweep-and-go pattern.
Exit Logic
TP1: 50% of position closed at 1.2× risk. Locks in partial profit and reduces position size for the remainder of the trade
TP2: Remaining 50% targets 2.5× risk with a hard stop at the original stop level
Trailing Stop: After TP1 is hit, the strategy optionally converts to a trailing stop with an ATR-based offset, allowing the winning portion of the trade to capture extended moves
Regime Exit: If the market regime flips against the position (bullish regime while short, or bearish regime while long), the position is closed at market. This protects against holding trades through structural regime reversals
Limitations and Considerations
The strategy uses OHLCV-based calculations throughout. It does not have access to tick data, order book information, or real-time execution data that institutional traders use
Backtesting results are inherently optimistic due to perfect execution assumed at bar close prices. Real-world execution will differ
The five entry mechanisms produce different trade frequencies. Users should evaluate each mechanism independently in backtesting before enabling all simultaneously
The regime change exit can produce early exits in choppy markets where the regime briefly flips before resuming the original direction
The trailing stop activation after TP1 is a fixed ATR offset from the highest/lowest price reached. It does not adapt to subsequent volatility changes during the trade
The strategy is designed for trending markets. In persistent ranging environments, the confluence score-based entries will underperform because the regime module will frequently return a Ranging classification, suppressing primary entries
Commission and slippage settings in the strategy Properties should be adjusted to match the actual costs on the instrument and broker being used before drawing any performance conclusions
Originality Statement
This strategy is original in its specific multi-pathway entry architecture and the unified 0-7 confluence scoring system that synthesizes structural, volatility, delta, and liquidity analysis into a single conviction metric. Each of the five entry pathways serves a distinct market condition: confluence entries target high-alignment setups; pullback entries target trend continuation in established moves; squeeze breakout entries target volatility expansion transitions; delta crossover entries target momentum initiation; sweep reversal entries target institutional accumulation/distribution patterns. No single existing strategy approach covers all five scenarios. The combination is justified because these five market conditions occur at different points in the market cycle, and a strategy limited to one condition type will sit idle during the other four.
Disclaimer
This strategy is provided for educational and informational purposes only. Past backtest results do not guarantee future performance. No backtesting result should be interpreted as evidence that this strategy will be profitable in live trading. Markets change, and conditions that produced past results may not recur. The strategy does not account for taxes, broker requirements, or psychological factors in live trading. Always use proper risk management and consult with a qualified financial professional before making any investment decisions. The author is not responsible for any losses incurred from using this strategy.
-Made with passion by officialjackofalltrades
Strategy

Volatility Terrain Engine [JOAT]
Volatility Terrain Engine
Introduction
Volatility Terrain Engine is a pane-based oscillator that measures the current volatility regime using the ratio between a fast ATR and a slow ATR, combined with a percentile rank of current volatility within a historical window. The indicator classifies every bar into one of three states — Expansion, Compression, or Transition — and identifies squeeze conditions (volatility compressing well below its average) and expansion bursts (volatility accelerating rapidly). The oscillator, centered at zero, makes it immediately clear whether volatility is expanding or contracting relative to its baseline.
Volatility regime is one of the most underappreciated dimensions of market analysis. A trend-following strategy applied during volatility compression produces poor results because the market is not moving directionally with sufficient energy. A mean-reversion strategy applied during volatility expansion gets stopped out repeatedly because the market is generating outsized moves. Identifying the current volatility terrain before applying any strategy is a prerequisite for selecting the appropriate approach.
Core Concepts
1. Fast/Slow ATR Ratio
The primary oscillator compares a short-period ATR (default 14) against a long-period ATR (default 100). Their ratio, centered at 1.0, is shifted to center at 0.0 by subtracting 1. Values above 0 mean recent volatility is expanding relative to the longer-term baseline; values below 0 mean it is contracting. This ratio is more informative than ATR alone because it provides context — the same ATR value means different things in a historically volatile versus historically calm market.
2. Percentile Rank
The ATR percentile rank answers: where does today's volatility sit within its historical distribution? A 90th percentile reading means volatility is higher than 90% of observations in the lookback period. This is used to classify whether the current environment is historically extreme or within normal parameters.
3. Squeeze and Expansion Burst Detection
A squeeze is defined as fast ATR falling below 82% of slow ATR and also below its own 20-bar average. This double condition filters single-bar dips. A squeeze represents stored energy — the market is coiling. An expansion burst is defined as the ATR ratio exceeding 1.25 with the fast ATR making successive higher values. This marks the initial stages of a volatility explosion.
4. Signal Line and Histogram
The oscillator is triple-processed: EMA of ratio → SMA signal → histogram. The histogram shows the divergence between the oscillator and its signal, providing a leading read on whether volatility momentum is building or fading.
Features
Volatility Regime Oscillator: Gradient-colored histogram bars centered at zero
Squeeze Detection: Dashboard alert and dot marker when squeeze conditions are active
Expansion Burst Markers: Dot markers when volatility breaks out from compression
ATR Percentile Band: Normalized ATR rank plotted as a secondary line
Zone Fills: Expansion and compression zones filled with transparent color
8-Row Dashboard: Regime, ATR values, ratio, percentile rank, squeeze status, oscillator values
Input Parameters
Fast ATR Period: Short-term volatility measurement (default: 14)
Slow ATR Period: Long-term volatility baseline (default: 100)
Percentile Lookback: Historical window for rank calculation (default: 252)
Signal Smoothing: Signal line period (default: 9)
Expansion, Compression, and Transition color inputs
How to Use This Indicator
Compression → Expansion Transition
The most significant signal is when a squeeze resolves into an expansion burst. This represents a volatility state change — the market has been coiling and is now releasing energy. The direction of that release is not predicted by this indicator; it must be determined using price structure and other context.
Oscillator Zero Cross
The oscillator crossing from negative to positive territory indicates that short-term volatility has exceeded the long-term baseline. This is not a trade signal — it is a condition indicator confirming that the market is entering a higher-energy phase.
High Percentile + Expansion
When the oscillator is in expansion territory and the ATR percentile rank is above 80, the market is experiencing historically significant volatility. Stops must be sized accordingly.
Limitations
ATR is backward-looking. Sudden volatility spikes from news events will appear in the oscillator only after those bars close
The squeeze condition uses fixed multipliers (0.82 for the ATR ratio threshold). Markets with different typical volatility profiles may require adjustments to these thresholds
The percentile lookback of 252 bars requires approximately one year of daily data or equivalent for the rank to be historically meaningful. On shorter data sets the rank will be computed on whatever bars are available but will be less statistically robust
This indicator classifies current conditions only. It does not predict when a squeeze will resolve or in which direction
Originality Statement
The dual-ATR ratio approach combined with percentile ranking provides more contextual information than either measure alone. The squeeze detection using a double condition (ratio below threshold and below its own moving average) produces more reliable squeeze identification than a single-condition approach. The four-state histogram coloring (expanding positive, fading positive, expanding negative, fading negative) provides more nuanced momentum information than standard positive/negative coloring.
Disclaimer
This indicator is for educational and informational purposes only. Volatility regime classification does not predict price direction. A squeeze does not guarantee a subsequent expansion, and the direction of any expansion is unknowable from volatility data alone. Always use appropriate risk management.
-Made with passion by officialjackofalltrades
Indicator

Kaufman Efficiency Ratio Gate [NovaLens]Kaufman Efficiency Ratio Gate is a regime classifier that separates trending markets from choppy ones. Instead of plotting a raw ratio and leaving you to interpret thresholds, it ranks the current Kaufman Efficiency Ratio within its own recent history and outputs a binary gate: trend-favorable or chop-dominant. Five timeframe-specific presets ship ready to use - pick the one matching your chart.
◉ HOW IT WORKS
The Efficiency Ratio measures how much of price's total movement was directional over N bars:
ER = |Close - Close(N)| / Σ|Close(i) - Close(i-1)|
A value near 1.0 means price moved in a straight line - maximum efficiency. A value near 0 means price covered distance but went nowhere net - noise. Perry Kaufman introduced this in "Trading Systems and Methods" (1995) as the foundation for his Adaptive Moving Average.
Raw ER values are hard to threshold because what counts as "efficient" varies by asset and timeframe. This gate solves that with a three-stage pipeline:
• Light EMA smoothing - removes single-bar noise from the raw ER without adding meaningful lag (Smoothing = 2 for most presets).
• Percentile rank - ranks the smoothed ER within its own rolling window. A reading at the 70th percentile means the current efficiency is higher than 70% of recent history. This is what makes the gate self-normalizing. A "trending" efficiency ratio for Gold might sit at 0.45, while for a volatile altcoin it might be 0.25 - the gate adjusts automatically to each asset's own baseline, so you never need to guess at fixed thresholds.
• Symmetric hysteresis - the gate opens when rank crosses above the median + Stability/2, and closes when rank drops below the median - Stability/2. This prevents flicker at the boundary. A small buffer (Stability = 2) is enough because KER is already a clean ratio.
Other regime tools approach this differently. ADX measures trend strength through smoothed directional movement - it tells you how strong a trend is, but its fixed scale means a reading of 25 carries different weight on different instruments. The Choppiness Index compresses ATR relative to the window's price range into a 0-100 scale - useful, but sensitive to window length and not inherently normalized. The Efficiency Ratio takes a more direct route: what fraction of total movement was net directional? And the percentile-rank layer on top makes that reading self-normalizing across any asset or timeframe - no manual threshold tuning required.
The result is a binary state: trend-favorable (gate open) or chop-dominant (gate closed).
◈ HOW TO READ IT
• Teal background / teal hero line - Gate open. The market's directional efficiency is above its recent median. Trend-following setups tend to perform better in this environment.
• Amber background / amber hero line - Gate closed. Efficiency is below the median - price is moving but not going anywhere. Trend-following setups historically tend to underperform in this environment.
• Bright teal (strong trend) - Smoothed KER is in the top 25% of its recent rank window. The trend is unusually clean - continuation setups tend to be cleaner in this state.
• Bright amber (strong chop) - Smoothed KER is in the bottom 25%. Noise is dominant - even range-bound strategies may find fewer clean entries. Generally a low-opportunity environment.
The info panel (top-right) shows the current gate state, smoothed KER value, percentile rank, and a momentum readout (strengthening / weakening / stable) based on how the rank has moved over the last few bars.
✦ HOW WE USE IT - REGIME FILTER
In systematic trading, the Efficiency Ratio often serves as one of the regime filters applied before a trend-following signal gets capital allocation. The idea is to confirm that the market is actually trending efficiently, not just moving.
When the gate is open (teal), directional efficiency is elevated. Pullback entries, breakout continuations, trend-following MA crosses - these setups tend to perform better because price is converting movement into net progress. When the gate closes (amber), the same setups historically tend to underperform. Price is volatile but going nowhere. In choppy regimes, trend-following systems generally struggle, and while mean reversion may be more favorable, it remains a harder environment to trade overall. Many systematic traders use this kind of regime awareness to reduce exposure or adjust position sizing rather than forcing directional bets.
The gate works well as a context overlay alongside other entry signals. It doesn't indicate which direction to trade, but it helps characterize whether the current environment is rewarding directional movement at all.
What the gate is NOT: a forward predictor. It classifies the recent past. A gate-open reading means efficiency has been high - it doesn't guarantee the next bar will trend. It's a filter, not a crystal ball.
◆ OTHER APPLICATIONS
• Entry filter - pair with any trend-following signal (MA cross, breakout, RSI) and add a gate-open condition. Filtering out chop regimes can help reduce whipsaw entries.
• Multi-timeframe confirmation - checking the gate on a higher timeframe before entering on a lower one can add confidence. For example, a Daily gate-open reading alongside a 4H trend entry.
• Regime-aware sizing - some traders scale position size with regime state, increasing exposure during gate-open periods and reducing it when the gate closes.
• Alert-driven workflow - set alerts on gate open/close transitions and check your trend setups only when the gate fires.
⚙ SETTINGS
Preset (default: Daily) - Timeframe-specific parameter bundles. Select the one matching your chart resolution:
• Weekly - KER 10, Smoothing 2, Rank Window 100, Stability 2. Long context window for position traders.
• Daily - KER 8, Smoothing 2, Rank Window 50, Stability 2. The default. Works well on most daily charts.
• 8H - KER 8, Smoothing 2, Rank Window 50, Stability 2. Starting point same as Daily - validate on your own 8H charts.
• 4H - KER 14, Smoothing 2, Rank Window 30, Stability 2. Wider KER period compensates for noisier intraday data.
• 30m - KER 5, Smoothing 5, Rank Window 30, Stability 2. Short KER period with heavier smoothing for fast charts.
• Custom - Drive the gate from the four inputs below.
KER Period - Lookback for the raw Efficiency Ratio. Shorter (5-8) reacts faster to regime changes. Longer (14-20) gives more stable readings but lags transitions.
Smoothing - EMA applied to the raw KER. Set to 1 for no smoothing. KER is self-normalizing by construction, so low values (1-5) are usually enough.
Rank Window - Rolling window for the percentile rank. Controls how much recent history defines "typical." Shorter windows adapt faster; longer windows give more stable context.
Stability - Hysteresis half-width around the 50th percentile. At 0, the gate flips the instant rank crosses the median. At higher values, the gate requires a stronger signal to switch state. Low values (2-5) work well since KER is already a clean signal.
Display toggles:
• Show Raw KER - thin white line showing the unsmoothed ratio
• Show Median - 50th-percentile reference line on the smoothed KER
• Show Background - teal/amber background wash (turn off if your workspace already signals the regime elsewhere)
• Show Info Panel - gate state, KER, rank, and momentum readout
• Light Theme - flips panel colours for light chart backgrounds
△ LIMITATIONS
• Backward-looking - the gate classifies recent efficiency, not future direction. Regimes can shift faster than the rank window catches, especially around news events.
• Directionless - both strong uptrends and strong downtrends produce gate-open readings. A separate directional indicator is needed to determine which side to trade.
• Noise on thin instruments - short KER periods on low-volume assets can produce noisy readings even with smoothing.
• History requirement - percentile rank needs sufficient data to be meaningful. The first ~50-100 bars on any chart (depending on preset) will have unstable rankings.
⌁ NOTES
• Based on Perry Kaufman's Efficiency Ratio from "Trading Systems and Methods" (1995)
• Cross-validated against our PyneCore Python reference implementation.
• Parameters were tuned on gold (XAUUSD) via the NovaLens research pipeline. The same presets generalize reasonably to other assets - though testing on your own instruments is always recommended.
• Regime palette: teal = trend-favorable, amber = chop-dominant. Not green/red - this is a state classifier, not a directional signal.
If you find a Custom parameter set that works well on a different instrument, the comments are a good place to share it. Indicator

Structural Momentum Bias [JOAT]
Structural Momentum Bias
Introduction
Structural Momentum Bias is an overlay indicator that combines pivot-based market structure classification with a double-smoothed momentum band system to identify the current market regime and its directional bias. The indicator continuously tracks swing highs and lows, classifies them as higher highs, lower highs, higher lows, or lower lows, and scores momentum strength on a 0-5 scale using band position and structure alignment. A break-of-structure detection system marks confirmed liquidity shifts in real time.
The core problem this indicator addresses is the disconnect between price structure and momentum. Many traders either follow structure without measuring momentum strength, or use oscillators without understanding what market structure those signals occur within. This indicator unifies both, producing a regime label (Bullish, Bearish, or Ranging) backed by a quantified score. A regime classification without a corresponding score is ambiguous. A score without regime context is incomplete. Together they provide a clearer picture of where the market is and how strongly it is in that state.
Core Concepts
1. Double-Smoothed Baseline (SMEMA)
The baseline uses a two-pass smoothing method: an EMA applied to price, followed by an SMA applied to that EMA. This reduces noise while maintaining responsiveness. It outperforms a simple MA in choppy markets because the double-pass eliminates high-frequency oscillations that cause false regime flips. The baseline slope (rising or falling) is one input into the regime classification.
2. Dynamic Step Channel
The channel bands are not fixed multiples of ATR. Instead, they use the 100-bar average of the high-low range as the step unit, producing three tiers of bands above and below the baseline. This approach adapts to each instrument's natural swing amplitude without requiring manual calibration per market. Each band tier has a gradient color that intensifies as price approaches that level from within the channel, providing visual distance context.
3. Pivot-Based Structure Classification
Swing highs and lows are identified using confirmed pivots (lookback left and right bars). The indicator classifies the relationship between successive pivots as HH (higher high), LH (lower high), HL (higher low), or LL (lower low). These four states are combined to determine whether structure is bullish (HH + HL), bearish (LH + LL), or mixed. Importantly, pivot detection is offset by the lookback period, so no repainting occurs — a pivot is only confirmed when enough subsequent bars have closed to validate it.
4. Momentum Strength Score (0-5)
The score adds one point for each of: price above band tier 1, price above band tier 2, price above band tier 3, higher high present, and higher low present (inverted for bearish scoring). This produces a 0-5 integer that quantifies how strongly the market is expressing the current regime. A score of 5 in a bullish regime means price is extended above all three band tiers with confirmed higher highs and higher lows — a strongly trending condition. A score of 1 or 2 suggests marginal or weakening conditions.
5. Break of Structure (BOS) Detection
A bullish BOS is confirmed when price closes above the most recent swing high on a confirmed bar. A bearish BOS is confirmed when price closes below the most recent swing low. The BOS line is drawn from the pivot bar to the current bar and extends right, with a thick transparent shadow line providing visual depth. BOS detection only fires on barstate.isconfirmed, preventing any repainting.
Features
Regime Dashboard: 9-row dark-themed table showing regime, baseline direction, bull score, bear score, structure state, ATR, and last BOS
Dynamic Momentum Bands: Six gradient-colored bands (three above, three below) that visually represent price position within the momentum channel
SMEMA Baseline: Color-coded by regime, changes in real time as regime shifts
Break of Structure Lines: Thin solid + thick ghost dual-line rendering at confirmed structural breaks, extending to the current bar
Confirmed Pivot Dots: Small circles at each confirmed swing high and low, plotted at the exact pivot bar
Bar Coloring: Candles are colored by current regime state
Band Fill Gradients: Fill between band tiers intensifies based on price proximity
Input Parameters
Structure Settings:
Pivot Lookback: Number of bars left and right required to confirm a pivot (default: 5)
Baseline Length: Period for the SMEMA double-smoothed baseline (default: 10)
Show Structure Breaks: Toggle BOS line rendering
Visual Settings:
Dashboard toggle and position
Momentum Bands toggle
Bullish, Bearish, and Ranging color inputs
How to Use This Indicator
Step 1: Read the Regime
The dashboard label and bar coloring immediately show the current regime. Bullish requires the baseline to be rising and a momentum score of 2 or more.
Step 2: Assess Score Strength
A score of 4-5 indicates a well-developed trend with band extension and confirmed structure. A score of 1-2 suggests the regime is marginal and may not sustain.
Step 3: Watch for BOS Events
A BOS in the direction of the regime adds confirmation that a structural shift has occurred. A counter-regime BOS is an early warning that conditions may be changing.
Step 4: Use Bands for Context
Price returning to the baseline from above in a bullish regime is a potential pullback entry area. Price extending above band tier 2 or 3 suggests overextension.
Limitations
The pivot confirmation delay (lookback bars) means BOS signals and pivot markers appear several bars after the actual swing point. This is a deliberate design choice to prevent repainting
The regime score of 2 as the minimum threshold for classification means borderline conditions will oscillate between Ranging and a directional regime on consecutive bars
The SMEMA baseline is smoother than a standard EMA but still lags price. In fast-moving markets this lag may cause regime flips after significant portions of a move have already occurred
Band width is determined by the 100-bar average of bar ranges. In markets with sudden volatility regime changes (such as after news releases), the bands may not reflect the new volatility environment for many bars
Originality Statement
This indicator is original in its specific combination of elements and the scoring framework it produces. The justification for combining structure detection with a band-based scoring system is that neither component alone provides actionable context. Structure alone (HH/HL) says direction but not strength. Bands alone say relative position but not structural validity. The 0-5 score synthesizes both into a single conviction metric. The double-smoothed baseline (EMA of EMA, then SMA) is a deliberate design choice that reduces false regime flips without the extreme lag of longer single-pass averages. The dynamic step channel uses bar range (not ATR) as its unit, which scales naturally with each instrument's price action characteristics.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. Past structural patterns do not guarantee their repetition. A bullish regime classification does not predict future price direction. Always apply proper risk management. The author is not responsible for any trading losses.
-Made with passion by officialjackofalltrades
Indicator

Adaptive Regime Momentum [JOAT]Adaptive Regime Momentum
Introduction
The majority of publicly available trend-following strategies rely on one of two entry mechanisms: a moving average crossover, or a price-versus-MA relationship. These are valid starting points, but they share a common weakness — they fire signals based on a single confirmatory condition that can be triggered by brief, low-conviction price moves. A single bar pushing above a moving average while volume is thin and the MA is barely sloping is not the same market condition as a sustained directional move with volume behind it and a clearly sloping MA. Yet a simple strategy would treat both identically.
Adaptive Regime Momentum is a trend-following strategy that requires three independent conditions to align before generating an entry signal. These three layers — MA slope confirmation over multiple consecutive bars, price position relative to the MA, and a volume-based demand filter — must all agree simultaneously. The result is a strategy that generates fewer signals but with higher internal consistency between entry conditions. It is designed for liquid markets on daily or higher timeframes where each component is reliably measurable.
This is an overlay strategy — all visuals are plotted directly on the price chart.
---
Strategy Properties
The following default settings are used for all backtests unless modified:
Initial capital: $10,000
Position sizing: 5% of equity per trade
Commission: 0.05% per side
Pyramiding: 0 (only one open position at a time; new signals are ignored while a position is active)
Stop loss: 2.5x ATR below the entry price (long), 2.5x ATR above the entry price (short), calculated from strategy.position_avg_price
Take profit: 4.0x ATR above the entry price (long), 4.0x ATR below the entry price (short), calculated from strategy.position_avg_price
Trail / slope exit: Position is closed early if price crosses to the wrong side of ComboMA ± 1.5x ATR, or if the MA slope reverses direction
The stop and take profit are anchored to strategy.position_avg_price — the actual average fill price of the position — rather than the signal bar's close. This ensures that in backtesting, stop and TP distances are measured from where the trade was actually opened, not from a theoretical signal level.
These are backtesting defaults only. They do not represent a recommendation for live trading position sizing or risk management.
---
Core Concepts
Signal 1 — ComboMA Slope Confirmation (Structural Momentum)
The ComboMA is a blend of two moving averages:
ALMA (Arnaud Legoux Moving Average) — a smooth MA with reduced lag, fitting to recent price without overreacting to single bars
ZLMA (Zero-Lag Moving Average) — a lag-compensated MA designed to reduce the delay between price movement and MA response
The two are blended into a single ComboMA value. The slope of this composite is then evaluated not just on the current bar, but across the last N consecutive bars (default: 3). A slope is only confirmed as UP if all of the last 3 bars showed a positive slope. A slope is only confirmed as DOWN if all 3 bars showed a negative slope. A single slope fluctuation — even if the most recent bar shows a positive slope — does not trigger confirmation unless all N bars agree.
This multi-bar slope confirmation is the primary mechanism that distinguishes this strategy from a simple MA-based entry. A one-bar slope flip that immediately reverses is filtered out. Only a sustained slope direction triggers the first condition.
Signal 2 — Price vs. ComboMA (Real-Time Confirmation)
The second condition requires that price is currently on the correct side of the ComboMA:
For a long: close > ComboMA
For a short: close < ComboMA
This condition is evaluated at the current bar, providing real-time confirmation that price is aligned with the structural slope direction. The MA slope could be upward from prior bars, but if price has already pulled back below the MA, the second condition vetoes the entry. Both the historical slope and the current price position must agree.
Signal 3 — Volume RSI (Demand Pressure Validation)
Volume RSI is RSI applied to raw volume over an 8-bar period, then divided by 50. A result above 1.0 (the default threshold) means the Volume RSI is above 50 — indicating that volume activity on recent bars has been relatively elevated compared to the preceding period.
For a long entry: Volume RSI / 50 must exceed the threshold
For a short entry: same condition applies
Volume RSI does not confirm direction — it confirms participation . A move accompanied by above-average volume has more demand/supply backing than a low-volume drift. When volume is below threshold, the third condition is not met and no entry is generated, even if slope and price position align.
RSI Filter
An additional RSI filter is applied to the close:
RSI(14) must be above 50 for long entries
RSI(14) must be below 50 for short entries
This acts as a momentum gating condition — confirming that short-term momentum is consistent with the trade direction before entry is permitted.
Non-Repainting Execution
All entry conditions are gated by barstate.isconfirmed . No signal is generated until the current bar has fully closed. This prevents intra-bar signal flickering and ensures that the backtest accurately represents what would have been traded on confirmed bar closes.
---
Exit Logic
The strategy uses a layered exit system combining fixed risk-defined targets with adaptive trend exits:
Fixed exits (via strategy.exit):
Stop loss at 2.5x ATR from entry price
Take profit at 4.0x ATR from entry price
Trail exits (via strategy.close):
Price closes beyond ComboMA ± 1.5x ATR on the wrong side
The ComboMA slope reverses (multi-bar confirmation fails in the opposite direction)
The trail exit allows winning positions to exit earlier if the trend deteriorates before reaching the fixed take profit, while the fixed TP provides a defined maximum target. The stop loss is the unconditional floor regardless of trail conditions.
---
ATR Shadow Visual
The chart displays two layers of ATR bands around the ComboMA:
Inner band: ComboMA ± 1x ATR
Outer band: ComboMA ± 2x ATR
These bands give a visual read of how extended price is from the MA relative to recent volatility, and where the trail exit threshold sits (1.5x ATR, between the two bands). They are visual aids only and do not affect strategy logic.
---
Performance Table
A table is displayed on the chart showing current strategy metrics:
Net P&L
Open P&L (current unrealized)
Win Rate
Average winning trade
Average losing trade
Maximum drawdown
Total trades
Current position direction
Current MA slope status
---
Features
Three-layer entry confirmation: multi-bar MA slope, price vs. MA, and Volume RSI
RSI momentum filter as an additional gating condition
ALMA + ZLMA blend for the ComboMA, reducing lag without sacrificing smoothness
Multi-bar slope confirmation preventing single-bar slope flickers from triggering entries
ATR-based stop and take profit anchored to actual fill price via strategy.position_avg_price
Trail exit on slope reversal or price-vs-MA breach
Non-repainting: all signals confirmed via barstate.isconfirmed
Pyramiding disabled — one position at a time
ATR shadow bands for visual context around the ComboMA
Live performance table with key metrics
---
Input Parameters
ALMA / ZLMA settings — length, offset, and sigma for each MA component
Slope Confirm Bars (default 3) — consecutive bars of slope agreement required for confirmation
Volume RSI Length (default 8) — RSI period applied to volume
Volume Threshold (default 1.0) — Volume RSI / 50 minimum for the demand filter
RSI Length (default 14) — RSI period for the momentum filter
ATR Length — period for ATR used in stop, TP, trail, and visual bands
Stop Multiplier (default 2.5) — ATR multiplier for the fixed stop loss
TP Multiplier (default 4.0) — ATR multiplier for the fixed take profit
Trail Multiplier (default 1.5) — ATR multiplier for the trail exit threshold
---
How to Use
Apply to daily or higher timeframes on liquid instruments. Volume RSI is most meaningful where volume data is consistent and representative of actual market participation.
Allow the chart to load sufficient historical bars before evaluating backtest results. The ComboMA slope confirmation requires multiple bars of agreement, and early bars in the dataset may not reflect the strategy's typical behavior. Aim for at least several hundred bars of data for meaningful backtest statistics.
Review the performance table while backtesting to understand average win size relative to average loss, drawdown, and total trade count. A strategy with very few trades may show favorable metrics by chance rather than edge — consider whether the trade count is sufficient to draw conclusions.
The default 5% equity position size produces moderate equity curve sensitivity. Smaller sizes will reduce drawdown and return proportionally; larger sizes will amplify both.
Commission is set to 0.05% per side (0.1% round trip) by default. Adjust this to match your actual trading costs. Higher commission rates — especially relevant for frequent-trading timeframes — will reduce net results.
Do not optimize parameters on the same data you use to evaluate performance. Optimization on historical data produces settings tuned to past noise, not future edge.
The trail exit on slope reversal means that strongly trending markets where the MA briefly flattens before resuming may see early exits. This is the tradeoff for using slope as an exit condition.
---
Limitations
Backtest results are calculated on historical data and do not guarantee future performance. Market conditions change, and a strategy that performed well in a particular regime may perform differently as conditions evolve.
The Volume RSI filter requires reliable volume data. This strategy is not recommended for synthetic instruments, CFDs where volume represents contracts rather than underlying market activity, or very short intraday timeframes where volume is fragmented and noisy. On such instruments, the third entry condition may be meaningless or misleading.
The multi-bar slope confirmation requirement means the strategy will miss fast, sharp trend initiations where the MA slope has not yet had N bars to confirm. This is a deliberate tradeoff — reducing false entries at the cost of some late entries on fast moves.
Pyramiding is disabled. The strategy will not add to winning positions. This limits upside during strongly trending markets where additional entries might be beneficial, but it also limits drawdown from compounding positions that subsequently reverse.
ATR-based stops and TPs are fixed at entry. They do not adjust after the trade is open (apart from the trail exit). If volatility expands significantly after entry, a 2.5x ATR stop that was appropriate at entry may become relatively tight.
The performance table reflects cumulative backtest results as of the current bar. Results will vary across different lookback windows and instruments.
Default capital of $10,000 with 5% equity sizing means each trade risks approximately $500 before the stop is hit (assuming stop is the loss floor). This is a backtesting convention — it is not a recommendation for live account sizing.
No strategy produces guaranteed results. The three-layer entry system improves internal signal consistency but cannot eliminate the inherent uncertainty of financial markets.
---
Originality Statement
Standard MA-based trend strategies treat a single bar's price-vs-MA relationship as sufficient for entry. ARM's primary differentiation is the multi-bar slope confirmation requirement : the ComboMA slope must be consistently positive (or negative) across N consecutive bars before the first condition is met. A one-bar slope deviation — common during consolidations and brief retracements — does not trigger entry. Only a sustained slope direction qualifies.
The ComboMA itself is a blend of ALMA and ZLMA, combining the smoothness and Gaussian weighting of ALMA with the lag-compensation of ZLMA. Neither is used in isolation because each has a specific weakness: ALMA can lag on sharp moves; ZLMA can be sensitive to noise. The blend leverages the strengths of both while partially offsetting their weaknesses.
The three-layer confirmation architecture — slope duration, price position, and demand validation — requires agreement across genuinely different measurement types: structural momentum over time, current price location, and volume activity. These are not three views of the same quantity. The stop and TP placement using strategy.position_avg_price rather than the signal bar close is a practical accuracy measure: in backtesting, it means risk distances are calculated from the price at which the trade was actually filled, not from where the signal was generated, which can differ from the fill price particularly on gap opens.
---
Disclaimer
This strategy is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any security. Backtested results are hypothetical and do not reflect actual trading. Hypothetical performance results have inherent limitations and do not account for execution slippage, liquidity constraints, or the psychological challenges of live trading. All trading involves risk, including the possible loss of principal. Always conduct your own research and consult a qualified financial professional before making any trading or investment decisions.
-Made with passion by officialjackofalltrades
Strategy

Structural Deviation Compass [JOAT]Structural Deviation Compass
Introduction
The Structural Deviation Compass is an overlay indicator designed to map where price stands relative to its own statistical history. Rather than drawing fixed-distance envelopes or relying on a single moving average, it constructs a hybrid centerline from two distinct low-lag moving average types, then wraps that centerline in volatility-adaptive bands derived from Z-score normalization. A secondary oscillator layer — applied to RSI — creates a dual-confirmation signal gate that fires only when both price deviation and momentum reach simultaneous extremes. Shadow bands built from the Average True Range provide additional spatial context across three volatility tiers.
The indicator does not predict future price. It identifies statistically unusual deviations from an estimated mean structure and flags conditions where a reversion or continuation setup may be forming, subject to confirmation from the trader's own process.
Core Concepts
The ComboMA Centerline
The foundation of the indicator is a composite moving average called the ComboMA, formed by averaging two lines:
ALMA (Arnaud Legoux Moving Average): Uses a Gaussian-weighted kernel positioned asymmetrically along the lookback window. The offset and sigma parameters control how far toward the recent end the weight mass sits and how tightly it is concentrated. This produces a smooth line that tracks price closely while suppressing noise better than a simple EMA of the same length.
ZLMA (Zero-Lag Moving Average): Constructed by doubling a base EMA and subtracting a second EMA of that EMA — a technique that estimates and removes the inherent lag of an exponential average. The result is then smoothed once more to reduce the noise amplification that zero-lag constructions can introduce.
Averaging the two produces a centerline that carries reduced lag from the ZLMA side while retaining the smooth, noise-filtered character of the ALMA side. Neither line alone fully satisfies both goals; together they produce a more balanced result.
Z-Score Price Bands
Rather than plotting bands at a fixed multiple of a standard deviation (as Bollinger Bands do using a rolling standard deviation of price itself), the SDC first computes the deviation of close from the ComboMA, then Z-score normalizes that deviation series over a separate lookback window. The bands are then placed back on the price chart by multiplying the rolling standard deviation of deviations by the chosen Z-score threshold values.
The practical effect is that the band width reflects how unusual the current deviation is relative to the recent distribution of deviations — not simply how wide price has swung in a raw sense. Two threshold levels are provided, creating an inner and outer band pair on each side of the ComboMA.
RSI Z-Score
RSI is computed in the standard way, then subjected to the same Z-score normalization: the RSI value is compared to its own rolling mean and expressed in standard deviations. This removes the fixed-level bias of RSI (where 30/70 thresholds mean different things in different market regimes) and produces a momentum reading that is self-calibrating to recent RSI behavior.
Dual Z-Score Signal Gate
A long signal requires all of the following simultaneously:
Price Z-score below the negative trigger threshold (price is statistically far below the ComboMA)
RSI Z-score below the negative trigger threshold (momentum is statistically depressed)
RSI EMA below 38 (confirming a bearish momentum context rather than a pullback within strength)
The current bar closed above the prior bar's close (a micro-confirmation that selling pressure may be easing)
The bar is confirmed (signal does not repaint on the forming bar)
Short signals apply the mirror logic. The requirement for extremes in both dimensions simultaneously is intentionally strict — it filters out the many cases where price is extended but momentum is not, or vice versa.
ATR Shadow Bands
Three pairs of shadow bands are drawn around the ComboMA at 1x, 2x, and 3x of a rolling ATR. These are not signal bands — they serve as a spatial reference, helping to contextualize how far price has traveled from the estimated mean in volatility-adjusted terms. A move to the 3x ATR shadow in a low-volatility environment carries different significance than the same move in a high-volatility environment.
RGB Smooth Color Transition
The ComboMA line color transitions smoothly between a bull and bear palette by independently blending the red, green, and blue channels via EMA. Each channel tracks a target value set by the current bull/bear state, and converges toward it gradually. This avoids abrupt color flips and gives a visual sense of momentum continuity.
Gradient Bar Coloring
Individual bars are colored based on where the close sits within the band range relative to the ComboMA. Bars near the upper bands trend toward the bull color; bars near the lower bands trend toward the bear color. Bars near the ComboMA receive a neutral tone. This is a visual aid only and does not constitute a signal.
Information Table
A 9-row table displays the current readings for: market regime, price Z-score, RSI Z-score, RSI EMA, band width, signal strength, active signal, and ComboMA value. This gives a snapshot of the indicator's internal state without requiring the trader to hover over each plotted element.
---
Features
Hybrid ComboMA centerline combining ALMA and ZLMA
Volatility-adaptive Z-score bands at two threshold levels (inner and outer)
RSI Z-score normalization for regime-independent momentum reading
Dual Z-score signal gate requiring simultaneous extremes in price and momentum
Three-layer ATR shadow bands for spatial volatility context
Smooth RGB channel blending on the ComboMA line color
Gradient bar coloring based on position within band range
Real-time information table with 9 indicator state readings
Non-repainting signals (barstate.isconfirmed)
Fully toggleable visual components
---
Input Parameters
MA Length: Base length for the ZLMA and ATR calculations
ALMA Offset: Controls asymmetric weight positioning within the ALMA window (0 = old end, 1 = recent end)
ALMA Sigma: Controls weight concentration; lower values spread the weight, higher values tighten it
Z-Score Lookback: Rolling window for computing the mean and standard deviation of price deviations (default: 50)
Inner Band Threshold: Z-score level for the inner band pair (default: 1.5σ)
Outer Band Threshold: Z-score level for the outer band pair (default: 2.5σ)
RSI Length: Period for RSI calculation (default: 14)
RSI Z-Score Lookback: Rolling window for normalizing RSI
Signal Trigger: Z-score threshold required in both dimensions to generate a signal (default: 1.8σ)
ATR Multipliers: Multipliers for the three shadow band tiers (1x, 2x, 3x)
Visual Toggles: Individual on/off controls for bands, shadows, bar coloring, table, and signals
---
How to Use
Reading the centerline: The ComboMA acts as the estimated mean structure. Price consistently above it with a bull-colored line suggests sustained upward bias; price oscillating around it suggests a ranging environment.
Reading the bands: The inner bands (±1.5σ by default) represent moderately unusual deviations. The outer bands (±2.5σ by default) represent statistically rare deviations. A touch or breach of the outer band does not by itself mean a reversal is due — it means the move is statistically uncommon and warrants attention.
Reading the shadow bands: Use the ATR shadows to understand how far, in volatility-adjusted terms, price has moved from the ComboMA. Price at the 3x shadow while also at the outer Z-score band is a more notable condition than either reading alone.
Acting on signals: The dual Z-score signals flag confluent extremes. They should be used as an alert layer within a broader trading framework — not as standalone entry triggers. Consider the broader trend context, the timeframe, and supporting structure before acting.
Using the table: Monitor the signal strength reading to understand how close the current state is to triggering a signal. This is useful for watching a developing setup in real time.
Timeframe notes: The indicator functions on any timeframe. Higher timeframes produce fewer but more structurally significant signals. Lower timeframes will produce more signals, many of which will be noise. Adjust the Z-score lookback and trigger threshold accordingly.
---
Limitations
This indicator does not predict future price movement. All readings are descriptive of past and current bar data.
The ComboMA, like all moving averages, will lag price during sharp trend changes. The ZLMA component reduces but does not eliminate this lag.
Z-score bands assume that price deviations are approximately normally distributed. In instruments with fat-tailed distributions or during extreme events, the statistical thresholds will underestimate the probability of outlier moves.
Signals are non-repainting on confirmed bars but will update on the forming bar until it closes. Always wait for bar close before acting on a signal.
A signal firing does not mean price will reverse. Trending markets can sustain extreme Z-score readings for extended periods.
The RSI EMA threshold (38 for longs) is a fixed filter that may not suit all instruments or regimes. It should be adjusted or disabled if it is filtering out valid setups in the instrument being traded.
The ATR shadow bands are informational only and carry no predictive weight.
Past signal performance on a given instrument is not indicative of future performance.
---
Originality Statement
The ALMA and ZLMA are established concepts. The ComboMA is not either of them — it is a blended centerline that takes the asymmetric-weight smoothness of ALMA and the lag-reduction property of ZLMA and produces a composite that neither achieves individually. The Z-score normalization of price deviations is a statistical adaptation that makes the bands self-calibrating to the instrument's deviation distribution rather than fixed. Applying the same normalization independently to RSI produces a momentum reading that is self-referential to recent RSI behavior rather than anchored to universal threshold levels. The signal gate that requires simultaneous Z-score extremes in both price deviation and RSI — not one or the other — creates a logical AND condition that is substantially stricter than conventional oscillator crossovers or single-band-touch triggers. The three ATR shadow tiers, smooth RGB color blending, and gradient bar coloring are supporting visual constructs that serve interpretation rather than adding trading logic. The combination of these elements into a single overlay tool — ComboMA centerline, adaptive Z-score bands, normalized momentum gate, ATR spatial context, and state table — represents an original integration not replicated by any standard built-in indicator.
---
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice, investment advice, or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Past performance of any indicator or strategy is not indicative of future results. Always conduct your own research and consult a qualified financial professional before making any trading decisions.
-Made with passion by officialjackofalltrades
Indicator

Confluence Matrix [JOAT]Confluence Matrix
Introduction
Every component in a professional trading system should serve a purpose, and ideally, no single component should bear the entire weight of decision-making alone. The best entries occur when multiple independent analytical methods all point in the same direction simultaneously — a confluence event that dramatically raises the probability that the observed setup reflects genuine market structure rather than random noise. The Confluence Matrix is built around this philosophy, integrating six distinct analytical modules into a single, cohesive overlay indicator with a unified seven-point scoring framework that gates every trade entry.
The six integrated modules are: HEMA regime analysis (three-layer Hull-EMA Hybrid with two-bar confirmation), Break of Structure and Change of Character market structure (swing pivot-based BOS and CHoCH detection), a triple-smoothed Fibonacci channel (0.618, 1.618, and 2.618 bands around a triple-EMA basis), an ATR compression detection engine (volatility squeeze state), Z-score cumulative impulse detection (statistically significant momentum streaks), and an OLS linear regression combined with cumulative delta proxy and volume RSI. Each module contributes one integer point to a directional score. Entries require a minimum score threshold — meaning price must be supported by a configurable number of simultaneously aligned modules before a position is opened.
Beyond signal generation, the indicator includes a simulated position tracking system that monitors open virtual positions with defined entry prices, take-profit levels, stop-loss levels, and a trailing stop mechanism. This system does not execute real trades — it visualizes what a rule-based system following the indicator's own signals would have done, providing an educational and contextual layer that helps users understand how the signals sequence in live trading conditions. All trade signals are confirmed-bar only, with no look-ahead repainting. The fifteen-row dashboard, ten alert conditions, and extensive visual customization options make this the most comprehensive single-overlay indicator in the JOAT suite.
Core Concepts
1. HEMA Three-Layer Regime with Two-Bar Confirmation
The HEMA (Hull-EMA Hybrid) forms the structural backbone of the regime assessment. Three independent HEMA instances at periods 20, 50, and 100 represent the fast, mid, and slow trend layers. Full bull regime requires ascending order of all three (fast above mid above slow). Full bear regime requires descending order. The two-bar confirmation state machine requires two consecutive bars of raw alignment before the confirmed regime variable updates — preventing rapid back-and-forth flipping on borderline crossovers.
f_hema(src, len) =>
ta.ema(2 * ta.ema(src, len / 2) - ta.ema(src, len), math.round(math.sqrt(len)))
hema1 = f_hema(close, 20)
hema2 = f_hema(close, 50)
hema3 = f_hema(close, 100)
rawBull = hema1 > hema2 and hema2 > hema3
rawBear = hema1 < hema2 and hema2 < hema3
confBull = rawBull and rawBull
confBear = rawBear and rawBear
The CHoCH (Change of Character) logic builds directly from this: a bullish BOS that occurs while confBear is true represents structural bullish momentum emerging from within a confirmed bear regime — the first evidence of potential regime reversal.
2. BOS and CHoCH with Visual Lines
Break of Structure detection uses ta.pivothigh and ta.pivotlow to track prior swing levels. BOS events draw labeled lines on the chart: teal/red for standard BOS continuation, violet-dashed for CHoCH. All line drawing uses line.new() with fixed coordinates on confirmed bars, and extends the right endpoint to the next BOS event for visual continuity across the chart.
chochUp = bosUp and confBear
chochDn = bosDn and confBull
lineStyle = (chochUp or chochDn) ? line.style_dashed : line.style_solid
lineColor = chochUp ? color.purple : bosUp ? color.teal : chochDn ? color.purple : color.red
3. Triple-Smoothed Fibonacci Channel
The Fibonacci channel applies the same triple-EMA smoothing used in the FVC indicator to produce a noise-resistant basis line, then projects Fibonacci-ratio bands (0.618, 1.618, 2.618) both above and below using ATR or standard deviation as the volatility measure. Within the Confluence Matrix, the channel serves a dual purpose: its own slope defines the "fib trend" score contribution, and its band levels serve as reference zones for proximity analysis.
basis = ta.ema(ta.ema(ta.ema(hlc3, basisLen), basisLen), basisLen)
fibTrend = basis > basis ? 1 : basis < basis ? -1 : 0
The 0.618 and 1.618 inner bands are filled with a gradient between basis and inner band, with the fill opacity tied to the confirmed regime — teal fills in bull regime, red fills in bear regime, gray in neutral.
4. ATR Squeeze Detection
The ATR squeeze module uses the same compression ratio logic as the VSO indicator: comparing a short-term EMA-smoothed ATR against a longer baseline to determine whether volatility is contracting or expanding. When volatility is contracting (squeezing), the squeeze score contribution is zero — the market is not yet expressing directional energy. When volatility is expanding, the module contributes to the appropriate directional score.
atrShort = ta.ema(ta.tr(true), sqzLen)
atrLong = ta.ema(atrShort, sqzLen * 2)
squeezing = atrLong > atrShort
sqzOK = not squeezing
5. Z-Score Cumulative Impulse
The Z-score impulse module tracks separate cumulative bull and bear momentum streaks, normalizes them against rolling sma/stdev, and marks statistically significant events with diamond markers (◆) plotted above and below the price bars. These markers are displayed at confirmed bars only. The Z-score values for both directions are shown in the dashboard and contribute one point each to the long and short scores when their respective thresholds are exceeded.
cumBull := close > close ? nz(cumBull ) + (close - close ) : 0
cumBear := close < close ? nz(cumBear ) + (close - close) : 0
zBull = (cumBull - ta.sma(cumBull, zLen)) / ta.stdev(cumBull, zLen)
zBear = (cumBear - ta.sma(cumBear, zLen)) / ta.stdev(cumBear, zLen)
6. OLS Regression, Delta Proxy, and Volume RSI
The sixth analytical layer combines three sub-components. The OLS linear regression (using the same manual implementation as the ARO indicator) provides the Pearson R correlation quality metric and theta angle, which together determine whether the regression score contributes. The cumulative delta proxy (bar-range-based buying/selling pressure estimate) determines the delta directional score. Volume RSI (RSI applied to volume series) provides the volume quality gate. All three sub-components are evaluated in the context of long or short scoring.
regressionScore = pearsonR > minR and math.abs(theta) > minTheta ? (theta > 0 ? 1 : -1) : 0
deltaScore = deltaPos ? 1 : -1
volumeScore = highVol ? (localBull ? 1 : -1) : 0
7. Seven-Point Confluence Scoring
Each of the six modules contributes one integer point to either the long score or the short score (some modules contribute to both). The seven scoring variables (ls1 through ls7 for long, ss1 through ss7 for short) are summed individually so each module's contribution is transparent and auditable. The minimum score threshold (default: 5 of 7) gates entry conditions.
ls1 = confBull ? 1 : 0 // HEMA regime
ls2 = lastBOSDir == 1 ? 1 : 0 // Last BOS direction
ls3 = fibTrend == 1 ? 1 : 0 // Fibonacci channel trend
ls4 = sqzOK ? 1 : 0 // Squeeze OK (not compressing)
ls5 = regressionScore == 1 ? 1 : 0 // Regression + Pearson
ls6 = deltaPos ? 1 : 0 // Delta proxy bullish
ls7 = highVol and localBull ? 1 : 0 // Volume RSI + local trend
longScore = ls1 + ls2 + ls3 + ls4 + ls5 + ls6 + ls7
8. Simulated Position Tracking with Trailing Stop
The position tracker uses persistent var variables to track open trade state. Entry occurs when a BOS trigger or HEMA crossover fires, the score meets the minimum threshold, the bar is confirmed, and no position is currently open in that direction. Stop-loss is set at ATR below the entry for longs (above for shorts). Take-profit is set at a multiple of ATR from entry. The trailing stop mechanism moves the SL to breakeven once the position has moved one ATR in the favorable direction — locking in capital protection once momentum is confirmed.
var int posDir = 0
var float openTP = na
var float openSL = na
var float entryPx = na
longEntry = (bosUp or hemaXover) and longScore >= minScore and barstate.isconfirmed and posDir <= 0
if longEntry
posDir := 1
entryPx := close
openTP := close + atr14 * tpMult
openSL := close - atr14 * slMult
// Trailing stop to breakeven
if posDir == 1 and high - entryPx > atr14
openSL := math.max(openSL, entryPx)
Exits occur on TP hit, SL hit, or confirmed regime flip opposing the position direction (confBear while long, confBull while short).
9. Proximity-Gradient Bar Coloring
Bar colors are driven by the distance between the current close and the HEMA mid layer (hema2), normalized by the range between the fast and slow HEMA layers. This produces a bar coloring scheme that reflects not just direction but the degree of extension relative to the HEMA structure's own internal spread — a more dynamically calibrated proximity measure than a fixed ATR reference.
hemaRange = math.abs(hema1 - hema3)
hemaDist = hemaRange > 0 ? math.abs(close - hema2) / hemaRange : 0
hemaProxAlpha = math.min(math.round(hemaDist * 60), 75)
Features
Six Integrated Modules: HEMA regime, BOS+CHoCH structure, Fibonacci channel, ATR squeeze, Z-score impulse, and OLS regression+delta+volume all active simultaneously.
Seven-Point Scoring System: Each module contributes one point to a transparent, auditable confluence score with configurable minimum threshold for entry.
Two-Bar HEMA Confirmation: Prevents false regime transitions on single-bar HEMA crossovers.
CHoCH Detection: BOS events opposing the confirmed regime are classified as Change of Character and drawn with violet dashed lines.
Z-Score Diamond Markers: Statistically significant momentum streak markers displayed as ◆ above and below bars on confirmed events.
Triple-Smoothed Fibonacci Channel: 0.618, 1.618, and 2.618 bands with regime-conditional gradient fills.
Simulated Position Tracking: Virtual positions with TP, SL, and trailing stop to breakeven — visualizing the signal system in action.
Proximity-Gradient Bar Coloring: HEMA-internal-range-normalized distance drives bar color alpha for structure-relative visual encoding.
BOS Lines: Teal/red for continuation BOS, violet dashed for CHoCH — drawn at confirmed bars with horizontal extensions.
Fifteen-Row Dashboard: Position direction, regime, last BOS, CHoCH state, fib trend, volatility, Pearson R, theta, bull Z, bear Z, volume RSI, delta proxy, long score, short score, and minimum score threshold.
Ten Alert Conditions: Long entry, short entry, long exit, short exit, CHoCH up, CHoCH down, bull impulse, bear impulse, BOS up, BOS down — all as constant string alerts.
Input Parameters
HEMA Settings:
Fast/Mid/Slow Lengths: HEMA layer periods (defaults: 20, 50, 100)
Structure Settings:
Swing Length: Pivot lookback for BOS/CHoCH detection (default: 10)
Fibonacci Channel Settings:
Basis Length: Triple-EMA period (default: 20)
Volatility Type: ATR or StDev (default: ATR)
Volatility Length: Period for volatility measure (default: 14)
Z-Score Settings:
Z Lookback: Rolling window for normalization (default: 50)
Z Threshold: Sigma level for impulse trigger (default: 2.0)
Regression Settings:
Regression Length: Bar count for OLS calculation (default: 50)
Min Pearson R: Minimum |R| for regression score contribution (default: 0.6)
Min Theta: Minimum angle for regression score contribution (default: 5)
Entry/Exit Settings:
Minimum Score: Points required for entry (default: 5)
TP Multiplier: ATR multiple for take-profit level (default: 2.0)
SL Multiplier: ATR multiple for stop-loss level (default: 1.0)
Display Settings:
Show HEMA Layers: Toggle individual HEMA line visibility (default: true)
Show Trend Cloud: Toggle HEMA gradient fill (default: true)
Show Fibonacci Channel: Toggle Fibonacci band fills (default: true)
Show BOS Lines: Toggle structural break lines (default: true)
Show Z Markers: Toggle diamond impulse markers (default: true)
Show Position Lines: Toggle TP/SL/entry lines (default: true)
Show Bar Colors: Toggle proximity gradient bar coloring (default: true)
Show Dashboard: Toggle the fifteen-row table (default: true)
How to Use This Indicator
Step 1: Read the Score Before Acting on Any Signal
The most important discipline when using the Confluence Matrix is to check the long score or short score before taking any action on a signal. A BOS up event alone carries one point; it does not guarantee a high-probability setup. A BOS up event accompanied by a score of 6 or 7 — meaning five or six other modules are simultaneously aligned — is a materially different situation. Begin each analysis session by reading the dashboard scores and understanding which modules are contributing and which are not.
Step 2: Use the CHoCH for Regime Change Awareness
CHoCH events are the most important structural signals in the indicator. A CHoCH up (bullish BOS during a confirmed bear regime) does not mean immediately go long — it means the structural assumption of the prior bear regime is being challenged. Wait for the regime confirmation to update, watch for the long score to rise as modules align with the new potential bull regime, and then consider entry on the next confirmed BOS in the bull direction backed by a high score. The sequence matters: CHoCH first, then regime confirmation, then high-score entry.
Step 3: Let the Simulated Position Tracker Teach Pattern Recognition
The position tracker lines (entry, TP, SL) on the chart are an educational tool. Over time, reviewing where simulated positions were opened and closed relative to the subsequent price action reveals patterns about which score thresholds, which module combinations, and which entry triggers produce the cleanest outcomes on the specific instrument you are analyzing. Use this visual feedback to calibrate your own minimum score setting and module weighting preferences.
Step 4: Manage Visual Complexity Through Selective Display
Six integrated modules produce a significant amount of simultaneous chart information. New users should start with all display elements enabled to understand the full system, then progressively toggle off elements they are not actively using for a given analysis. The dashboard always reflects the underlying calculations regardless of display settings — so even with Fibonacci fills and BOS lines hidden, the score, regime, and all module states remain visible in the dashboard.
Indicator Limitations
The simulated position tracking system is a visual and educational tool only. It does not place real orders, cannot account for slippage, spread, or commission costs, and its results should never be used as a basis for financial decisions. Simulated performance and real-world trading performance are categorically different.
The seven-module scoring system assigns equal weight to all contributing modules. In practice, some modules (e.g., HEMA regime) may carry more structural significance than others (e.g., volume RSI). The equal-weight assumption is a simplification.
Six integrated modules means six sets of parameters to configure. The default settings are calibrated for daily and 4-hour chart analysis on liquid instruments. Heavy optimization of all parameters to historical data risks overfitting — the resulting configuration may perform well on history but fail on new data.
The OLS regression component requires sufficient bars to produce stable Pearson R and theta values. In the first regression-length bars of any chart session, these values will be based on very short windows and should not be treated as reliable quality filters.
All modules operate on the chart's native timeframe. The indicator does not incorporate multi-timeframe analysis internally — users seeking MTF context should reference the MCG indicator in combination.
Proximity bar coloring uses the HEMA internal range (hema1 minus hema3) as the normalizer. When all three HEMA layers are closely clustered (flat, sideways market), this range approaches zero, which can cause division instability in the proximity calculation. A guard for this case is included but the coloring will be less informative during flat HEMA conditions.
The trailing stop to breakeven mechanism fires when the position has moved one ATR in the favorable direction. In very high-volatility conditions with large ATR values, this may mean the SL does not move to breakeven until the position is significantly extended, reducing capital protection in fast-moving markets.
Originality Statement
The Confluence Matrix is the most comprehensive indicator in the JOAT suite and represents an original architectural achievement in the design of multi-module overlay indicators.
The seven-point confluence scoring system — where six independent analytical modules each contribute a single integer vote, and entry is gated by a minimum aggregate threshold — is an original framework for combining heterogeneous technical signals into a unified, transparent decision criterion.
The combination of HEMA regime, BOS/CHoCH structure, Fibonacci channel, ATR squeeze, Z-score impulse, and OLS regression+delta+volume in a single non-repainting overlay indicator with no external indicator dependencies is an original integration not replicated by any single publicly available PulseWire indicator.
The simulated position tracking system with trailing stop to breakeven — driven entirely by the indicator's own scoring and signal conditions, visualized directly on the chart — is an original self-contained feedback mechanism for understanding the system's real-time behavior.
The CHoCH classification (BOS event opposing the confirmed two-bar regime, not merely the raw regime) adds a confirmation layer to the standard CHoCH definition that reduces false change-of-character signals during borderline regime periods.
The proximity bar coloring normalized by the internal HEMA range (hema1 minus hema3) rather than by a fixed ATR reference creates a structure-relative alpha calculation that adapts to the current degree of HEMA layer separation — a more contextually aware coloring approach than fixed-reference alternatives.
The use of ten constant-string alert conditions (not dynamic or computed strings) ensures full compatibility with PulseWire's alert system, including webhook delivery and multi-condition alert construction.
Disclaimer
The Confluence Matrix is provided for educational and informational purposes only. It is a technical analysis tool and does not constitute financial advice. The simulated position tracking feature is for educational visualization only and does not represent actual trade results. No scoring system or multi-indicator confluence framework can guarantee profitable trading outcomes. All trading involves risk, including the potential loss of principal. Users are solely responsible for their own trading decisions. Please consider your individual risk tolerance and consult a licensed financial professional before engaging in any trading activity.
-Made with passion by officialjackofalltrades
Indicator

Alien The Bayesian Follower [by Oberlunar] Alien The Bayesian Follower 👁⭐
— Bayesian Gating Filter by Oberlunar
Alien The Bayesian Follower by Oberlunar is a permission layer for execution engines. At its core sits a conjugate Bayesian update that continuously revises the expected edge of each trading cell as live evidence accumulates, and automatically disables cells whose edge has decayed. Empirically, for most of the time, when a long/short gate is active, the price goes in the opposite direction or straight in the trend. Use it at 30 m, with lower TF at 15 m and trade on pullbacks.
The state space is built by crossing three fixed methodologies: a 5-class daily Regime Classifier built on Kaufman Efficiency Ratio, lag-1 autocorrelation of returns, and ATR ratio; a Dragon momentum composite aggregating EMA, RSI, MACD, and TRIX into 5 buckets; and a Pulsar flow composite aggregating OBV, CVD, and price-vs-flow divergences into 5 buckets. The full 5×5 Dragon × Pulsar grid is evaluated only inside the MIXED regime, where four specific bucket combinations carry a statistically significant edge after Bonferroni correction across all 25 cells.
The four surviving cells correspond to two long setups and two short setups. The strongest long edge sits at the intersection of strong bullish momentum and still-neutral flow — the pre-alignment phase where price has turned but order flow hasn't fully confirmed. Full alignment between momentum and flow tends to mark exhaustion. The same asymmetry holds in reverse for the short cells.
Each surviving cell carries a Normal prior representing its expected edge and the uncertainty around it. The Bayesian engine is the heart of the indicator: as the script runs, every walk-forward observation matching a cell updates that cell's prior through a conjugate Normal-Normal step, producing a posterior that shrinks prior and live evidence together via precision weighting. When live samples are few, the posterior stays close to the prior, and the cell relies on its original estimate. When live samples accumulate, the posterior tracks reality and the original prior fades.
Each cell is then assigned a status based on its posterior credible interval. **BORN** means not enough live data yet. **OK** means the credible interval excludes zero with the expected sign and the magnitude remains close to the prior. **DRIFT** means the sign is still correct, but the edge has weakened substantially. **DEAD** means the credible interval includes zero, or the sign has inverted — the cell has lost its edge and is automatically blocked from firing. This is the core defensive feature: strategies decay, and when one of the four cells decays, the Bayesian engine stops trusting it without any manual intervention.
Alerts in strict mode restrict firing to primary cells only (±2).
Permissive mode allows secondary cells (±1) as well.
The dashboard shows the live state of all four cells side by side: prior, posterior with credible interval, sample count, and status. Everything else — the cyberpunk palette, the segmented trend wedges in stay-out zones, the optional alien mascot rotating to follow the local trend — is visual feedback layered on top of the same Bayesian rule.
Enjoy,
By Oberlunar 👁⭐ Indicator

Cadence Veil [JOAT]Cadence Veil /b]
Introduction
Cadence Veil is an advanced open-source regime classification indicator that fuses an H-Infinity adaptive filter, R-squared efficiency gating, dual-window chop scoring, and Kaufman adaptive efficiency into a unified five-state regime engine. The indicator classifies every bar into one of five market states — Expansion Bull, Expansion Bear, Compression, Whipsaw, or Dormant — using a hysteresis state machine that prevents rapid flip-flopping between regimes. It then overlays volatility envelope bands, a ZEMA bias ribbon, structural pivot tracking, regime shift boxes, and gradient visualization to create a complete market phase recognition system.
The core problem this indicator solves is regime misidentification. Most traders apply the same strategy regardless of market conditions — trend-following in chop, mean-reversion in trends, or trading during dormant periods when nothing meaningful is happening. Each of these mismatches leads to losses. Cadence Veil explicitly classifies the current regime so traders can select the appropriate strategy for the conditions. A compression regime calls for breakout preparation. An expansion regime calls for trend-following. A whipsaw regime calls for caution or sitting out entirely. A dormant regime means the market lacks the energy for any strategy to work reliably.
Core Concepts
1. H-Infinity Adaptive Filter
The centerline of the indicator uses an H-Infinity filter rather than a conventional moving average. H-Infinity filtering is a control theory technique designed to produce optimal estimates under worst-case noise conditions. Unlike a Kalman filter (which assumes Gaussian noise), the H-Infinity filter makes no assumptions about noise distribution, making it more robust in financial markets where price noise is decidedly non-Gaussian:
for i = 0 to hinfOrder - 1
float s = array.get(hinfState, i)
float e = array.get(hinfError, i) + hinfNoise
float g = e / (e + hinfDist)
array.set(hinfState, i, s + g * (close - s))
array.set(hinfError, i, (1.0 - g) * e)
The filter maintains internal state and error estimates that adapt each bar. The gain parameter (error divided by error plus disturbance) determines how much the filter trusts new data versus its existing estimate. Higher disturbance values make the filter more conservative (smoother); lower values make it more responsive. The filter order parameter controls how many state dimensions are tracked, with higher orders providing more sophisticated noise modeling.
2. R-Squared Efficiency Gate
R-squared measures how well price movement fits a linear regression line. A high R-squared (close to 1.0) means price is moving in a straight, efficient line — a strong trend. A low R-squared (close to 0) means price is moving randomly with no directional efficiency:
float r2Raw = math.pow(ta.correlation(close, bar_index, effLen), 2)
float r2Smooth = ta.sma(r2Raw, effSmooth)
The indicator uses an auto-calibrating threshold: the rolling mean of R-squared plus k standard deviations. This means the threshold adapts to the instrument's typical trending behavior. A hysteresis band prevents the gate from flickering — once open, R-squared must drop further to close the gate than it needed to rise to open it.
3. Dual-Window Chop Scoring
Chop is measured using the efficiency ratio concept: the net price movement divided by the total path length over a window. A perfectly straight move scores 0 (no chop); a move that goes nowhere despite lots of bar-to-bar movement scores 1 (maximum chop). The indicator uses two windows — a fast window (default 14 bars) for recent chop and a slow window (default 50 bars) for structural chop — and blends them:
f_chop(int len) =>
float netMove = math.abs(close - close )
float pathLen = math.sum(math.abs(close - close ), len)
pathLen == 0.0 ? 1.0 : 1.0 - (netMove / pathLen)
float chopBlend = (chopFastVal + chopSlowVal) / 2.0
The dual-window approach catches both short-term whipsaws and longer-term structural chop that a single window might miss.
4. Kaufman Efficiency Ratio
The Kaufman ER provides a third independent measure of trend quality. It compares the absolute net price change over N bars to the sum of all bar-to-bar changes over the same period. Values near 1.0 indicate efficient, directional movement; values near 0 indicate noisy, non-directional movement. This complements R-squared (which measures linearity) and chop score (which measures path efficiency) by measuring absolute directional efficiency.
5. Composite Trend Score and State Machine
The three measures are blended into a single composite trend score:
float trendScore = (kaufER * 0.35) + ((1.0 - chopBlend) * 0.35) + (r2Smooth * 0.30)
This score, combined with the H-Infinity filter slope and volatility ratio, feeds into a five-state machine with persistence requirements. A candidate state must hold for a configurable number of consecutive bars (default 3) before the regime officially transitions. This prevents single-bar noise from triggering false regime changes.
The five states are:
Expansion Bull: R-squared gate open, trend score above threshold, H-Infinity slope positive
Expansion Bear: R-squared gate open, trend score above threshold, H-Infinity slope negative
Compression: High chop score, low volatility ratio — market is coiling
Whipsaw: High volatility but also high chop — dangerous conditions with large moves in both directions
Dormant: None of the above conditions met — market lacks energy or direction
6. Volatility Envelope Bands
Adaptive bands are constructed around the H-Infinity line using ZEMA-smoothed ATR. The bands scale their width based on the current regime: narrower during compression (0.7x), wider during expansion (1.2x), and standard during normal conditions. This regime-adaptive scaling means the bands contract when the market is coiling (tightening the range for breakout detection) and expand when the market is trending (giving the trend room to breathe).
Features
Five-State Regime Classification: Clear categorical identification of the current market phase with color-coded rendering throughout the indicator
H-Infinity Core Line with Glow: The adaptive filter line renders with a gradient glow whose color and intensity reflect the current regime and trend score
Regime Shift Boxes: When the regime changes, a colored box is drawn that expands to encompass the price range of the new regime, providing a visual record of regime transitions
Regime Shift Labels: Labels at regime transitions show the new regime abbreviation and the trend score at the time of transition
ZEMA Bias Ribbon: A filled ribbon between the H-Infinity line and its ZEMA shows directional bias with bull/bear coloring
Structural Pivot Detection: Swing highs and lows are identified and labeled with regime context — pivots formed during expansion regimes are colored differently than those formed during compression
Structure Lines: Dashed horizontal lines at the most recent swing high and low provide support/resistance reference
Envelope Breach Detection: The dashboard reports whether price is inside the bands, above/below the inner band, or above/below the outer band
Composite Signal Strength: A 0-100 score measuring how aligned all subsystems are (R-squared gate, Kaufman ER, chop score, and ZEMA bias)
Regime History Tracking: The dashboard shows the last three regime states in sequence, revealing the pattern of market phase transitions
Gradient Background Zones: Background coloring shifts on a gradient from compression tones to the current regime color based on the trend score
Regime-Aware Bar Coloring: Candle colors reflect the current regime with momentum-based gradient intensity
14-Row Dashboard: Displays regime state, duration, trend score, signal strength, R-squared gate status, chop blend, Kaufman ER, volatility ratio, H-Infinity gain, ZEMA bias, swing levels, envelope position, and regime history
Input Parameters
H-Infinity Filter:
Filter Order: Number of state-space dimensions (default: 3, range: 1-8)
Process Noise: Expected noise level (default: 0.5)
Disturbance: External disruption parameter (default: 1.0)
Efficiency Gate:
R-Squared Length: Correlation calculation period (default: 30)
Smoothing: R-squared smoothing period (default: 10)
Threshold k: Standard deviations above mean for auto-threshold (default: 1.0)
Chop Detector:
Fast Window: Short-term chop measurement (default: 14)
Slow Window: Long-term chop measurement (default: 50)
State Engine:
Entry Persistence: Consecutive bars required for regime transition (default: 3)
Hysteresis Band: Width of the hysteresis zone to prevent flickering (default: 0.15)
Volatility Envelope:
Inner/Outer ATR Multipliers: Band distance from the core line (default: 1.2/2.4)
ATR Length: Period for ATR calculation (default: 14)
Visuals:
Toggles for envelope bands, ZEMA bias ribbon, structural pivots, structure lines, regime shift boxes, regime shift signals, background zones, bar coloring, and dashboard
How to Use This Indicator
Step 1: Identify the Current Regime
The dashboard's regime field and the background coloring immediately tell you the market phase. This is the most important piece of information — it determines which strategy to apply.
Step 2: Match Strategy to Regime
Expansion Bull/Bear: Use trend-following strategies. Enter pullbacks to the H-Infinity line or inner band in the direction of the expansion
Compression: Prepare for a breakout. Tighten stops, reduce position sizes, and watch for the regime to shift to expansion. The ZEMA bias may hint at the breakout direction
Whipsaw: Reduce exposure or sit out. This regime produces large moves in both directions that stop out trend-followers and mean-reversion traders alike
Dormant: No edge exists. Wait for the market to wake up
Step 3: Use Signal Strength for Conviction
The composite signal strength (0-100) tells you how aligned all subsystems are. A 75+ score during an expansion regime is high-conviction. A 25 score during expansion suggests the regime may be weakening.
Step 4: Monitor Regime Transitions
Regime shift boxes and labels mark exactly where transitions occurred. The most profitable trades often come at the transition from compression to expansion — the breakout from a coiled market.
Step 5: Read the Regime History
The history chain (e.g., "COMP > EXP+ > DORM") reveals the market's recent phase pattern. A sequence like "COMP > EXP+ > COMP > EXP+" suggests a market that trends in bursts between consolidation periods.
Cadence Veil showing a regime transition sequence: compression (purple box) resolving into expansion bull (green box), with the H-Infinity line glow intensifying, envelope bands widening, and the trend score rising in the dashboard
Indicator Limitations
The H-Infinity filter, while theoretically robust, has three parameters (order, noise, disturbance) that significantly affect behavior. Optimal settings vary across instruments and timeframes and may require experimentation
The persistence requirement for regime transitions (default 3 bars) creates a delay. Fast regime changes may be identified several bars after they begin. This is a deliberate trade-off for stability
The five-state classification is a simplification of continuous market behavior. Markets can exist in states that don't cleanly fit any category, and the boundaries between states are inherently fuzzy
R-squared, chop score, and Kaufman ER all use lookback windows. They describe what the market has been doing, not what it will do. A regime can change immediately after being classified
The whipsaw state is identified but no strategy is recommended for it because whipsaw conditions are inherently difficult to trade profitably. The indicator's value here is in warning you to reduce exposure
Volatility envelope bands adapt to the regime but still use ATR, which is backward-looking. Sudden volatility shifts (news events, gaps) may not be reflected in the bands for several bars
Originality Statement
This indicator is original in its application of control theory (H-Infinity filtering) to market regime classification and its synthesis of multiple independent efficiency measures into a unified state machine. While regime detection and adaptive filtering are established concepts, this indicator is justified because:
The H-Infinity filter is rarely used in technical analysis. Its worst-case noise optimization makes it theoretically more appropriate for financial markets than the more common Kalman filter, which assumes Gaussian noise
The triple-measure efficiency assessment (R-squared linearity + dual-window chop + Kaufman efficiency) provides more robust regime detection than any single measure. Each captures a different aspect of market behavior
The five-state classification with hysteresis persistence requirements produces stable, actionable regime labels rather than the flickering binary (trending/ranging) classifications common in simpler indicators
Regime-adaptive volatility envelope scaling automatically adjusts band behavior to the detected market phase, providing context-appropriate support/resistance levels
The composite signal strength score synthesizes all subsystems into a single conviction measure
Regime shift boxes provide a visual record of market phase transitions that aids in pattern recognition across longer timeframes
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Regime classifications are based on historical data analysis and do not predict future market phases. A market classified as "Expansion Bull" can reverse at any time. Compression does not guarantee a subsequent breakout, and the direction of any breakout is not predicted by the compression classification. Always use proper risk management and conduct your own analysis. The author is not responsible for any losses incurred from using this indicator.
-Made with passion by officialjackofalltrades
Indicator

Chaotic Hyperbolic Entropy Divergence Oscillator (CHEDO)Chaotic Hyperbolic Entropy Divergence Oscillator (CHEDO)-
Traditional momentum oscillators measure the velocity of price, but they often fail to account for market disorder, structural breaks, or chaotic divergence. The Chaotic Hyperbolic Entropy Divergence Oscillator (CHEDO) addresses this by leveraging concepts from information theory and chaos mathematics to quantify not just the direction of a trend, but its underlying structural stability.
Instead of relying solely on simple moving averages, CHEDO fuses five distinct mathematical models to determine if a market is trending cleanly, collapsing into chaos, or reaching maximum entropy (exhaustion).
The Mathematical Engine: Under the Hood
To ensure complete transparency, here are the five core components that drive this indicator. These metrics are dynamically normalised and fused into a single oscillator bounded between -1 and 1.
Hyperbolic Geodesic Curvature: Measures non-linear trend strength. It uses an arcsinh transformation of volatility-weighted returns to compress extreme outliers while preserving the core directional pull of the market.
Local Lyapunov Proxy: Adapted from chaos theory, this component measures the divergence rate of consecutive returns. It detects when price action is becoming unstable or unpredictable.
Kolmogorov-Smirnov (KS) Regime Shift: A distributional shift detector. It compares short-term and long-term volatility alongside skewness differentials to flag structural breaks in the market regime.
Shannon Entropy (Rolling): Information theory applied to price action. It computes the true rolling entropy of the return distribution. High entropy means the market is heavily disordered.
Edge Denoise Factor: A directional persistence metric that acts as a choppiness filter, distinguishing between clean moves and high-alternation noise.
Reading the Oscillator and State Machine
The fusion of these components is mapped through a directionally-aware sigmoid function, creating clear, actionable zones:
The Zero Line (Regime Shift): Crosses above zero indicate the initiation of a bullish regime. Crosses below zero indicate a bearish regime.
+0.7 Threshold (Exhaustion Zone): The market has reached a state of maximum entropy and parabolic stretch. The current directional move is highly disordered and vulnerable to a mean-reversion event.
-0.7 Threshold (Chaos Zone): The market is in a state of high chaos and accumulation. This zone typically precedes volatility expansions or major structural bottoming processes.
Honest Limitations and Caveats
Traders must be aware of the structural realities of this indicator:
Computational Lag: Because CHEDO relies on heavy statistical calculations and double-smoothing to filter noise, it carries inherent lag. It is designed to identify regime shifts, not to catch the absolute top or bottom tick.
OHLCV Dependency: While CHEDO is inspired by quantitative physics, it is ultimately calculating derivatives of OHLCV (Open, High, Low, Close, Volume) data. It is a highly advanced proxy, but it is not a replacement for true footprint or bid/ask order flow data.
Computation Cost: The rolling Shannon Entropy calculation is intensive. While optimised, it may cause minor loading delays on 1-minute charts with maximum historical bars loaded.
Best Practices: A Filter, Not a Standalone System
Due to its smoothing and mathematical depth, CHEDO is best deployed as a higher-timeframe regime filter rather than a lower-timeframe entry trigger.
Exhaustion Fades: When CHEDO enters the Exhaustion zone (above +0.7), exercise extreme caution taking trend-continuation breakout trades.
Volatility Breakouts: When CHEDO drops deep into the Chaos zone (below -0.7), the market is heavily compressed. Prepare for a volatility expansion and trade the structural breakout.
Multi-Timeframe Confirmation: If you are trading lower-timeframe setups, consult a higher-timeframe CHEDO. Only take the trade if the higher-timeframe oscillator is on the correct side of the zero line.
Disclaimer: CHEDO is an advanced statistical analysis tool, not a standalone trading system or financial advice. Always pair it with proper risk management and structural price analysis. Indicator

AG Pro ROC Momentum Shift Map [AGPro Series]AG Pro ROC Momentum Shift Map
Overview / What it does
AG Pro ROC Momentum Shift Map is a momentum-regime tool built around the Rate of Change (ROC) concept, but organized as a transition map rather than a standalone oscillator. Instead of treating ROC as a simple line that moves above or below zero, this script tracks how momentum shifts from one regime to another, whether that transition is strengthening or fading, and whether the current phase is fresh, mature, or beginning to stall.
The script is designed to help users read momentum behavior in a more structured way. It separates bullish and bearish momentum into shift and expansion phases, then adds context through transition-zone logic, baseline separation, freshness tracking, and exhaustion risk. This allows the chart to show not only direction, but also the condition of that direction.
This publication is not intended to forecast tops, bottoms, or future price movement. It is a context tool that organizes ROC behavior into states that may help users evaluate whether momentum is attempting to change character, continue, or lose efficiency.
Unique Edge
The main difference between this script and many ROC-based publications is that it does not present ROC as a raw crossing signal. It reframes ROC as a regime map with state logic, quality scoring, and momentum-stage classification.
Within the AG Pro series, this script also has a different purpose than the previously published tools. It is not a breakout-quality model, not a pullback validator, not a support/resistance reaction map, not a relative-strength rotation framework, and not a correlation-stress tool. Those scripts focus on structure, levels, cross-asset comparison, reclaim behavior, or directional pressure. This script focuses on internal momentum state transitions derived from ROC behavior itself.
More specifically:
- It differs from breakout or retest-oriented scripts because it does not judge price interaction with a key level.
- It differs from reaction-map scripts because it does not score how price behaves around predefined structures such as pivots, support/resistance, or moving-average reclaim zones.
- It differs from pressure or trend-strength tools because its goal is not to estimate directional force in isolation, but to classify whether momentum is transitioning, expanding, contracting, or stalling.
- It differs from relative-strength tools because it does not compare one symbol against another symbol or benchmark.
That distinction is the core of the script’s originality: it uses ROC to map momentum regime transitions, not merely to display momentum magnitude.
Methodology
The script begins with a Rate of Change calculation over a user-defined length and optionally smooths that series to reduce small fluctuations. A regime baseline is then derived from the ROC series to establish whether current momentum is operating above or below its local equilibrium.
A dynamic transition zone is built from ROC volatility. This zone is used to identify areas where momentum is attempting to move from one regime into another. Instead of using a rigid zero-line interpretation alone, the script evaluates whether ROC is operating inside or outside this transition area and whether slope supports the move.
The internal state engine classifies momentum into five main conditions:
- Bull Shift
- Bull Expansion
- Bear Shift
- Bear Expansion
- Neutral / Compression
To add structure beyond simple state assignment, the script estimates Shift Quality using a combination of zone positioning, slope behavior, separation from the regime baseline, and acceleration. A whipsaw-sensitive penalty reduces the score when repeated zero-line crossings suggest unstable momentum behavior.
The script also tracks how long the current state has been active. That information is used to classify the move as Fresh, Active, Mature, Stale, or Stalling. Expansion and contraction logic are then layered on top to provide a clearer view of whether momentum is broadening or fading. Finally, an exhaustion-risk estimate is derived from adverse slope, adverse acceleration, and contraction behavior against the current state.
Signals & Alerts
This script provides state-based informational events rather than trade promises. The built-in alert set is designed to mark notable momentum transitions in a deterministic way:
- Bull Shift Detected
- Bull Expansion Active
- Bear Shift Detected
- Bear Expansion Active
- Momentum Stalling
These alerts are best interpreted as momentum-context events. They are not guarantees of continuation, reversal, or trade outcome.
Key Inputs
Important inputs include:
- ROC Length: defines the main lookback used for Rate of Change.
- ROC Smoothing: reduces short-term noise in the raw ROC series.
- Regime Baseline Length: sets the local reference used for momentum separation.
- Transition Zone Length and Multiplier: control the width and sensitivity of the transition area.
- Quality Normalization Length: affects how the quality model normalizes slope and ROC magnitude.
- Whipsaw Lookback: influences how aggressively unstable zero-line rotation is penalized.
- Freshness thresholds: define how quickly a state progresses from fresh to mature or stale.
Users can also customize visual behavior such as histogram visibility, transition-zone display, background shading, labels, and panel presentation.
Limitations & Transparency
This script is an analytical indicator, not a prediction engine. ROC is a momentum derivative, so it can react quickly but can also become unstable in choppy or mean-reverting environments. During low-quality market conditions, momentum may rotate repeatedly around the transition zone and generate less reliable state changes.
Shift Quality is an internal scoring framework created to organize momentum transitions more clearly. It is not an objective universal measure of trade quality, and it should not be interpreted as proof of future performance.
Freshness, expansion, contraction, and exhaustion labels are contextual classifications based on the script’s internal logic. They are intended to help users structure momentum analysis, not to replace broader chart reading, trend assessment, market structure work, or risk management.
As with any indicator, outputs can vary depending on symbol characteristics, volatility regime, timeframe, and user settings. This script should be used as one analytical layer within a broader decision process.
Risk Disclosure
This indicator is for chart analysis and educational use. It does not provide investment advice, trading advice, or guaranteed results. Financial markets involve risk, and no indicator can ensure favorable outcomes. Users should evaluate the script in their own workflow, test settings carefully, and apply independent judgment before making trading decisions.
Indicator

Vortex Nexus Alpha [JOAT]Vortex Nexus Alpha Strategy
Introduction
The Vortex Nexus Alpha Strategy is an advanced open-source algorithmic trading system that combines multi-dimensional signal generation, adaptive regime detection, and institutional-grade risk management into a unified execution framework. This strategy represents a complete trading system built from the ground up using proprietary mathematical models, fractal analysis, momentum tracking, and market microstructure intelligence.
Unlike simple crossover strategies or single-indicator systems, Vortex Nexus Alpha synthesizes intelligence from five independent signal layers, each containing five distinct detection mechanisms, creating a 25-factor confluence scoring system that validates every trade entry. The strategy is designed for traders who understand that consistent profitability requires multi-dimensional analysis, adaptive positioning, and systematic risk management rather than relying on any single indicator or pattern.
Why This Strategy Exists
This strategy addresses the fundamental challenge of algorithmic trading: most systems over-optimize to historical data or rely on simplistic logic that fails in real market conditions. Vortex Nexus Alpha solves this through a knowledge-based architecture that doesn't depend on indicator mashups but instead builds intelligence from first principles:
Volatility Expansion Engine: Measures market volatility through ATR percentile ranking and adapts position sizing and stop distances dynamically
Price Efficiency Calculator: Quantifies how efficiently price moves using path length analysis, filtering choppy conditions
Chaos Measurement System: Identifies market regime (directional, equilibrium, chaotic) using logarithmic range analysis
Directional Conviction Tracker: Measures trend strength through ADX and directional movement indicators
Adaptive Ribbon System: Multi-layer EMA ribbon that expands/contracts based on volatility and provides dynamic support/resistance
Volume Pressure Analysis: Estimates buying/selling pressure through candle structure and wick analysis
Gauss Smoothing Engine: 4th-order Gaussian filter that eliminates noise while preserving genuine price movements
Fractal Efficiency Measurement: Logarithmic efficiency calculation that adapts Laguerre filtering for optimal lag reduction
Laguerre Momentum Transform: Adaptive momentum oscillator that responds faster during efficient moves
Temporal Flow Dynamics: Analyzes price flow direction, magnitude, and acceleration across multiple dimensions
Pivot Structure Analysis: Detects market structure breaks and shifts using swing high/low analysis
Order Block Detection: Identifies institutional positioning zones through volume-confirmed reversal patterns
Imbalance Zone Mapping: Marks price gaps and inefficiencies that often get filled
Each component contributes unique intelligence that validates or invalidates potential trade setups. The strategy requires minimum confluence scores before entering positions, ensuring that multiple independent systems agree on directional bias.
Core Strategy Architecture
1. Volatility Expansion Engine
The strategy begins with comprehensive volatility analysis:
volatility = ta.atr(volatilityPeriod)
volatilityPercent = (volatility / close) * 100
volatilityRank = ta.percentrank(volatilityPercent, 100)
Volatility percentile ranking provides context for current volatility relative to recent history. This measurement drives multiple strategy decisions:
- Position sizing: Higher volatility = smaller positions
- Stop distance: Higher volatility = wider stops
- Signal filtering: Extreme volatility (>80 percentile) triggers defensive mode
The strategy adapts to volatility rather than using fixed parameters, ensuring it remains relevant across different market regimes.
2. Price Efficiency and Chaos Measurement
The strategy calculates price efficiency to distinguish trending from ranging markets:
priceMovement = math.abs(close - close )
pathLength = math.sum(math.abs(close - close ), efficiencyPeriod)
efficiency = pathLength > 0 ? priceMovement / pathLength : 0
High efficiency (>0.6) indicates clean, directional movement suitable for trend-following. Low efficiency (<0.4) suggests choppy conditions where the strategy reduces activity or switches to mean-reversion logic.
Chaos level is measured using logarithmic range analysis:
rangeHigh = ta.highest(high, volatilityPeriod)
rangeLow = ta.lowest(low, volatilityPeriod)
atrSum = math.sum(ta.atr(1), volatilityPeriod)
chaosLevel = 100 * math.log10(atrSum / (rangeHigh - rangeLow)) / math.log10(volatilityPeriod)
High chaos (>60) triggers defensive positioning. Low chaos (<40) enables aggressive trend-following.
3. Directional Conviction System
The strategy implements complete ADX analysis with directional indicators:
= adx(14, 14)
ADX above 25 indicates emerging directional conviction. Above 40 indicates dominant conviction. The strategy uses conviction strength to:
- Filter entries: Minimum conviction threshold prevents trading in directionless markets
- Size positions: Higher conviction = larger positions (within risk limits)
- Set targets: Strong conviction enables wider profit targets
The difference between bullForce and bearForce determines directional bias and validates signal direction.
4. Adaptive Ribbon System
The strategy calculates 8 EMA layers with adaptive spacing:
stepSize = (slowPeriod - fastPeriod) / (ribbonLayers - 1)
ribbonLevel0 = ta.ema(close, fastPeriod)
ribbonLevel7 = ta.ema(close, slowPeriod)
Ribbon analysis provides:
- Trend direction: Fast > slow = bullish, fast < slow = bearish
- Trend strength: Wider ribbon = stronger trend
- Dynamic support/resistance: Ribbon layers act as price magnets
- Compression detection: Tight ribbon = energy buildup before breakout
The strategy only takes long trades when price is above the ribbon and short trades when below, ensuring alignment with trend structure.
5. Volume Pressure Analysis
The strategy estimates buying and selling pressure using candle structure:
buyPressure = close > open ? volume * ((close - open + upperWick * 0.5) / barSpan) :
close < open ? volume * ((upperWick + bodyMass * 0.3) / barSpan) : volume * 0.5
sellPressure = volume - buyPressure
pressureDelta = buyPressure - sellPressure
Pressure analysis validates signal direction:
- Long signals require positive pressure delta
- Short signals require negative pressure delta
- Extreme pressure (>70% of volume) suggests potential exhaustion
The strategy tracks cumulative pressure to identify accumulation and distribution phases.
6. Gauss Smoothing and Fractal Efficiency
The strategy applies 4th-order Gaussian filtering to eliminate noise:
gaussClose := math.pow(alpha, 4) * close +
4 * (1.0 - alpha) * nz(gaussClose ) -
6 * math.pow(1 - alpha, 2) * nz(gaussClose ) +
4 * math.pow(1 - alpha, 3) * nz(gaussClose ) -
math.pow(1 - alpha, 4) * nz(gaussClose )
Fractal efficiency is calculated using logarithmic path measurement:
fractalRatio = totalSpan > 0 ? math.log(rangeSum / totalSpan) / math.log(fractalSpan) : 0.0
fractalEfficiency = math.max(0, math.min(1, (fractalRatio + 1) / 2))
High fractal efficiency (>0.7) validates that momentum signals are backed by clean price action.
7. Laguerre Momentum Transform
The strategy uses adaptive Laguerre filtering for momentum measurement:
gamma = 0.7 * (1 - fractalEfficiency) + 0.1 * fractalEfficiency
L0 := (1 - gamma) * gaussClose + gamma * nz(L0 )
L1 := -gamma * L0 + nz(L0 ) + gamma * nz(L1 )
L2 := -gamma * L1 + nz(L1 ) + gamma * nz(L2 )
L3 := -gamma * L2 + nz(L2 ) + gamma * nz(L3 )
cu = (L0 > L1 ? L0 - L1 : 0) + (L1 > L2 ? L1 - L2 : 0) + (L2 > L3 ? L2 - L3 : 0)
cd = (L0 < L1 ? L1 - L0 : 0) + (L1 < L2 ? L2 - L1 : 0) + (L2 < L3 ? L3 - L2 : 0)
laguerreValue = cu + cd != 0 ? 100 * (cu / (cu + cd)) : 50
fractalMomentum = (laguerreValue - 50) * (1 + fractalEfficiency)
The adaptive gamma adjustment reduces lag during efficient moves and adds smoothing during choppy conditions. Fractal momentum above 20 validates bullish signals, below -20 validates bearish signals.
8. Temporal Flow Dynamics
The strategy analyzes price flow across multiple dimensions:
priceFlow = ta.ema(close, flowPeriod) - ta.ema(close, flowPeriod * 2)
flowDir = priceFlow > 0 ? 1 : -1
flowMagnitude = math.abs(priceFlow) / volatility
flowAccel = ta.change(priceFlow, 3)
Flow analysis provides:
- Flow direction: Confirms trend direction
- Flow magnitude: Measures flow strength relative to volatility
- Flow acceleration: Identifies momentum shifts
The strategy requires flow alignment with signal direction for entry validation.
9. Market Structure Analysis
The strategy tracks pivot highs and lows to identify structure breaks:
pivotTop = ta.pivothigh(high, pivotSpan, pivotSpan)
pivotBottom = ta.pivotlow(low, pivotSpan, pivotSpan)
Structure breaks occur when:
- Bullish: Price breaks above previous pivot high
- Bearish: Price breaks below previous pivot low
Structure shifts (change of character) occur when:
- Bullish: Downtrend breaks above previous pivot high
- Bearish: Uptrend breaks below previous pivot low
The strategy gives bonus confluence points to signals that align with structure breaks or shifts.
10. Order Block and Imbalance Detection
The strategy identifies institutional positioning zones:
orderBlockBull = close < open and close > open and volume > avgVol * 1.2
orderBlockBear = close > open and close < open and volume > avgVol * 1.2
gapUp = low > high and (low - high ) > volatility * 0.3
gapDown = high < low and (low - high) > volatility * 0.3
Order blocks mark zones where institutions placed large orders. The strategy uses these as:
- Entry zones: Look for entries near order blocks in trend direction
- Stop placement: Place stops beyond order blocks for protection
- Target zones: Opposite-direction order blocks become profit targets
Imbalance zones (gaps) often get filled, providing mean-reversion opportunities.
Multi-Dimensional Signal Generation
The strategy generates signals through five independent layers, each containing five detection mechanisms:
Layer 1: Rapid Scalp Signals (5 mechanisms)
- Laguerre oversold + flow bullish + price above fast ribbon
- Pressure index positive + flow reversal bullish
- Momentum bullish + volume surge + price above mid ribbon
- Strong bullish candle + ribbon bullish + pressure positive
- Fractal momentum positive + flow acceleration positive + ribbon aligned
Layer 2: Swing Position Signals (5 mechanisms)
- Ribbon bullish + price above slow ribbon + bullish regime
- Structure break bullish + momentum bullish
- Order block bullish + flow bullish + conviction strong
- Gap up + pressure extreme + ribbon aligned
- Range breakout up + cumulative pressure positive + flow strong
Layer 3: Momentum Continuation (5 mechanisms)
- Fractal momentum extreme + ribbon bullish + conviction strong
- Laguerre oversold + flow bullish + volume surge
- Momentum extreme + fractal momentum positive + ribbon expanding
- Extreme buy pressure + flow acceleration positive + bullish regime
- Bull force > bear force + conviction strong + ribbon aligned
Layer 4: Structure Confirmation (5 mechanisms)
- Structure shift bullish + volume surge
- Order block bullish + price above last pivot low + momentum bullish
- Gap up + flow bullish + ribbon bullish
- Structure break bullish + pressure extreme positive
- Volume absorption + pressure positive + price above mid ribbon
Layer 5: Confluence Boosters (5 mechanisms)
- Ribbon tight + ribbon expanding + ribbon bullish + volume surge
- Net flow positive + temporal force positive + bullish regime
- Fractal efficiency high + Laguerre oversold + flow magnitude strong
- Strong bullish candle + price above previous high + volume extreme
- Velocity positive + flow bullish + ribbon power strong
Each layer contributes 0 or 1 to the bull strength score. The strategy requires minimum confluence (default 2) before entering long positions. This multi-layer approach ensures that signals are validated across multiple independent dimensions.
Risk Management System
The strategy implements institutional-grade risk management:
Position Sizing:
- Risk percentage per trade (default 1% of equity)
- Dynamic adjustment based on volatility percentile
- Reduced sizing during high chaos or low efficiency
Stop Loss Placement:
stopLoss = close - (volatility * slMultiplier)
- ATR-based stops that adapt to current volatility
- Multiplier (default 1.5) provides breathing room
- Stops placed beyond order blocks when possible
Take Profit Targets:
takeProfit = close + (volatility * slMultiplier * tpMultiplier)
- Risk-reward ratio (default 2.5:1)
- Adjusted based on conviction strength
- Wider targets during strong conviction, tighter during weak
Trailing Stop System:
trailStop = close - (volatility * trailOffset)
- Optional trailing stop (default enabled)
- Offset (default 1.2x ATR) balances protection and breathing room
- Activates after position moves into profit
Visual Elements
Adaptive Ribbon: Multi-layer EMA ribbon with gradient coloring showing trend direction and strength
Entry Signals: Triangle shapes sized by signal strength (large for 5+ confluence, small for 2-3 confluence)
Structure Markers: Lines and labels marking structure breaks, shifts, and order blocks
Imbalance Boxes: Boxes marking price gaps and inefficiency zones
Regime Background: Subtle background coloring showing current market regime
Flow Background: Additional background layer showing flow direction
Comprehensive Dashboard: 18-row intelligence panel showing position status, signal strength, regime, ribbon state, pressure, momentum, structure, flow, conviction, Laguerre, volume, volatility, trade statistics, and win rate
The dashboard provides complete strategy intelligence with real-time metrics and performance tracking.
Strategy Parameters
Core Settings:
Ultra-Aggressive Mode: Maximum trade frequency (default enabled)
Min Signal Strength: Minimum confluence required (1-6, default 2)
Risk %: Risk per trade as percentage of equity (0.5-5.0%, default 1.0%)
TP Multiplier: Take profit as multiple of stop distance (1.0-10.0, default 2.5)
SL Multiplier: Stop loss as multiple of ATR (0.5-5.0, default 1.5)
Trailing Stop: Enable/disable trailing stop (default enabled)
Trail Offset: Trailing stop distance as multiple of ATR (0.5-3.0, default 1.2)
Advanced Parameters:
Volatility Period: ATR calculation length (5-50, default 14)
Efficiency Period: Price efficiency calculation period (5-100, default 20)
Flow Period: Temporal flow analysis period (10-50, default 20)
Ribbon Layers: Number of EMA layers (3-15, default 8)
Fast Period: Fastest EMA period (2-20, default 5)
Slow Period: Slowest EMA period (10-100, default 34)
Visualization:
Dashboard: Toggle metrics panel (default enabled)
Entry Signals: Toggle signal shapes (default enabled)
Regime Zones: Toggle background coloring (default enabled)
Adaptive Ribbon: Toggle ribbon display (default enabled)
How to Use This Strategy
Step 1: Configure Risk Parameters
Set risk percentage appropriate for your account size. 1% is conservative, 2% is moderate, 3%+ is aggressive. Never risk more than you can afford to lose on any single trade.
Step 2: Select Minimum Signal Strength
Default 2 provides balanced trade frequency and quality. Increase to 3-4 for higher quality but fewer trades. Decrease to 1 only in ultra-aggressive mode on highly liquid instruments.
Step 3: Adjust Risk-Reward Ratio
Default 2.5:1 provides good balance. Increase to 3-5:1 for swing trading. Decrease to 1.5-2:1 for scalping. Higher ratios require higher win rates to be profitable.
Step 4: Enable/Disable Trailing Stops
Trailing stops protect profits but can exit prematurely. Enable for trend-following, disable for mean-reversion. Adjust trail offset based on instrument volatility.
Step 5: Monitor Dashboard Metrics
Watch "POSITION" status, "BULL STR" and "BEAR STR" scores, "REGIME" classification, and "WIN RATE" percentage. These provide real-time strategy health assessment.
Step 6: Backtest Thoroughly
Test on at least 100 trades across different market conditions. Verify that win rate, profit factor, and drawdown meet your requirements. Adjust parameters if needed.
Step 7: Forward Test on Demo
Run strategy on demo account for at least 1 month before live trading. Verify that live performance matches backtest expectations. Monitor slippage and execution quality.
Step 8: Start Small on Live
Begin with minimum position sizes on live account. Gradually increase as confidence builds. Never risk more than 1-2% of account on any single trade initially.
Best Practices
Use on liquid instruments with tight spreads and reliable execution
Backtest with realistic commission (0.1%) and slippage (2 ticks minimum)
Test across multiple market conditions (trending, ranging, volatile, calm)
Verify minimum 100 trades in backtest for statistical significance
Monitor win rate - should be 45-60% for 2.5:1 risk-reward ratio
Check profit factor - should be >1.5 for robust strategy
Analyze maximum drawdown - should be <20% of account
Review trade distribution - avoid over-concentration in specific periods
Monitor signal strength distribution - most trades should be 3+ confluence
Check regime alignment - strategy should perform in directional regimes
Verify that losses are controlled - no single loss should exceed 2% of account
Ensure adequate trade frequency - at least 2-3 trades per week on daily timeframe
Combine with manual oversight - review signals before execution in early stages
Use appropriate timeframe - 15m-1H for day trading, 4H-1D for swing trading
Avoid trading during major news events unless specifically tested for that
Keep detailed trade journal to identify patterns in wins and losses
Strategy Limitations
Algorithmic strategies cannot predict black swan events or unprecedented market conditions
Backtested performance does not guarantee future results
Slippage and commission in live trading may differ from backtest assumptions
The strategy requires sufficient volatility - may underperform in extremely low volatility
Signal generation depends on multiple calculations - computational lag possible on slow systems
The strategy works best on trending instruments - may struggle in perpetual ranges
Confluence scoring requires all components to be relevant - some may be less meaningful on certain instruments
The strategy cannot account for fundamental catalysts or news events
Trailing stops can exit prematurely during volatile but ultimately profitable moves
The strategy requires adequate liquidity for execution at desired prices
Parameter optimization can lead to overfitting - use walk-forward analysis
The strategy shows what signals exist, not why - market context still matters
Technical Implementation
Built with Pine Script v6 using:
Complete volatility expansion engine with ATR percentile ranking
Price efficiency calculator using path length analysis
Chaos measurement using logarithmic range calculations
Full ADX implementation with directional indicators
8-layer adaptive EMA ribbon with volatility-based spacing
Volume pressure estimation using candle structure analysis
4th-order Gaussian filter for noise elimination
Fractal efficiency measurement using logarithmic path complexity
Adaptive Laguerre transform with 4 cascading filter levels
Temporal flow analysis with direction, magnitude, and acceleration
Pivot-based market structure tracking
Order block and imbalance zone detection
25-factor confluence scoring system across 5 signal layers
Dynamic position sizing based on volatility and regime
ATR-based stop loss and take profit calculations
Optional trailing stop system with volatility adjustment
Comprehensive dashboard with 18 metrics and performance tracking
Alert system for all entry and exit signals
The code is fully open-source with extensive comments explaining each component and signal generation logic.
Originality Statement
This strategy is original and represents a complete trading system built from proprietary knowledge rather than indicator mashups. The strategy is justified because:
It synthesizes 13 independent analytical systems into a unified execution framework
The 25-factor confluence scoring across 5 signal layers provides multi-dimensional validation
Each component is built from first principles using mathematical models and market microstructure concepts
The adaptive nature of the system (volatility, efficiency, regime) ensures relevance across market conditions
Risk management is integrated at the core rather than added as an afterthought
The strategy doesn't rely on any single indicator or pattern - it builds intelligence from multiple independent sources
Fractal efficiency and Laguerre adaptation provide unique momentum measurement not found in standard systems
Temporal flow analysis adds a dimension of price dynamics beyond simple trend following
Market structure tracking provides context that pure indicator-based systems lack
The comprehensive dashboard provides complete strategy intelligence and performance tracking
The system is designed for real trading with realistic risk management, not just backtest optimization
Each component contributes unique intelligence: volatility drives adaptation, efficiency filters conditions, chaos identifies regimes, conviction measures strength, ribbon provides structure, pressure shows order flow, Gauss filtering eliminates noise, fractal efficiency validates momentum, Laguerre provides adaptive momentum, flow tracks dynamics, structure provides context, order blocks mark zones, and confluence validates signals. The strategy's value lies in combining these complementary perspectives into a cohesive, adaptive trading system with institutional-grade risk management.
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss and is not suitable for all investors.
Algorithmic trading strategies are tools for systematic execution, not guarantees of profit. Backtested performance does not guarantee future results. Past strategy performance does not predict future performance. Market conditions change, and strategies that worked historically may not work in the future.
The signals generated are mathematical calculations based on current market data, not predictions of future price movement. High confluence scores, regime alignment, and structure breaks do not guarantee profitable trades. Users must conduct their own analysis and risk assessment before making trading decisions.
Always use proper risk management, including stop losses and position sizing appropriate for your account size and risk tolerance. Never risk more than you can afford to lose. Consider consulting with a qualified financial advisor before making investment decisions.
The author is not responsible for any losses incurred from using this strategy. Users assume full responsibility for all trading decisions made using this tool. Thoroughly backtest and forward test any strategy before live trading.
-Made with passion by officialjackofalltrades Strategy

AG Pro Correlation Breakdown Map [AGPro Series]AG Pro Correlation Breakdown Map
Overview / What it does
AG Pro Correlation Breakdown Map is an overlay indicator designed to monitor whether a chart symbol is maintaining, weakening, breaking, or repairing its relationship with a benchmark symbol.
The default benchmark in this version is Bitcoin via BINANCE:BTCUSDT, which makes the tool especially useful for crypto traders who want to understand whether an altcoin is still moving in line with BTC or beginning to decouple from it.
This script does not attempt to answer whether correlation is simply high or low in isolation. Its purpose is more specific: it first checks whether a meaningful benchmark relationship existed, then evaluates whether that relationship is starting to deteriorate, whether the deterioration is becoming a confirmed breakdown, and whether the relationship is later stabilizing again.
The result is a regime-style map that helps users read benchmark dependency through distinct states such as coupled, strained, breaking, broken, repairing, and recoupled. This makes the script useful for contextual analysis, benchmark-relative behavior studies, and chart review workflows where users want more than a single rolling-correlation number.
Unique Edge
The main difference of this script is that it is not a generic correlation line, not a spread-trading engine, and not a simple benchmark overlay.
Its focus is the structure of relationship failure.
Instead of only plotting short-term correlation, the script combines four layers:
1. prior relationship validation,
2. short-vs-long correlation deterioration,
3. independent price behavior,
4. persistence and repair logic.
That combination is what separates a temporary wobble from a more meaningful benchmark breakdown event.
This also makes the script distinct from tools that measure correlation pressure or synchronized stress. Correlation Breakdown Map is built around the question: “A relationship existed before, but is it now failing, and if so, how cleanly?”
Methodology
The script starts by selecting a benchmark series and transforming price data into returns. Users can choose between log returns and percent returns.
A short correlation window and a long correlation window are then calculated between the chart symbol and the benchmark. The long window is used to judge whether a stable benchmark relationship has existed, while the short window is used to detect more recent deterioration.
The model then evaluates the gap between long and short correlation, along with short-correlation slope behavior. A benchmark relationship is considered more vulnerable when the short window weakens materially relative to the long window and the short-correlation slope also softens.
To avoid treating every statistical wobble as a true event, the script also checks for independent price behavior. This layer measures whether the chart symbol is beginning to move in a way that is meaningfully different from the benchmark over a configurable lookback period.
Finally, persistence and repair conditions are applied. This allows the script to separate brief instability from a more durable breakdown state, and later identify whether the relationship is beginning to normalize again.
Signals & Alerts / States
This script is primarily a state-mapping tool rather than a directional buy/sell engine.
The core states are:
Coupled
The chart symbol remains meaningfully aligned with the benchmark relationship structure.
Strained
The prior relationship still exists, but weakness is starting to appear.
Breaking
The relationship is under active deterioration and may be transitioning into a more meaningful failure.
Broken
The chart symbol is behaving as if benchmark linkage has materially weakened.
Repairing
The breakdown is no longer cleanly expanding, and the relationship may be stabilizing.
Recoupled
The benchmark relationship has improved enough to suggest that the prior structure is functioning again.
The Breakdown Score is used as a compact summary value. It is not intended to be interpreted as a trade signal on its own. It is a regime-strength readout that helps users compare the current condition of the relationship with the underlying state labels.
Key Inputs
Benchmark Symbol
Sets the comparison symbol. The default is BINANCE:BTCUSDT.
Benchmark Timeframe
Allows users to keep the benchmark on chart timeframe or compare against another timeframe.
Source
Selects Close, HLC3, or OHLC4 for the benchmark study.
Short Correlation Length / Long Correlation Length
Define the fast and slow windows used to evaluate current deterioration versus prior relationship structure.
Stable Relationship Threshold
Controls how strong the historical relationship must be before the script treats later weakness as a true breakdown candidate.
Breakdown Threshold / Repair Threshold
Control how strict the transition logic is for deterioration and recovery.
Min Long/Short Correlation Gap
Requires a meaningful difference between longer-term and shorter-term correlation before escalation.
Independent Move Threshold
Defines how much benchmark-relative price independence is required before the script treats the event as more than a statistical fluctuation.
Breakdown Confirmation Bars / Repair Confirmation Bars
Control persistence and confirmation sensitivity.
Visual Settings
Users can customize theme, visual intensity, panel font size, panel position, event visibility, trail visibility, and chart context density.
Limitations & Transparency
Correlation is a descriptive relationship metric, not a causal model.
A relationship breakdown does not automatically imply immediate continuation, reversal, trend acceleration, or trade opportunity. It only means the chart symbol is no longer behaving as consistently relative to the selected benchmark under the current settings.
Different assets, timeframes, and volatility regimes can produce different correlation behavior. A benchmark relationship that looks stable on one timeframe may be much less stable on another.
Short lookbacks can react faster but may create more noise. Longer lookbacks can be more stable but slower to react.
This script should be interpreted in the context of market structure, volatility, liquidity, and the chosen benchmark. It is a framework for reading relationship quality, not a guarantee engine.
Risk Disclosure
This indicator is for analytical and educational use.
It does not provide financial advice, does not predict future price direction, and should not be used in isolation for trading decisions. Users should perform their own analysis, validate settings on the markets they follow, and apply appropriate risk management. Indicator
