Regime combiner
One code from 0 to 5 that names which volatility and trend state the market is in.
RegimeCombiner takes two regime indicators and returns one code: the volatility regime times 2, plus the trend regime. Normally the inputs are VolatilityRegime, which gives 0 for low, 1 for medium or 2 for high from the fast-to-slow ATR ratio (below 0.8 is low, above 1.3 is high), and TrendRegime, which gives 1 when ADX is above 25 and 0 otherwise. It stays blank until both inputs have a value.
How to read it
- The line sits in its own pane below the price. Its values are codes, not prices, so do not compare its height with the candles.
- Codes 0 and 1 are low volatility, 2 and 3 medium, 4 and 5 high. Even codes are ranging and odd codes are trending.
- The line only steps when either input changes state, so a flat run means both regimes held.
- It is blank while either input is blank, such as during an ATR or ADX warm-up.
What it outputs
- Regime code
- Volatility times 2 plus trend, from 0 to 5: 0 low and ranging, 1 low and trending, 2 medium and ranging, 3 medium and trending, 4 high and ranging, 5 high and trending.
Pitfalls
- Both inputs must be regime indicators, not price. Fed the close, it returns three times the close (about 2,300 on SPY), which means miswiring, not a regime.
- Read the six states, not the distance between codes: 5 is not five times 1.
- This indicator has no settings of its own. The volatility cut-offs (ATR ratio 0.8 and 1.3 by default) and the trend cut-off (ADX 25 by default) come from the two input indicators.