RegimeShiftPro
- Indicateurs
- Version: 1.0
- Activations: 5
How it works
The indicator runs one to three independent change-point detectors on the standardized returns of the symbol. Each detector accumulates evidence for a shift in the return distribution and declares a new regime — Up or Down — only once that evidence passes its threshold. Ordinary day-to-day fluctuation is absorbed by a slack term and never triggers a signal.
- With a single detector enabled, the indicator follows that detector directly.
- With two or three detectors enabled, a regime change is confirmed only when every enabled detector agrees on the same direction (consensus). The three default detectors are tuned fast / medium / slow, so consensus means a shift that shows up on more than one horizon at the same time.
On the chart
- Candles are coloured by regime: green in an Up regime, red in a Down regime, grey while neutral (can be switched off).
- A regime line sits below price in an Up regime and above price in a Down regime, and disappears while the regime is neutral.
- An arrow marks every confirmed regime change.
- An optional early-majority arrow marks the point where the detectors are one vote short of full consensus — a leading heads-up before confirmation.
- A compact label shows the active mode, the current regime, and how often the detectors have historically confirmed one another.
How to use it
- Take trades in the direction of the confirmed regime; stand aside while it is neutral.
- Treat an early-majority arrow as preparation and a confirmed arrow as the trigger.
- On lower timeframes, a structural reaction (close or reverse) keeps the regime honest when price invalidates the level the signal was built on.
What the settings do
The defaults are a balanced starting point. Every detector parameter is exposed and can be optimized in the Strategy Tester, so you can tune RegimeShiftPro to the symbol and timeframe you trade.
- Lookback (per detector) — the window that defines "normal" behaviour. Larger: the baseline reacts slowly, so only a sustained change is flagged — fewer, later, steadier signals. Smaller: the baseline tracks recent volatility closely — earlier signals, but more of them and more noise.
- Slack K (per detector) — how much steady drift is treated as normal and ignored. Larger: small persistent moves are absorbed and only a clear, fast change in the return distribution turns the regime — fewer signals. Smaller: the detector reacts to mild drift — more signals, more false ones.
- Threshold H (per detector) — how much accumulated evidence is needed before the regime turns. Larger: regime changes are rarer, later and higher-conviction. Smaller: the regime flips quickly and more often, with more whipsaw.
- Number of detectors enabled — one detector is the most responsive setting and simply follows that detector. Two or three require unanimous agreement, which removes most isolated signals at the cost of confirming a little later.
- Structural reaction — None lets the regime stand on the detector view alone. Close regime spends more time flat, stepping aside whenever price breaks the extreme the signal was built on. Reverse regime is the most active: it flips immediately on that break and can whipsaw in choppy ranges.
- Early-majority layer — on adds a leading arrow when the detectors are one vote short of consensus; off shows confirmed changes only.
- Agreement window — affects only the on-chart agreement statistic, not the signals. Larger reports a higher agreement percentage (detectors that turn further apart still count as agreeing); smaller is stricter.
- Stat scan depth — performance only. It caps how far back the agreement statistic is measured; a smaller value loads faster and weights recent history. It does not change the regime or the arrows.
Inputs
- Detector 1 / 2 / 3 — Enable, Lookback, Slack K, Threshold H.
- Behavior — Structural reaction, Early-majority, Agreement window, Stat scan depth, Show stats label.
- Display — Colour candles by regime.
Notes
- Works on any symbol and any timeframe.
- Needs a few dozen bars of history before the first regime appears (about 65 bars with the default settings).
- The forming (current) bar is recalculated on every tick and its regime can still change until the bar closes; closed bars are final and are not repainted.
- RegimeShiftPro is an analytical tool. It does not place orders and does not predict price — use it as one input to your own decision process.
