← SFRecovery EA product page · Setup guide · Download the v3.31 presets (.zip)

SFRecovery EA - Inputs Manual

Version 3.31 - generated from the EA source, so every input is listed with its real default. Highlighted cells show where a preset differs from the default.

1. What the EA does (and does not do)

SFRecovery is a manager, not a trading system. It has no entry signal. It watches positions that already exist (your manual trades, or the magic numbers you list) and, when they fall into a loss, runs a recovery cycle: it adds averaging orders on the losing side so the average entry moves closer to price, then closes the whole basket at break-even plus a target. A recovery grid increases exposure while the market moves against you; the protections below bound that risk, they do not remove it.

2. A cycle, step by step

  1. ARMED - the panel shows TRIGGER loss $3.20 / $15.00: the live loss of the monitored positions against the loss that launches a cycle.
  2. LAUNCH - fires on the first trigger reached: floating loss in money (InpDDMoney), account drawdown in % (InpDDPercent), or at once (InpInstantLaunch). All presets use the money trigger with the % trigger OFF. The journal prints the exact reason: [ACTIVE] why: loss $15.20 >= trigger $15.00.
  3. FIRST ADD - the first averaging order opens immediately at launch, by design. Further adds need price to move one more grid step (or InpStepBars bars to pass), up to InpMaxOrders.
  4. EXIT - basket take-profit ([BASKET TP]), paired partial closes ([PARTIAL]; with a negative InpPartMinNet a pair may close at a small loss on purpose), or the anti-stall exit after InpCycleMaxBars bars ([CYCLE-MAX]).
  5. PROTECT - see section 4. Every close is tagged in the Experts journal, so any exit can be traced to its rule.
The cyan "basket BE" line is not a stop. It is the break-even price of the whole basket, drawn while a cycle is active so you can see where the basket stops losing. It never modifies an order and has nothing to do with the DD% input.

3. Presets in one table

PresetLaunch triggerBasket capAbsolute closeFirst avg lotNotes
Guardian$15 loss$25010%0.01Lowest-risk profile, ATR grid
Control$15 loss$25010%0.01Guardian + takes the whole symbol book at 2% DD
AW_Zona$15 loss$25010%0.01Dual-side ZONE grid, hedging accounts only
Agresivo / Conservador / Equilibrado$50 loss$40012%0.05Kalman mode; caps were OFF before v3.31

All money values are written for a 10k USD account and scale automatically with your equity (InpAutoEquityScale); the panel footer shows the scale in use. Presets are starting points, not a promise of results.

4. Protections - what closes what

RuleJournal tagMeasured onWhat happens
CB tier 1 / 2-equity DD % from peakTier 1 halves new lots, tier 2 stops new adds
CB tier 3[CB KILL]equity DD % from peakFlattens, waits InpCBCooldown bars, then re-arms
Basket cap[MAX LOSS]loss of the managed basket in moneyFlattens the basket + cooldown
Absolute close[ABSOLUTE CLOSE]equity DD % from the true session peakFlattens and stops the EA for good
Daily stop[DAILY KILL]equity vs day-start balanceFlattens, halts until the next server day
Worst-case preflight[WORST-CASE]projected loss of a full grid + N ATRsShown before every cycle; refuses the launch above InpMaxEquityRiskPct
Always set a hard floor. The CB tier 3 re-arms after each cooldown. Without InpAbsoluteClose or InpMaxLossMoney, losses can repeat in tier-3 sized steps. Since v3.31 the absolute close is measured from the true session peak, so repeated CB kills can no longer walk the account below it.

5. Stopping your other EAs when the protection fires

MetaTrader 5 gives an EA no way to switch another EA off. v3.31 provides the enforceable equivalent:

ACCOUNT scope also closes your own manual trades on every symbol when a kill fires. Use it only on an account dedicated to the EAs it should police.

6. Strategy Tester notes

