Regime entry
Marks bars where a long-entry test picked by the market regime passes, confirmed by trend, volume and momentum flags.
It reads a market regime label and applies a different long-entry test for each one, using the recent low and high and the slope of the low. Explosive trends fire on a close near the high with a steeply rising low, or on a shallow pullback to the low with momentum. Strong trends fire on a close back near the rising low or above VWAP near the high, choppy markets on a close at the low, consolidation on a close at the top of a tight range, and any other label on a close just above the low. Volume trend is needed in every branch, and uptrend in all but the choppy and consolidation branches.
How to read it
- Markers sit on the candles where the output is True. Unmarked candles mean no branch's test passed on that bar.
- Markers come in runs: in the September 2026 SPY sample the output was True on about a quarter of bars, in 163 runs averaging about 30 bars. Read the first marker of a run as the entry point.
- A quiet stretch means the regime label and flags did not line up with any branch, not that the indicator is switched off.
What it outputs
- Entry
- True on bars where the entry test for the current regime passes; blank on every other bar.
When it fires
On each bar where the test for the current regime label passes with its flags true. The first bar of a run is when the setup first completes; the September 2026 SPY sample had 163 such starts, about 7.8 a day.
Pitfalls
- The test looks only for upside conditions and has no exit. The matching exit is the separate RegimeExit indicator in the same file.
- Any regime label the code does not name, including a misspelled one, falls into the balanced test, so a label mismatch silently changes the rule.
- The strong-trend branch compares close with VWAP with no blank check, so a blank VWAP raises an error. The default SPY run raised none; this is from reading the code.