Cập nhật

Adaptive MACD Regime, Volatility Bands & Conviction

600
# Adaptive MACD — Regime, Volatility Bands & Conviction

## What this is

This is a single, self-contained momentum framework built around **one normalized MACD core**. Instead of plotting a raw MACD and leaving you to judge it, the script surrounds that core with the context a momentum reading needs to be usable: a market-regime filter, an adaptive length stage, a multi-timeframe agreement check, a volatility band, and a conviction score that combines them into one number. It runs on **any symbol and any timeframe** — the price source and every optional reference feed are selectable in Settings.

It is a study/indicator (not a strategy). It does not place orders and does not claim any performance.

---

## Why these components are combined (mashup rationale)

A plain MACD only answers "is momentum up or down right now." On its own it has two well-known weaknesses: it whipsaws during sideways markets, and its fixed 12/26/9 lengths are arbitrary for any given symbol or timeframe. Each module below exists to fix a specific one of those weaknesses, and they are deliberately chained so the output of one informs the next:

1. **Normalized MACD core (L1)** — the MACD histogram is converted to a rolling **z-score**, so a reading of "+2" means the same thing on a low-priced FX pair, a high-priced index, or a 1-minute vs daily chart. Raw MACD values are not comparable across instruments; the z-score is. This is what makes the rest of the framework symbol-agnostic.

2. **Regime filter (L2)** — efficiency ratio + ADX + a volatility-clustering measure classify the market as **Trend / Range / Volatile**. This is used to decide whether a momentum signal should be trusted: MACD crosses are reliable in trends and noisy in ranges, so the regime gates and reweights the core signal rather than treating every cross equally.

3. **Adaptive length stage (L3)** — a dominant-cycle estimate (Ehlers homodyne) retunes the fast/slow/signal lengths toward the market's measured rhythm, instead of a static 12/26/9. You can switch this to a volatility-driven mode or fall back to fixed lengths. This directly addresses the "arbitrary lengths" weakness.

4. **Multi-timeframe confluence (MTF)** — the same MACD logic is evaluated on four higher timeframes, confirmed on bar close so it does not repaint. A single-timeframe cross is weak; agreement across timeframes is the filter.

5. **Volatility band + fade (L4)** — a volume-weighted standard-deviation band around price flags stretched conditions and band-rejection ("fade") setups, used as a mean-reversion counterweight to the trend logic.

6. **Conviction + vetoes (CON)** — all of the above are blended into a single **0–100 conviction score** with hard vetoes (e.g. counter-regime, timeframe disagreement, volatility spike). This is the part that turns several separate readings into one decision so you are not eyeballing five panels.

7. **Risk framework (RISK)** — once there is a signal, it derives an ATR stop, R-multiple targets, and a position-size suggestion from your account equity and risk %. This is shown as thin Entry / Stop / TP1 / TP2 lines on price.

In short: **L1 makes momentum comparable, L2 decides if it can be trusted, L3 tunes it, MTF confirms it, L4 adds a reversion check, CON scores it, and RISK frames it.** None of the layers is decorative — remove any one and the others lose context.

---

## How to use it

1. Add it to any chart and timeframe. It plots in its own lower pane; the trade levels and dashboard overlay on price.
2. Read the **dashboard header**: it shows the current action (BUY / SELL / HOLD / WAIT / FLAT) and the entry/stop.
3. Check **VERDICT + conviction**: a higher score with no active vetoes is a stronger context. Vetoes are listed explicitly so you can see *why* something is blocked.
4. Use **REGIME** to set expectations — trend-following signals make more sense in a Trend regime; the Stretch/Fade rows matter more in Range.
5. The **Entry / Stop / TP1 / TP2 lines** on price show the framework's risk levels for the current signal only; previous trade lines are removed automatically.
6. Optional feeds (reference symbol, volatility index, open interest, cross-asset) are **blank by default** — add your own symbols if you want those confluence inputs, or leave them off. The script degrades gracefully and tells you in the FEEDS row which are live.

---

## Settings worth knowing