7. All inputs

  1. ORDERS TO RECOVERY SETTINGS
  2. LAUNCH SETTINGS
  3. REGIME GATE (v3.29)
  4. WORST-CASE PREFLIGHT (v3.30)
  5. CIRCUIT BREAKER (PROTECTION)
  6. KILL SCOPE / HALT GUARD (v3.31)
  7. TAKEPROFIT AND PARTIAL CLOSE
  8. RECOVERY GRIDS AND AVERAGE ORDERS
  9. DUAL SIDE (ZONE) SETTINGS
  10. CONTROL MODE (TAKE CONTROL) SETTINGS
  11. UNIVERSAL MODE (v3.26)
  12. KALMAN FILTER SETTINGS
  13. MANUAL TRADING
  14. PROTECTION SETTINGS
  15. TELEGRAM
  16. PANEL
  17. STRATEGY TESTER

ORDERS TO RECOVERY SETTINGS

InputDefaultWhat it doesGuardianAgresivo
InpMagicForRecovery"*"Magic numbers to recover (0=manual trades, comma sep, "*" or "ALL" = every external EA)00
InpUseLockfalseLock basket at max DCA level (freeze floating loss, hedging accounts only; v3.17 default OFF - the lock auto-releases via InpLockReevalBars)falsefalse
InpRecoveryStyleDCA_FIRSTLaunch style: DCA_FIRST (classic), LOCK_FIRST (freeze+wait), LOCK_DRAIN (freeze+drain loss gradually)00
InpDeleteSLTPtrueDelete SL and TP at launchtruetrue
InpCloseProfittrueClose profitable orders at launchtruetrue
InpDeletePendingtrueDelete pending orders at launchtruetrue

LAUNCH SETTINGS

InputDefaultWhat it doesGuardianAgresivo
InpModeREC_KALMANRecovery mode23
InpInstantLaunchfalseInstant launch (start recovery immediately)falsefalse
InpDDPercent0.0Launch trigger: account equity DD % from peak (0=disabled). If both triggers are set, the FIRST one to hit launches0.00.0
InpDDMoney50.0Launch trigger: monitored positions' floating loss >= $ (auto-tuned to symbol/equity, see the panel; 0=disabled)15.050.0
InpAbsoluteClose0.0Absolute close: equity DD % from the TRUE session peak (never reset by CB cooldowns) -> close + stop EA for good (0=disabled)10.012.0
InpLaunchPullbackBars0Launch only after N bars with no new extreme (0=launch at once)00
InpCloseCounterTrendfalseClose losers that fight the Kalman slope at launch instead of averaging them (OFF recommended: tests showed it turns recoverable trades into realized losses)falsefalse

REGIME GATE (v3.29)

InputDefaultWhat it doesGuardianAgresivo
InpGateRegimefalseREGIME GATE on launch: block cycles in vol extremes / off-session (fail-open; CONTROL mode bypasses)falsefalse
InpGateATRHigh90.0Block launches when D1 ATR percentile (last 260 bars) >= this (vol explosion / news)90.090.0
InpGateATRLow5.0Block launches when D1 ATR percentile <= this (dead tape, grid stalls)5.05.0
InpGateHourFrom7Launch window start (server hour, inclusive; wraps if From>To)77
InpGateHourTo21Launch window end (server hour, exclusive)2121
InpGateBlockLogtrueLog every blocked launch once per bar (off = silent)truetrue

WORST-CASE PREFLIGHT (v3.30)

InputDefaultWhat it doesGuardianAgresivo
InpWorstCaseATRs5.0Worst case: adverse continuation beyond the LAST add, in D1 ATRs5.05.0
InpMaxEquityRiskPct0.0Refuse launches whose worst case exceeds this % of equity (0 = display only - recommended first)0.00.0
InpWorstCaseTGtrueInclude the worst case in the launch Telegramtruetrue

CIRCUIT BREAKER (PROTECTION)

InputDefaultWhat it doesGuardianAgresivo
InpCBTier12.0Tier 1: reduce lots 50% at DD%3.02.0
InpCBTier24.0Tier 2: halt new orders at DD%4.04.0
InpCBTier36.0Tier 3: close all + cooldown at DD%6.06.0
InpCBCooldown24Cooldown after kill (bars)2424
InpMaxLossMoney0.0Hard kill: flatten basket if managed loss >= $ (0=off)250.0400.0
InpDailyLossPct0.0Daily equity stop: flatten + halt until next day at this % of day-start balance (0=off; prop firms: 40-60% of the firm limit, e.g. 2% vs 5%)0.00.0
InpMaxDailyKills0Halt the day after N kills (CB tier-3 / max-loss / daily) (0=off)00

KILL SCOPE / HALT GUARD (v3.31)

