Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when adding a regime filter to any directional strategy on Superior Trade — anything described as regime gate, trend filter, directional confirmation, ADX gate, EMA-separation filter, trade-or-skip overlay. Provides three reusable building blocks (regime_strong_bear, regime_strong_bull, regime_range) that wrap entry signals with triple-confirmation (EMA separation + ADX + N-bar return). Validated as the difference between fragile and robust trend strategies — fewer trades, cleaner equity cur
.claude/skills/superior-trade-regime-overlay/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 23% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 10% | 0% |
A reusable filter that wraps any directional strategy and only allows entries when three independent regime confirmations align. Validated as the difference between a fragile and a robust trend strategy.
Searchable under: regime filter, trend gate, trade-or-skip filter, directional confirmation, ADX gate.
After 21 backtests, the single biggest performance lever was not entry logic, stop sizing, or trailing config. It was whether the strategy traded at all during specific market structure.
The proof:
The first version captured a real edge mixed with random noise. The third version captured only the real edge. Smaller absolute return; cleaner equity curve; no losing periods.
A signal is "in regime" when ALL three of these hold simultaneously:
| Indicator | Threshold | What it confirms | |---|---|---| | (EMA50 - EMA200) / EMA200 | < -0.06 (for bear) | Structural trend direction — not a fresh cross, real separation | | ADX(14) | > 25 | Strength of the current trend | | close.pct_change(30) | < -0.10 (for bear) | Recent momentum is actually moving |
Three independent angles — structure, strength, recency. A market can satisfy any one or two by accident; satisfying all three is genuinely rare and genuinely informative.
For long-side strategies, invert the signs:
(EMA50 - EMA200) / EMA200 > +0.06ADX(14) > 25 (same — ADX is direction-agnostic)close.pct_change(30) > +0.10pythondef regime_strong_bear(df: pd.DataFrame) -> pd.Series: ema50 = ta.EMA(df, timeperiod=50) ema200 = ta.EMA(df, timeperiod=200) adx = ta.ADX(df, timeperiod=14) ema_sep = (ema50 - ema200) / ema200 ret_30 = df["close"].pct_change(30) return (ema_sep < -0.06) & (adx > 25) & (ret_30 < -0.10) def regime_strong_bull(df: pd.DataFrame) -> pd.Series: ema50 = ta.EMA(df, timeperiod=50) ema200 = ta.EMA(df, timeperiod=200) adx = ta.ADX(df, timeperiod=14) ema_sep = (ema50 - ema200) / ema200 ret_30 = df["close"].pct_change(30) return (ema_sep > 0.06) & (adx > 25) & (ret_30 > 0.10) def regime_range(df: pd.DataFrame) -> pd.Series: adx = ta.ADX(df, timeperiod=14) return adx < 25
The range-regime check is the opposite end of the spectrum — useful for gating mean-reversion strategies (see bollinger-reverter-4h).
Apply this overlay to any signal-driven entry. The cost is fewer trades; the benefit is the trades you do take fire in the right environment.
| Strategy | Without overlay | With overlay | |---|---|---| | Donchian breakdown BTC | 23 trades, 56.5% win, +12.85%, 3.69% DD | 6 trades, 100% win, +6.69%, 0% DD | | (Same, second-half only) | 8 trades, 25% win, -4.32% | 0 trades, no PnL |
The overlay traded the second column's win rate and drawdown for the first column's absolute return. Most production strategies should prefer the second column.
| Parameter | Conservative | Aggressive | Notes | |---|---|---|---| | EMA separation threshold | 0.08 | 0.04 | Tighter = wait for deeper structural moves | | ADX threshold | 30 | 20 | Higher = stricter trend-strength requirement | | Return lookback bars | 40 | 20 | Window for "actual momentum" check | | Return threshold | 0.15 | 0.06 | How much momentum needed |
Start conservative (0.06 / 25 / -0.10). Loosen only if the gate eliminates so many trades that the strategy's edge can't compound.
bollinger-reverter-4h) work IN range regimes — use regime_range (ADX < 25) instead of bear/bull strong gatesMost directional strategies in this repo benefit from this overlay:
donchian-strong-regime — uses bear overlay (validated)The overlay file itself is regime-agnostic — it provides functions for both bear and bull, and a range complement.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-14 | pass→pass | 15,388 | 11,756 | -24% | 1 | 1 | 0% | 2,559 | 3,351 | +31% | 0 | 0 | — |
case-02 | fail→pass | 21,134 | 18,820 | -11% | 1 | 1 | 0% | 4,550 | 4,678 | +3% | 0 | 0 | — |
case-01 | fail→pass | 23,015 | 23,021 | +0% | 1 | 1 | 0% | 5,090 | 5,381 | +6% | 0 | 0 | — |
case-03 | fail→pass | 27,207 | 18,484 | -32% | 1 | 1 | 0% | 4,590 | 5,661 | +23% | 0 | 0 | — |
case-04 | fail→fail | 17,318 | 14,733 | -15% | 1 | 1 | 0% | 3,116 | 4,256 | +37% | 0 | 0 | — |
case-05 | pass→pass | 20,507 | 13,962 | -32% | 1 | 1 | 0% | 3,103 | 3,677 | +18% | 0 | 0 | — |
case-06 | pass→pass | 17,993 | 13,367 | -26% | 1 | 1 | 0% | 2,738 | 3,589 | +31% | 0 | 0 | — |
case-07 | fail→pass | 17,553 | 11,362 | -35% | 1 | 1 | 0% | 3,233 | 3,706 | +15% | 0 | 0 | — |
case-08 | fail→fail | 22,114 | 13,337 | -40% | 1 | 1 | 0% | 4,245 | 4,148 | -2% | 0 | 0 | — |
case-09 | fail→pass | 15,610 | 7,891 | -49% | 1 | 1 | 0% | 2,784 | 3,069 | +10% | 0 | 0 | — |
case-10 | fail→fail | 16,628 | 15,134 | -9% | 1 | 1 | 0% | 2,839 | 4,356 | +53% | 0 | 0 | — |
case-11 | pass→pass | 23,599 | 3,616 | -85% | 1 | 1 | 0% | 3,908 | 2,145 | -45% | 0 | 0 | — |
case-12 | fail→pass | 18,470 | 6,649 | -64% | 1 | 1 | 0% | 3,075 | 2,577 | -16% | 0 | 0 | — |
case-13 | fail→pass | 18,431 | 4,853 | -74% | 1 | 1 | 0% | 2,792 | 2,449 | -12% | 0 | 0 | — |
case-15 | fail→pass | 12,583 | 7,167 | -43% | 1 | 1 | 0% | 2,136 | 2,721 | +27% | 0 | 0 | — |
case-16 | fail→pass | 10,230 | 5,668 | -45% | 1 | 1 | 0% | 1,944 | 2,601 | +34% | 0 | 0 | — |
case-17 | fail→pass | 16,862 | 12,296 | -27% | 1 | 1 | 0% | 2,813 | 3,565 | +27% | 0 | 0 | — |
case-18 | fail→pass | 17,391 | 4,039 | -77% | 1 | 1 | 0% | 2,880 | 2,229 | -23% | 0 | 0 | — |
case-19 | pass→pass | 14,336 | 15,057 | +5% | 1 | 1 | 0% | 2,240 | 3,618 | +62% | 0 | 0 | — |
case-20 | fail→pass | 12,660 | 4,728 | -63% | 1 | 1 | 0% | 1,789 | 2,166 | +21% | 0 | 0 | — |
case-21 | fail→pass | 129,284 | 8,486 | -93% | 1 | 1 | 0% | 2,601 | 2,865 | +10% | 0 | 0 | — |
case-22 | pass→pass | 19,977 | 16,086 | -19% | 1 | 1 | 0% | 3,114 | 4,041 | +30% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +59 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.