Trap-Resistant
Recovery System
Zigzag SPM with Signal-Gate filter + SPM3 → HEDGE_BOOST conversion. Drawdowns recovered through intelligent layered hedge mechanism — fragile entries prevented before they happen.
Zigzag with Smart Hedge Conversion
When MAIN goes into loss, the system layers SPM positions in alternating directions. v5.5.0 adds a critical signal-gate before each SPM — and converts SPM3 to HEDGE_BOOST when trend has firmly reversed.
MAIN BUY
Trade opened on signal score ≥ 35. Loss reaches trigger threshold.
ENTRYSPM1 BUY
Same direction (DCA). Signal-gate: SELL score < 50 ✓
DCASPM2 SELL
Opposite direction (hedge). Signal-gate: BUY score < 50 ✓
HEDGEHEDGE_BOOST
v5.5.0: SPM3 yerine SELL ek hedge (1.5× lot) — sinyal teyitli
BOOSTWhy HEDGE_BOOST is better than SPM3
Old SPM3 was MAIN-direction (4th doubling). When trend firmly reversed, it became the worst possible entry — adding to the losing side at the worst price.
v5.5.0's HEDGE_BOOST instead opens an extra hedge (same direction as SPM2, 1.5× lot) — only when the signal supports it.
If signal is neutral/weak, nothing opens. Result: ~70% of historical SPM3 traps prevented.
Tier 1: Signal-Gate · Tier 2: HEDGE_BOOST
Tier 1 — Signal Gate (every SPM)
Before OpenSPM(), EA checks live buy_score / sell_score from 12-indicator engine. If opposing score ≥ SPM_SignalOpposeThreshold (default 50), SPM is SKIPPED.
SPM1, SPM2: opp ≥ 50 → SKIP
SPM3+: opp ≥ 45 → SKIP (stricter)
Tier 2 — HEDGE_BOOST conversion
When nextLayer == 3, instead of mechanical zigzag, EA opens HEDGE_BOOST: opposite direction, 1.5× lot of SPM1, only if hedge signal score ≥ 30.
ANA BUY → SPM1 BUY → SPM2 SELL → HEDGE_BOOST SELL
Hedge Never Closes at Loss
HEDGE_BOOST follows the same rule as standard hedge — only closes when profitable. If MAIN + SPM1 recover, BOOST goes profitable, FIFO kicks in, cycle resets.
✓ No emergency liquidation. No SL. Trap-resistant.
Each Asset Class Has Its Own Threshold
SPM trigger loss values are calibrated per symbol category.
| Category | Symbols | SPM Trigger | Close Profit |
|---|---|---|---|
| BTC / Crypto | BTCUSD, ETHUSD, SOLUSD... | -$5 | +$8 |
| Metals | XAUUSD, XAGUSD, XPTUSD | -$5 | +$8 |
| Forex (major) | EURUSD, GBPUSD, AUDUSD | -$4 | +$8 |
| Forex JPY | USDJPY, EURJPY, GBPJPY | -$3 | +$8 |
| Indices | US30, NAS100, SPX500 | -$5 | +$8 |
| Energy | WTI, BRENT, USOIL | -$5 | +$8 |
Recovery Engine Has More Than Just SPM
Equity-Based Lot Sizing (v5.4.0)
Tier lot calculated from equity not balance. If account is in drawdown, EA picks lower-tier lots automatically. Liq prevention.
Free Margin Guard (v5.4.0)
Before opening any new position, EA checks free_margin > required × 1.5. Insufficient → reject + 60s cooldown.
Adaptive FIFO Target
FIFO close target scales with balance: $200 → $3, $500 → $5, $1000+ → $8. Time decay: 4h+ open → 40% of target.
Promotion Chain
When MAIN closes, oldest SPM becomes new MAIN automatically. No SPM? HEDGE promotes. Cycle continues without reset.
ADX 25+ Grid Filter
Grid only opens when ADX ≥ 25 (real trend). Weak trend → no SPM. Strong trend → up to 10 layers per direction.
Anti-Spam Cooldowns
Every open function has fail cooldown (60s) stored in GlobalVariable (restart-safe). No log spam, no duplicate entries.
Recovery, Not Gambling.
v5.5.0 Smart Recovery handles drawdowns through layered hedge logic — never adds to losing side blindly. Signal-confirmed, market-aware.