InputDefaultWhat it doesGuardianAgresivo
InpKillScopeKILL_MANAGEDWhat a KILL closes (CB tier 3 / max loss / absolute / daily): MANAGED = only the recovery basket (v3.30), SYMBOL = every position + pending on this symbol (any EA), ACCOUNT = every position + pending on the account00
InpHaltGuardfalseWhile HALTED (cooldown / absolute close / daily halt): close any position other EAs open inside the kill scope and delete their pendings. MT5 does not let one EA switch another off - this is the enforceable equivalentfalsefalse
InpHaltGlobalVartruePublish the halt as terminal GlobalVariable "SFR_HALT_<symbol>" (1=halted, 0=running) so your own EAs can read it and pause themselvestruetrue

TAKEPROFIT AND PARTIAL CLOSE

InputDefaultWhat it doesGuardianAgresivo
InpPartClose0.01Lots to close each partial (smaller = more gradual)0.010.01
InpTPPoints10Min points profit to trigger partial close1010
InpCommAwaretrueInclude broker commission in P/L checktruetrue
InpOverlapAfter1Allow overlap after N orders21
InpBasketTPtrueUse TP for total basket (false = exit only via partials / circuit breaker / manual)truetrue
InpBasketMoney40Close whole basket at this PROFIT (break-even + $; set low for near-BE exits)25.040
InpBasketPerLot0.0Extra $ per basket lot on the TP target (0=fixed InpBasketMoney)0.00.0
InpLockAtOrder0Lock when avg count reaches N (0=lock only at max orders)00
InpLockReevalBars24Lock release: re-evaluate every N bars, release when the trend turns (0=locked forever)2424
InpPartMinNet-2Min NET $ a partial pair must book (0.10=v3.12 net-positive only; negative=AW-style overlap, e.g. -2)-2.0-2.0
InpExitCostBuffer1.0Min NET cushion ($) on every green basket exit (TP / anti-stall / scale-out): covers exit commission + spread the floating P/L cannot see (0 = off)1.01.0
InpStepBars96Anti-stall: force a DCA add after N bars even if the distance gate has not passed (0=distance only)9612
InpCycleMaxBars24Anti-stall: after N bars in cycle, exit the basket at any positive P/L (0=wait for full target)2424
InpScaleTiers4Staircase scale-out: exit the basket in N profit tiers (0=off, classic single TP). Only active with InpRecoveryStyle=LOCK_FIRST (validated: DCA+scale-out destroys the neto, 3 A/Bs)44
InpScaleFirst8.0Basket P/L $ that fires the 1st scale-out tier8.08.0
InpScaleStep6.0Extra $ of basket P/L per additional tier6.06.0
InpScaleFrac0.25Fraction of the basket closed per tier (last tier closes all)0.250.25
InpAvgTPPoints0Real broker-side TP (points) on every recovery/avg leg (AW uses ~30): the banked win is guaranteed even between ticks. 0=off (v3.22 exact)00
InpBuyoutOnTPfalseAUTO-BUYOUT: when an avg leg banks a profit, immediately retire a slice of a loser (pair net >= InpPartMinNet) - the AW part-by-part drainfalsefalse
InpLoserPick0Which loser the buyout retires first: 0=deepest loss (v3.22 rule), 1=closest to break-even (AW: cheapest slice first = continuous trail)00

RECOVERY GRIDS AND AVERAGE ORDERS

InputDefaultWhat it doesGuardianAgresivo
InpLotModeLOT_GEOMETRICLot progression mode20
InpAvgLot0.05Volume of first average order0.010.05
InpAvgMult1.5Multiplier to volume1.51.5
InpStep200Step for average orders (points)200200
InpStepMult1.0Multiplier to step1.151.0
InpMaxOrders6Max average orders66
InpMaxBasketLots0.0Max total lots of the managed basket (0=off; hard exposure cap - no add once exceeded)0.00.0

DUAL SIDE (ZONE) SETTINGS

InputDefaultWhat it doesGuardianAgresivo
InpDualSideDUAL_OFFDual-side grid: 0=OFF (v3.18 exact), 1=ZONE (mirror grid on the opposite side, AW-style; arms after the 1st main add; hedging accounts only)00

CONTROL MODE (TAKE CONTROL) SETTINGS

