Appearance

Personalize your experience

Mode
Accent Color
Direction
Strategy Lifecycle

Strategy Lifecycle

Operations

What happens after deploy: which edits apply in place, which rebuild the ladder, how the lifecycle commands behave, and how a restart re-adopts a live grid.

States

initializing
loaded, , grid being built or resumed.
running
Processing ticks and , refilling levels, trailing.
paused
Ticks and are ignored, but STAY at the broker. Resuming picks up where it left off.
stopped
Engine shut down gracefully. State persisted. may or may not have been cancelled depending on how it stopped.
halted (stop-loss)
The stop fired. Orders , position optionally flattened, no further trading. Requires a deliberate restart.
!
Caution:Pause is not a risk control. Your remain at the exchange and can still fill — the engine simply will not react to them until you resume. To actually step out of the market use Stop with -orders, or the .

Live edits: three classes

Every setting on is editable from the terminal's Settings tab while the runs. What differs is how the engine applies it:

Amend in place (live)
grid_size and target. The engine modifies orders that are ALREADY resting at the broker — resizing unfilled entries and re-pricing take-profits. No , no gap in coverage.
Cancel and replace (structural)
spread, grid_mode, tunables, level_offset, base_price, init_lot, init_grid_levels, currency, size output, leverage, and any DECREASE in grid_levels. A resting order cannot be amended into new geometry, so the resting ladder is cancelled and re-placed. inventory and its exits are preserved.
Applies going forward
, flags, auto-increment, rebalance, and the stop-loss fields. Nothing already resting is touched; the change affects refills, trailing and evaluations.

One case: increasing grid_levels extends the ladder — only the new rungs are , and the existing levels, their inventory and their exits are untouched.

ℹ
Note:The settings labels each field accordingly: a for in-place amendment and a Rebuilds for structural changes, so the consequence is visible before you save.

Capital top-ups

  1. 1
    Raise max capital
    The terminal has a dedicated widget for adding capital to a running — no restart, no redeploy.
  2. 2
    With trail-down on
    The engine trails the grid down: the freed budget is deployed into new levels below the current , immediately.
  3. 3
    With trail-down off
    The ceiling simply rises. Existing levels are unchanged; the extra budget is available for refills and .
  • Raising with -down extends the ladder downward straight away.
  • Raising without -down just relaxes the ceiling.
  • Lowering never force-closes anything; it stops further .

Lifecycle commands

Wizardapps/webNestJS APIgrid-botDragonflyconfig + commandsPython engineapps/gridC++ engineapps/hft/gridone snake_case config schema · both engines drain the same Redis command channel
Commands go to a per-strategy Redis channel plus a durable queue; whichever engine owns the strategy drains it.
pause / resume
Stop or restart reacting to ticks and . untouched.
rebalance
Re-sync the ladder to the current market: fill gaps, re-extend, heal missing rungs.
stop
Graceful shutdown. State is persisted, connections closed cleanly. Optionally cancels .
kill
Force-stop immediately. Use when the engine is unresponsive.
update_config
Everything described in the -edits section above.

Commands are scoped to one , so an action can never affect another or the orchestrator itself. The durable queue means a command issued while a worker is briefly disconnected is still applied on reconnect.

Restarts and grid resumption

On start the engine looks for a persisted grid for the . If it finds one with real broker order ids or inventory, it adopts it: the are kept and no duplicates are placed. Only a genuinely empty or unplaced grid is rebuilt from scratch.

  • Idle orders are re-registered on resume. The deferred-order list is in-memory only, so without this a restart would orphan a pending .
  • venues get a full rebuild on the next open, because the exchange cancelled everything overnight — resting order ids from yesterday are dead.
  • Base-position targets are reconciled so the engine does not keep reserving room for targets that have already unwound to their own levels.

Self-healing

Rung restslimit buy @ L(i)Price fallsentry fillsExit placedTP +target%Exit fillsprofit bookedRung refilledready again
Normal operation is the cycle; the safety nets exist for when the websocket lies.
  • Missed-fill poller — periodically the broker whether any resting order beyond what the grid booked, and replays the difference. This is the direct recovery for a silently stalled .
  • Position auditor — triggered only when the broker's own position feed disagrees with the grid's expected net, and only after a settle plus a fresh re-poll, so a transient snapshot cannot cause a false heal.
  • Level auditor — catches levels whose committed exposure drifted below capacity because a was dropped. Such a gap never shows up as a net position mismatch.
  • Order healer — re-places orders that never reached the exchange. These hold no position, so no signal can them.
★
Pro tip:All four are visible in the logs. A of heal messages after a connectivity blip is the system working as designed, not a fault.

Deleting a strategy

Deleting removes the bot record and the active . It does not retroactively that a running engine already placed, so stop the first (with -orders) and the position is flat before deleting.

Related

  • 1.Engines — Python vs C++ — Who drains the command channel
  • 2.Stop Loss — The halted state
  • 3.Capital Allocation — Max capital as a live ceiling
  • 4.Trail Modes — Trailing and rebalance

Related articles

  • Engines — Python vs C++

    Automation / Predefined Strategies

    Two independent implementations of the same grid semantics, consuming the same config and the same command channel. The choice is a runtime choice, not a…

  • Predefined Strategies — Overview

    Automation / Predefined Strategies

    A predefined strategy is a fully-specified trading machine you configure once and deploy to a server-side engine. The grid strategy is the flagship: a…

  • Capital Allocation

    Automation / Predefined Strategies / Risk & Capital

    The ceiling the strategy may deploy — and the one number people get wrong, because the ladder's cost depends on the grid mode, not on the level count.

  • Cash-Secured Put Grid

    Automation / Predefined Strategies / SFO Wheel

    0 = at the money (nearest strike), k = the k-th strike below spot.

  • Covered Call Grid

    Automation / Predefined Strategies / SFO Wheel

    The first listed strike ≥ max(spot, net cost × (1 + minimum gain)), plus the offset.

  • DCA Bot — Overview

    Automation / Predefined Strategies / DCA Bot

    Dollar-cost averaging in cycles: enter, average in on adverse moves, exit the whole position on one take-profit, repeat.

  • DCA Capital & Leverage

    Automation / Predefined Strategies / DCA Bot

    Before placing a safety order the engine checks committed notional + order notional ≤ max capital × leverage and refuses the order if not. The base order is…

  • DCA Cycles

    Automation / Predefined Strategies / DCA Bot

    Closed cycles (take-profit or stop) before the bot stops opening new ones. 0 = unlimited. On a neutral bot both sides count.

  • DCA Direction — Long, Short, Neutral

    Automation / Predefined Strategies / DCA Bot

    Direction Base order Safety orders Take-profit Long Buy at market Buy limits below the base One sell above the average entry Short Sell at market Sell…

Browse all knowledge base articles →