Skip to content

Orbit

Orbit is Aegis’s mean-reversion bot. It opens futures positions from inside the LP range when price drifts toward a range edge, anticipating a reversion back toward the center of the range.

Status: Live and fully implemented. Orbit runs end-to-end from apps/bot/src/bots/orbit/. It is not “runtime pending” or “in development”.


Orbit is a mean-reversion strategy. It is distinct from Bastion (protection) and Vanguard (breakout):

BotPhilosophyTrigger location
BastionHedge against out-of-range exitsExterior to range
VanguardCapture breakout momentumExterior to range
OrbitMean-reversion from inside the rangeInterior to range

Orbit supports three direction presets, all using canonical identifiers from packages/shared/src/strategy-presets.ts:

PresetLONG legSHORT legDescription
orbit_long_onlyEnabledDisabledOnly takes LONG mean-reversion trades from the lower edge
orbit_short_onlyDisabledEnabledOnly takes SHORT mean-reversion trades from the upper edge
orbit_bothEnabledEnabledTakes mean-reversion trades from both edges

Orbit entry triggers are derived from the LP range edges with an interior buffer. The price must be inside the range and approaching an edge for a trigger to fire.

DirectionTrigger formulaDescription
LONGP_lower + bufferPct × (P_upper − P_lower)Price approaches lower bound from inside
SHORTP_upper − bufferPct × (P_upper − P_lower)Price approaches upper bound from inside

Where bufferPct is the triggerBufferPct parameter and (P_upper − P_lower) is the full range width.

Numeric example:

LP range: P_lower = $2,000, P_upper = $3,000 (range width = $1,000)
triggerBufferPct = 0.05 (5%)

DirectionTrigger price
LONG trigger$2,000 + 0.05 × $1,000 = $2,050
SHORT trigger$3,000 − 0.05 × $1,000 = $2,950

When price falls to $2,050 (from inside the range), the LONG leg fires. When price rises to $2,950 (from inside the range), the SHORT leg fires.


Orbit entries are independent per direction. Closing a LONG position does not immediately open a SHORT position in the same tick.

To trigger a SHORT after a LONG closes:

  1. Price must leave the LONG trigger zone.
  2. Price must subsequently approach the SHORT trigger (P_upper − buffer) from inside the range.

This “no auto-flip” design prevents whipsaw behavior where a single price oscillation triggers a rapid sequence of opposing futures entries.


  • Staged take-profits: Up to 3 configurable TP levels.
  • Breakeven stop: Moves the stop-loss to breakeven after the first TP is hit.
  • Auto-rearm: After a position closes, the leg automatically re-arms and watches for the next trigger.