- **Price source** — the series the whole engine runs on. Defaults to close; works on any market.
- **Optional reference feeds** — all blank by default and entirely optional, so the script is not tied to any one market or exchange. Enter symbols relevant to your instrument if you want them.
- **Adaptive length driver** — Homodyne (cycle-adaptive), Volatility, or Fixed.
- **Risk & sizing** — account equity, risk %, ATR stop multiple, and value-per-move; the size output is a suggestion only.
- **Dashboard theme** — Auto/Dark/Light; Auto flips colors to stay readable on white or black backgrounds.
- **Name / symbol / timeframe label** — kept on by default so the chart always identifies what is plotted.

---

## What makes it original

It is not a wrapper around a built-in MACD. The core is rebuilt to accept a *series* length (so it can be retuned every bar), normalized to a cross-asset z-score, gated by an explicitly classified regime, and merged with multi-timeframe state into a single weighted conviction score with named vetoes. The volatility-band fade logic and the dominant-cycle length adaptation are integrated into that same score rather than shown as separate, disconnected studies.

---

## Notes and limitations

- Confirm-on-close is on by default to avoid repainting; intrabar values can still update until the bar closes.
- The optional "Call/Put strike" row is a convenience hint derived from price and your strike interval only — **no options-chain data is read and no option P&L is implied.**
- Higher-timeframe and reference-feed requests depend on your data subscription; if a feed is unavailable the script disables the dependent input and continues.

---

## Disclaimer

This script is provided for educational and informational purposes only. It is a technical study, not investment, financial, or trading advice, and not a solicitation to buy or sell any instrument. It does not guarantee any result. Markets involve risk, including loss of capital. Indicator signals, levels, and the position-size suggestion are illustrative and must not be relied on as the basis for any trade. Always do your own research and consider consulting a licensed financial professional before trading. The author accepts no liability for any loss arising from use of this script. Past behavior of any indicator is not indicative of future results.
Phát hành các Ghi chú
Adaptive MACD (MACD ARC) — what's new

The MACD core, the Ehlers adaptive lengths, the regime engine, the MTF confluence and the risk scaffold are unchanged. This upgrade makes the context forward-looking and the signals honest.

• Forecast-led volatility band — the price band and the exhaustion/fade now scale by a one-step-ahead forecast of return volatility (a reduced path-dependent model fit by a standardized regression), so they pre-widen before an expansion and pre-tighten before a lull. Self-dampens when its own fit is weak.

• Derived expected volatility — no live volatility index is assumed; an expected-vol read is derived from the chart-vs-spot basis (detrended before z-scoring) and becomes the spike filter and a conviction de-rate. A live index stays selectable and overrides it.

• Jump-robust — return variance split into a continuous part (bipower) and a jump part; a fresh jump widens the band, blocks a fade and de-rates conviction.

• Proven gate — each side is confirmed forward against an unconditional base rate with a Wilson lower bound (learning / no edge / unproven / PROVEN), with an optional strict mode and a gold badge on a proven signal.

• Gate A/Bs — every veto (regime, MTF, higher-timeframe, CVD, volatility, flat-z) reports whether firing with it on actually paid more than with it off, on this symbol.

• Evidence-weighted conviction — each component (core, MTF, CVD, OI, basis, regime, cross-asset, fade) is re-weighted by its own past-only directional accuracy; the hand weights become priors.

• Strong signals + strength numbers — one clean entry mark with a 0–100 strength (gold when proven), a Min-strength input and a Strong+proven switch; the strength also prints on divergences and shows live in the dashboard, with Proven and Gate-A/B rows.

• Oscillator or overlay — a single "Price overlay" master turns the price drawings off to run it as a pure lower-pane oscillator, or collapse the pane to use it as a price tool. Dashboard is a Compact/Pro dropdown with Compact as default. Both basis legs default to NIFTY (future NSE:NIFTY1!, spot NSE:NIFTY), each user-changeable to any asset.

• Suite parity — a structured JSON alert() webhook on a shown signal, plus a lean data-window export bus (z-hist, signed conviction, expected-vol z, forecast lead, proven flag, signal strength).

Still free and open, generic technical terms, any-market framing, non-repainting, with the options and sizing layers kept OFF / clearly labelled as study aids, and the full mashup rationale, concept credits, limits and disclaimer in the description.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.