InputDefaultWhat it doesGuardianAgresivo
InpTakeControlPct0.0At equity DD% >= this, take control of the WHOLE book on the symbol (any magic - opt-in) and run recovery (ZONE forced) until the book exits at basket TP or the loss caps (0=off)0.00.0
InpControlCooldown6Cooldown after a kill WHILE in control (bars; 0=use InpCBCooldown). Short = re-engages fast instead of days of silence66
InpKalmanAdaptive0.0Kalman-adaptive grid: step x (1 + this x |filter slope|, cap 2x) in strong trends (KALMAN mode only; 0=off - A/B candidate)0.00.0

UNIVERSAL MODE (v3.26)

InputDefaultWhat it doesGuardianAgresivo
InpUniversaltrueUNIVERSAL MODE: auto-scale everything to the symbol (recommended)truetrue
InpATRPeriod14ATR Period1414
InpATRMult1.5ATR multiplier for step (manual override, metals)0.31.5
InpATRMultForex0.15ATR multiplier for forex (manual override)0.150.15
InpATRMultIdx0.05ATR multiplier for indices (manual override)0.050.05
InpRiskPerTrade2.0Risk % of equity per recovery cycle (universal mode)2.02.0
InpATRTFPERIOD_D1ATR Timeframe1640816408
InpAutoScaletrueAuto-scale money params by point value (forex/10, idx/10)truetrue
InpAutoEquityScaletrueAuto-tune: money targets also scale with equity (inputs assume a $10k account)truetrue

KALMAN FILTER SETTINGS

InputDefaultWhat it doesGuardianAgresivo
InpKalmanQ0.05Process noise (lower=smoother)0.050.05
InpKalmanR2.0Measurement noise (higher=smoother)2.02.0
InpKalmanMinProb0.4Min reversion probability to open0.40.4
InpDcaKalmanGatefalseKalman filter also gates DCA adds (no averaging into a strong counter-slope; keep OFF - backtests: pf 5.05 -> 2.12 with the gate on)falsefalse
InpMaxAvgVolume5.0Max average volume (cap)0.15.0
InpMultiDirtrueMulti-directional trade (true = each cycle recovers whichever side is losing; false = fixed direction from the FIRST cycle of the session, opposite losers stay floating)truetrue
InpOnePerBartrueOne opened order per bar filteringtruetrue

MANUAL TRADING

InputDefaultWhat it doesGuardianAgresivo
InpLotType0Lot type INITIAL position (0=fixed, 1=risk% - needs InpDefaultSL>0)00
InpLotSize0.1Default lot size0.010.1
InpRiskPct1.0Risk % of equity if SL hits (initial position only; DCA grid unchanged)1.01.0
InpDefaultSL0Default SL (points, 0=none)00
InpDefaultTP0Default TP (points, 0=none)00
InpMaxSpread0Max spread to open (0=any)00
InpMagic0Magic number00
InpFitMargintrueFit manual lot to free margin (false=reject the trade if it does not fit)truetrue

PROTECTION SETTINGS

InputDefaultWhat it doesGuardianAgresivo
InpMaxSlippage30Max slippage (points)3030
InpMaxSpreadProt7500Max spread protection for DCA adds (points)75007500
InpRolloverGuardtrueBlock new entries around daily rollover (23:55-00:10 server)truetrue
InpMaxSpreadEntry100Max spread (points) for new entries (0=off)100100

TELEGRAM

InputDefaultWhat it doesGuardianAgresivo
InpTelegramtrueEnable Telegram notificationsfalsefalse
InpTgToken""Bot Token
InpTgChat""Chat ID
InpNotifyLaunchtrueNotify on launchtruefalse

PANEL

InputDefaultWhat it doesGuardianAgresivo
InpShowPaneltrueShow paneltruetrue

STRATEGY TESTER

InputDefaultWhat it doesGuardianAgresivo
InpTestAutotrueAuto-open losing trades in testerfalsefalse
InpTestEveryN50Open trade every N bars5050
InpTestLot0.1Tester: initial lot for the pad (0=use InpLotSize; the pad value is what opens)0.010.01
InpTestDir0Direction (0=random, 1=buy only, 2=sell only)00

Risk warning: averaging down increases exposure during drawdown. Test on a demo account first. Past tests do not predict future results. signalforge-ai.com