Regime Filter
One line says bull or bear. The other says the swing is on. You want both.
Own pane · Daily · Indices first (SPY, QQQ); any liquid name
The Regime Filter draws two lines. One answers whether the market is in a bull or bear regime. The other answers whether a swing is currently on. You want both agreeing before you take a directional trade; when they disagree, the market is between states and position sizes should reflect that.
What it shows
- A weekly-trend regime line: 1 for bull, 0 for bear, with a hysteresis band so it does not flip on noise.
- A short-term swing line from a fast oscillator: 1 when a swing is on.
- Green background when regime and swing agree; alerts on every flip.
How it reads the market
The oldest rule in the book: trade swings in the direction of the regime. The regime comes from confirmed weekly closes against a long moving average, with a buffer band so a single bad week cannot flip the state. The swing state comes from a fast z-scored oscillator turning up out of oversold. Both on at once is the highest-quality window.
Settings
| Setting | Default | What it does |
|---|---|---|
| Regime length | 30 weeks | The moving average that defines the long-term trend. |
| Hysteresis band | 2% | How far beyond the average price must close to flip the regime. |
| Swing thresholds | on at -1, off at +1 | Where the short-term swing state switches. |
Everything is an input: colors, thresholds and time windows adjust from the indicator's settings panel, no code needed.
Built-in alerts
- Regime flips bull
- Regime flips bear
- Confluence on
- Confluence off
Set them once from TradingView's alert dialog and get notified on your phone, no chart-watching required.
Comes with the membership
The whole indicator suite is included with the paid plan, $20/month or $200/year. Subscribe, submit your TradingView username, and the scripts land in your TradingView library.
Get full accessHow to add it to your chart
- Request access above with your TradingView username (one request covers the whole suite).
- We grant it on TradingView, usually within 24 hours; TradingView notifies you.
- On your chart, open Indicators → Invite-only scripts and add Regime Filter.
When to use it, and when not to
It earns its place when
- You want one glance to tell you whether to be long, flat, or defensive.
- You trade swings and keep getting chopped up during transitions.
- You size positions by conviction and need conviction to come from somewhere.
Leave it off the chart when
- You are day trading. Regime is a weeks-to-months measure and says nothing about the next two hours.
- The market just gapped on a single event. Regime filters lag by construction, which is what makes them stable.
- You want to catch the exact turn. A filter that flips early is a filter that flips constantly.
Common questions
What is a market regime?
A stretch of time where the market's behaviour is consistent: trends persist, or they fail; dips get bought, or they keep going. Regimes matter because the same setup has a completely different expectancy depending on which one you are in.
Why two lines instead of one?
Because they answer different questions. The regime line is slow and tells you which side of the market to be on. The swing line is faster and tells you whether the current move has legs. A single line has to compromise between the two and ends up good at neither.
What do I do when the two lines disagree?
Treat it as a transition and cut size. Disagreement is not a signal to take the other side, it is a signal that the market has not decided. Most drawdowns in trend systems happen precisely in these windows.
How much does it lag?
Enough to be stable, which is the trade you are making. A regime filter that calls the turn on the day would flip several times a month and be useless. This one is built to be late and right rather than early and noisy.
Related reading
Our implementation of the classic regime-plus-swing confluence concept.