7-Indicator Regime-Adaptive Signal Engine with Built-In Backtester
Pine Script v6 — TradingView Overlay Indicator
Simpleton Signals Kimi_Claude v0.04 is a complete rewrite of the KIMI Signal indicator. It evolves from a simple 4-indicator consensus (v0.02) into a 7-indicator regime-adaptive engine with a built-in backtester.
v0.04 doesn't use a fixed strategy. It adapts to market conditions in real-time using ADX regime detection. In trending markets, trend-following indicators (SuperTrend, EMA, MACD) get double weight. In ranging markets, oscillators (RSI, WaveTrend) get double weight. This means the same indicator automatically finds the right strategy for the right conditions — on any timeframe.
| # | Indicator | Type | Signal Logic | Regime Gate |
|---|---|---|---|---|
| 1 | RSI(14) | Mean Reversion | BUY when RSI < oversold (30), SELL when RSI > overbought (70) | GATED in TREND |
| 2 | MACD(12,26,9) | Momentum | BUY when MACD > Signal AND histogram > 0 | Always active |
| 3 | SuperTrend(3,10) | Trend | BUY when direction flips bearish→bullish | GATED in RANGE |
| 4 | EMA Stack(9/21/50) | Trend | BUY when Fast > Medium > Slow (bullish alignment) | GATED in RANGE |
| 5 | WaveTrend NEW | Oscillator | BUY when WT1 crosses above WT2 from oversold (<-60) | GATED in TREND |
| 6 | StochRSI NEW | Timing | BUY when %K crosses above %D from below 20 | Always active |
| 7 | ADX Direction NEW | Directional | BUY when DI+ > DI- (bullish directional movement) | Always active |
The ADX (Average Directional Index) measures trend strength on a 0-100 scale. v0.04 classifies the market into three regimes:
| Regime | ADX Value | Meaning | Active Indicators | Gated |
|---|---|---|---|---|
| TREND | ≥ 25 | Strong directional movement | MACD, SuperTrend, EMA, StochRSI, ADX Dir (5/7) | RSI, WaveTrend |
| MIXED | 15-24 | Transitional / unclear | All 7 indicators active | None |
| RANGE | < 15 | Sideways / choppy | RSI, MACD, WaveTrend, StochRSI, ADX Dir (5/7) | SuperTrend, EMA |
Every timeframe has its own distribution of TREND/MIXED/RANGE periods. A 15m chart might be ranging while the 4H is trending. By adapting which indicators are active based on the current regime on the current chart, the strategy automatically uses the right tools:
Unlike v0.02's flat 1-point-per-indicator system, v0.04 uses regime-dependent weights:
| Indicator | TREND Weight | MIXED Weight | RANGE Weight |
|---|---|---|---|
| RSI | 0 (gated) | 1 | 2 (boosted) |
| MACD | 2 (boosted) | 1 | 1 |
| SuperTrend | 2 (boosted) | 1 | 0 (gated) |
| EMA Stack | 2 (boosted) | 1 | 0 (gated) |
| WaveTrend | 0 (gated) | 1 | 2 (boosted) |
| StochRSI | 1 | 1 | 1 |
| ADX Direction | 1 | 1 | 1 |
| Max Possible | 9 | 7 | 7 |
Confidence % = Score / Max Possible × 100. A score of 6/9 in TREND = 67% confidence. A score of 5/7 in RANGE = 71%.
TP/SL distances are calculated as ATR(14) × multiplier. When Auto-scale is enabled, the multipliers adjust per timeframe:
| Profile | Timeframe | TP Mult | SL Mult | Max Hold | R:R Ratio |
|---|---|---|---|---|---|
| SCALP | ≤ 5m | 1.25x | 0.75x | 8 bars | 1.67:1 |
| INTRADAY | 15m | 1.50x | 0.75x | 12 bars | 2.00:1 |
| SWING-ID | 1H | 2.00x | 1.00x | 15 bars | 2.00:1 |
| SWING | 4H | 2.50x | 1.25x | 20 bars | 2.00:1 |
| POSITION | Daily | 3.50x | 1.75x | 12 bars | 2.00:1 |
| MACRO | Weekly+ | 4.50x | 2.00x | 8 bars | 2.25:1 |
The R:R ratio is always ≥ 1.67:1 across all timeframes. This ensures positive expectancy even with sub-50% win rates.
The backtester tracks every BUY signal at or above the configured minimum level. Key methodology:
| Metric | Formula | What It Means |
|---|---|---|
| Win Rate (WR%) | Wins / Total × 100 | Percentage of trades that hit TP or closed profitably |
| Profit Factor (PF) | Gross Win / Gross Loss | PF > 1.0 = net profitable. PF > 2.0 = strong edge |
| Expectancy E[R] | (WR% × AvgWin) - ((1-WR%) × AvgLoss) | Expected return per trade in %. Positive = profitable system |
| Feature | SSK_Claude v0.04 | TV Strategy Tester |
|---|---|---|
| Entry price | Next bar open (honest) | Next bar open (default) |
| TP/SL check | Frozen at entry, checked vs high/low | Broker emulator with OHLC heuristic |
| Same-bar conflict | Always LOSS (conservative) | OHLC direction heuristic (~50/50) |
| Timeout | ±0.1% dead zone | Closes at market |
| Commissions | None (gross) | Configurable (default 0) |
| Slippage | None | Configurable (default 0) |
| Multi-strategy | 7 indicators in 1 script | Requires separate scripts |
| Regime awareness | Built-in ADX gating | Must code manually |
Bottom line: Our entry methodology matches TV's default (next-bar open). Our same-bar handling is more conservative than TV's heuristic. Results should be directionally similar but our win rates will be slightly lower due to conservative fill — which is a feature, not a bug.
The top-right table shows real-time status of all 7 indicators plus backtester stats:
┌─────────────────────────────────────┐ │ SSK_Claude v0.04 │ SWING-ID │ ← TF profile │ Signal │ BUY │ ← Current signal │ Strength │ 6/9 (67%) │ ← Score/max (confidence) │ Regime │ TREND (ADX 28)│ ← Current regime │ Active │ 5/7 indicators│ ← How many not gated │ --- Indicators --- │ │ RSI 42.3 │ GATED │ ← Blocked in TREND │ MACD │ Bullish │ ← ✓ Counting │ SuperTrend │ Bull │ ← ✓ Counting (2x) │ EMA Stack │ Bull Stack │ ← ✓ Counting (2x) │ WaveTrend │ GATED │ ← Blocked in TREND │ StochRSI │ OS Cross │ ← ✓ Counting │ ADX Dir │ DI+ > DI- │ ← ✓ Counting │ --- Backtester --- │ │ TP/SL │ 2x/1x ATR AUTO│ ← Current settings │ Stats │ 12W/5L 70.6% PF:2.14 │ ← Live performance └─────────────────────────────────────┘
| Setting | 15m | 1H | 4H | Daily |
|---|---|---|---|---|
| Min Signal Level | 3 | 3 | 3 | 2 |
| RSI OB/OS | 70/30 | 70/30 | 70/30 | 75/25 |
| WT OB/OS | 60/-60 | 60/-60 | 60/-60 | 53/-53 |
| StochRSI OB/OS | 80/20 | 80/20 | 80/20 | 85/15 |
| ADX Trend/Range | 25/15 | 25/15 | 25/15 | 20/12 |
| TP/SL | Use AUTO (enabled by default) | |||
ETH trends harder than BTC. Use the same defaults but consider lowering ADX Trend threshold to 22 and RSI oversold to 25 for more aggressive entries during ETH's characteristic momentum runs.
SimpletonSignals_KIMI_Claude.pine