All methods assume 1-bar confirmation lookahead. Tested on EUR/JPY M5, 2016 bars, 0.5p spread.
| # | Method | Swings (2016 bars) | P&L | Verdict | Why |
|---|---|---|---|---|---|
| 1 | Pure Wilder N=1h[i]>h[i-1] AND h[i]>h[i+1] | ~454 | unusable | RULED OUT | Every local noise bump qualifies |
| 2 | N=k windowh[i] = max(h[i-k..i+k]) | fewer | brittle | RULED OUT | Arbitrary k, regime-dependent |
| 3 | Alternation only Keep most extreme of same-type run | same as #1 on price | no improvement | RULED OUT | Redundant on ASI; no structural meaning on price alone |
| 4 | TopsBots 3-stage N=1 + alternation + exceeding-extremes gate | ~65–80 | M1: +260p/56%WR M2: +1039p/75%WR | USED | Self-adaptive structural filter |
| 5 | Price-confirmation (new_swt) Accept swing only after opposite swing confirmed | fewer, delayed | retroactive | RULED OUT | Misses the entry; labels past, not live |
| 6 | Zigzag + pip threshold Running update, require X pip reversal | 10p: too many | 10p: −274p 25p: −7p 50p: −65p | RULED OUT | All negative P&L; threshold is regime-dependent |
| Method | Input | Algorithm | States | Lag | Notes |
|---|---|---|---|---|---|
| M1 SB-P | bar h[]/l[] | N=1 → alternation → exceeding-extremes | 5: {+2,+1,0,−1,−2} | 1 bar | Candle-responsive. Source: TopsBots_Python |
| M2 SB-A | ASI[i] | identical pipeline on ASI series | 5: {+2,+1,0,−1,−2} | 1 bar | Noise-filtered. Leads M1 in 72% of pairs |
State encoding: +2 = above active HSP (breakout ↑) | +1 = between, last swing = LSP (ascending context) | 0 = startup | −1 = between, last swing = HSP (descending context) | −2 = below active LSP (breakout ↓)
Lag analysis: M2 (ASI) leads M1 (price) in 72% of matched signal pairs (104/145 pairs). Median lead time: 30 min (6 M5 bars). M1 leads in only 17/145. Same-bar agreements: 24.
| Joint State | Bars | Avg 1-bar pip | WR% | Signal | Zone |
|---|---|---|---|---|---|
| P↓×P↓ | 437 | +3.08p | 96% | SHORT | High conviction |
| P↑×P↑ | 481 | +3.05p | 96% | LONG | High conviction |
| P−×P− | 92 | +2.97p | 87% | SHORT | Confirmed breakout |
| P↑×P+ | 110 | +2.84p | 85% | LONG | Confirmed breakout |
| P+×P↑ | 29 | +2.81p | 100% | LONG | Confirmed breakout |
| P+×P+ | 108 | +2.61p | 94% | LONG | Confirmed breakout |
| P↓×P− | 152 | +2.39p | 92% | SHORT | Confirmed breakout |
| P↑×P− | 38 | +0.93p | 71% | SHORT | Weak/reversal |
| P↓×P+ | 36 | +0.90p | 75% | LONG | Weak/reversal |
| P+×P↓ | 58 | −2.37p | 3% | AVOID | TOXIC — false breakout |
| P−×P↑ | 56 | −2.67p | 4% | AVOID | TOXIC — false breakout |
Source: muzero_asi_mc/micro/nano/picco-ppo/asi_swing_regime_analysis.py — applied to ASI series
The HHHL indicator uses the same 3-stage detection pipeline as TopsBots: N=1 local extremes → alternation enforcement (keep most extreme per cluster) → exceeding-extremes gate (filter_by_exceeding_extremes()).
The difference is in what happens after detection. Both produce a list of confirmed HSPs and LSPs from the ASI series. Then:
| Dimension | HHHL/LHLL/HHLL/LHHL (4-state regime) | SB-Joint M2 (5-state × 5-state) |
|---|---|---|
| Detection pipeline | Identical: N=1 + alternation + exceeding-extremes gate (TopsBots 3-stage) applied to ASI series | |
| What you look at | Last 2 confirmed HSPs and last 2 confirmed LSPs, independentlyhigher_highs = recent_hsp > prev_hsphigher_lows = recent_lsp > prev_lsp | Only the single most recent HSP and LSP (the active swing boundaries). Tracks current price position relative to those two levels. |
| Question answered | PATTERN of change: "Are the last two highs rising or falling? And separately, are the last two lows rising or falling?" → 2×2 matrix = 4 states | CURRENT POSITION: "Is price above, below, or between its most recent active HSP/LSP?" → 5 states (position + directional context) |
| Output | One-hot 4-channel per bar, rolling update: HHHL (HH+HL) = uptrend LHLL (LH+LL) = downtrend HHLL (HH+LL) = expanding (bullish divergence) LHHL (LH+HL) = contracting (bearish divergence) |
5 states: +2 above HSP | +1 between (asc) | 0 startup | −1 between (desc) | −2 below LSP |
| Latency | Needs 2 confirmed HSPs + 2 confirmed LSPs to produce a regime label. First signal delayed. Once running: updates on every new confirmed swing. | 1-bar lookahead. Active boundaries update as soon as first HSP or LSP is confirmed. |
| Interpretation | Macro structural trend: is this an uptrend (HH+HL), downtrend (LH+LL), expanding volatility (HH+LL), or squeeze (LH+HL)? | Micro position: right now is price above/below/between its active range, and which direction was the last push? |
| Relationship | Complementary answers to different questions. HHHL = the swing pattern over time (are we trending, ranging, expanding, contracting?) SB-Joint = the current position relative to active boundaries (are we in range or broken out? which direction is the momentum?) Best combined: HHHL=uptrend + SB-Joint=P↑×P↑ → highest-conviction long entry | |
The key hard rule: BLOCK all entries when SB-Joint ∈ {P+×P↓, P−×P↑}. These are the only states with negative expected value. All other states with non-zero composite signal are profitable.
The key hard rule: BLOCK all entries when SB-Joint ∈ {P+×P↓, P−×P↑}. These are the only states with negative expected value. All other states with non-zero composite signal are profitable.
Toxic state entry block (hard rule — do not burden NN with learning this):
| Condition | Block | Reason |
|---|---|---|
M1_state == +2 AND M2_state == -1 | BLOCK LONG | Price breakout without ASI confirmation — false breakout |
M1_state == -2 AND M2_state == +1 | BLOCK SHORT | Price breakout without ASI confirmation — false breakout |
| All other state combinations: allow NN to decide. SB-P + SB-A encoded as 5th+6th NEAT inputs: {-1, -0.5, 0, +0.5, +1} | ||
AND-gate baseline performance (entry only when sign(M1)+sign(M2) > 0): 78% WR, +4.05p avg per trade, +344p over 2016 bars at 0.5p spread
| Method | P&L (2016 bars) | Trades | WR | Avg/trade | Spread |
|---|---|---|---|---|---|
| M1 SB-P standalone | +260p | 144 | 56% | +1.81p | 0.5p |
| M2 SB-A standalone | +1039p | 247 | 75% | +4.21p | 0.5p |
| AND gate (M1∧M2) | +344p | 85 | 78% | +4.05p | 0.5p |
| All signals except toxic | +428p | 130 | 77% | +3.29p | 0.5p |