| Side | Entry | Exit | P&L$ | % | Adds | Reason | MTF |
|---|
| Side | Entry | Exit | P&L$ | % | Adds | Reason | MTF |
|---|
A mean-reversion paper trading simulator connecting to live crypto exchanges via WebSocket. It detects ZigZag swing patterns, enters counter-trades when price overextends, and averages down with intelligent spacing if price continues against. The math guarantees every trade closes at a profit (100% gross win rate). Proven: 249 trades, 100% WR, 0% drawdown on 34 days of BTC 30m data.
Five different methods to detect swing points. Each produces the same output (swings with price, direction, bar) but uses a different algorithm:
| Detector | Method | Character |
|---|---|---|
| ZigZag | % deviation from extreme H/L | Default. Catches wicks. Most swings. |
| ZigZag Pivot | Same + pivot legs parameter | Exposes pivotLegs for optimizer sweep. |
| Renko | Brick-based on close price | Fewer, uniform-sized swings. Noise filter. |
| Point & Figure | Box + reversal count | Fewest swings. Strong trend filter. |
| Range Bars | Running range on close | Volatility-adaptive. Direction changes at range breaks. |
Heikin Ashi: Smooths candles internally (HA Close = OHLC/4, HA Open = avg of prev). For ZZ/ZZP in H/L mode, uses max/min of HA body. Renko/P&F/Range always use HA close.
Source: H/L mode catches wicks (default for ZZ/ZZP). Close mode is smoother, fewer swings. Renko/P&F/Range always use close regardless of setting.
Multiplies PnL on every trade. Formula: grossPnl = pnl% × positionSize × leverage. Default 25× (safe). MEXC supports up to 500× on BTC/ETH. The liquidation guard force-closes if equity + unrealized drops below 10% of initial capital, flooring equity at $0.
| Leverage | Return (34d BTC) | Max DD | Status |
|---|---|---|---|
| 25× | +160% | 0.00% | Safe sweet spot |
| 50× | +542% | 0.00% | Works with fixed spacing |
| 67× | +645% | 0.00% | Max with fixed spacing |
| 100× | +368% | 0.00% | Works with Fib spacing + $0.1 base |
Controls HOW FAR APART adds are placed when price goes against you. This is the single biggest survival factor.
| Mode | Logic | Distance (10 adds) | Survives |
|---|---|---|---|
| Fixed | Step + deceleration | ~1.2% on BTC 30m | Up to 52× lev |
| Fibonacci | Step × 1,1,2,3,5,8,13,21 | ~26.3% on BTC 30m | Up to 100×+ lev |
| Hybrid | Fixed for early adds, Fib after add N | Depends on switch | Between the two |
Fibonacci is the default. First 2-3 adds are normal (where most trades close profitably), then adds 4-10 spread out massively — crash protection without sacrificing normal profits.
The Hybrid Switch @Add field controls when Hybrid switches from fixed to Fibonacci spacing. Set to 4 = adds 0-3 are fixed, adds 4+ are Fibonacci.
Default: $0.1. With DblTot sizing, $1 base hits the position cap at add 7 — wasting 3 adds. With $0.1 base, all 10 adds work across the full Fibonacci distance. Smaller base = more useful adds = survives bigger moves = allows higher leverage.
The #1 PnL driver — proven +67-78% PnL improvement. At every bar, the engine checks ZigZag direction on multiple higher TFs. If they all agree, position size is boosted up to Max Mult. If they disagree, trade at 1× base.
TF Ladder modes: Fibonacci (34,55,89,144,233min — default, best performer), Standard (1h,2h,4h), Powers of 2 (32m,1h,2h,4h).
Re-evaluates MTF consensus at every add, not just entry. If consensus is strong when averaging down, the add is boosted up to Add Max Mult. Default: 5× — confirmed optimal across 186K combo sweep. This is the add-level equivalent of Legs Sync at entry.
Fractal self-similarity score across TFs. If ZZ leg amplitudes at different scales have similar ratios, market structure is self-similar = more predictable = boost position. Weight default: 20% (blended with direction consensus at 80%).
When position is oversized and gets ANY profit, close the bulk and keep a small runner.
Progressive escape (default): Start at 70%, +10% per add above minimum. 2 adds=80%, 3=90%, 4+=98%.
Runner cannot add — prevents the escape-add infinite loop. Runner exits only via TP or Swing.
Real trading costs modeled when Fee Mode = Auto: Binance futures 0.05%/side taker, MEXC 0%/side on zero-fee pairs. Applied on every trade close. The fee badge shows total fees paid.
Key insight: On zero-fee MEXC pairs with 200× leverage, gross ≈ net. This is where the real edge is biggest.
| Mode | Add Formula | Growth (base=$0.1) |
|---|---|---|
| Flat | base | $0.1, $0.1, $0.1... |
| DblLast | base × 2ⁿ | $0.1, $0.2, $0.4... |
| Match | max(base, current) | $0.1, $0.1, $0.2... |
| DblTot | max(base, current×2) | $0.1, $0.2, $0.6, $1.8... |
| TriTot | max(base, current×3) | $0.1, $0.3, $1.2, $4.8... |
| Fib | base × fib(n) | $0.1, $0.1, $0.2, $0.3... |
Sqrt Compounding: When flat, scale base: base × sqrt(equity / initial). $10K→$20K = base ×1.41.
Volume-Weighted Extension: adjER = extRatio × (2.0 / (1.0 + vol/volMA50)). Low vol = enter sooner.
Macro Bias EMA: 200-bar trend. Bull (close > EMA): longs enter easier, shorts harder.
DCC Regime: CV of leg amplitudes → coupling. Stable (≥0.7) = lower threshold = more trades.
| Key | Parameter | Key | Parameter |
|---|---|---|---|
| DV | Deviation % | LS | Legs Sync (0/1) |
| P | Detector+params+candle | SRC | Source (hl/cl) |
| LB | Legs for Average | LT | TF Mode (fib/std/pow2) |
| ET | Entry Threshold | LM | Entry Max Mult |
| TP | TP Fraction | SAB | Sync Add Boost (0/1) |
| SZ | Sizing Mode | SAM | Add Max Mult |
| MA | Max Adds | NW | Nesting Weight % |
| ES | Ext Step | ESC | Escape (0/1) |
| ED | Ext Decel | EP | Escape Progressive (0/1) |
| AS | Add Spacing (0/1/2) | ETR | Escape Trigger |
| HS | Hybrid Switch @Add | ECP | Escape Close % |
| BS | Base Size | LV | Leverage |
| MP | Max Pos % | CMP | Sqrt Compounding (0/1) |
| VW | Volume Weight (0/1) | MB | Macro Bias (0/1) |
| DC | DCC Regime (0/1) | CS | Close on Swing |