Skip to content
Strategy

Market Regime Filter

Market Regime Filter is not a standalone entry system - it is a regime filter that wraps another strategy. The premise: most strategies have a market they work in and a market they bleed in.

Market filter

Market Regime Filter is not a standalone entry system - it is a regime filter that wraps another strategy. The premise: most strategies have a market they work in and a market they bleed in. A trend-following signal that prints beautifully in a strong tape will chop you to pieces in a directionless one. So rather than improving the signal, this filter improves when you are allowed to act on it - trade only while the broad market is favourable, and stand down when it isn't. That is why its headline benefit is a better Sharpe ratio: it removes trades taken in conditions where the edge doesn't exist, which cuts volatility more than it cuts return.

It is a hard-difficulty, daily filter applicable to all strategies, distinguishing trending from sideways markets.

How it trades

IngredientMeaning
MARKETREGIME()1 when market conditions are favourable, 0 when they are not
StrategySignal()A placeholder for the underlying strategy's own entry condition

Buy (favourable market AND your signal fires):

MARKETREGIME() == 1 AND StrategySignal()

Sell (regime turns unfavourable):

MARKETREGIME() == 0

Two translations from the strategy sheet. > > 1. The sheet writes MARKETREGIME() = 1 and = 0. (The same > treatment TTM Squeeze's SQUEEZEON() = FALSE gets.) > 2. StrategySignal() is a placeholder, not a function. It is not implemented and not in the > registry - it stands for whatever entry your underlying strategy uses. Throughout the tests and > examples a concrete Close > SMA(50) stands in for it: > > > BUY WHEN MARKETREGIME() == 1 AND Close > SMA(50) > SELL WHEN MARKETREGIME() == 0 > > > Swap that clause for any entry - THREEBARPLAY(), VOLUMEDRYUP() AND Close > HIGHEST(20) - and > the regime filter gates it unchanged. The exit is deliberately regime-only: a regime change takes > you out regardless of what the underlying strategy thinks.

When it works best

A universal overlay - it applies to all strategies rather than competing with them, and its benefit is measured in risk-adjusted terms: improved Sharpe ratio from skipping trades taken in hostile conditions. The costs are real: it requires market index data you must supply, it will sit out otherwise-valid signals during quiet or early-trend markets, ADX is lagging so the regime flips somewhat after the market actually turns, and the thresholds (EMA 50, ADX 20) are regime assumptions worth tuning per market.

All strategies

Backtest this strategy yourself

Build these rules on the Free plan, adjust them, and see how they would have traded.