Risk management

Leverage per regime

Per-direction leverage settings (bull / bear / sideways) and how the engine applies them.

1 min readUpdated Jun 19, 2026

The leverage block lets you set different leverage multipliers for bull, bear, and sideways regimes (as labeled by the trend detection block).

Shape

"risk_management": {
  "leverage": {
    "bull": 8,
    "bear": 6,
    "sideways": 4
  }
}

How it's applied

The engine picks the leverage matching the current trend state and sets it on the exchange before placing the entry (Binance, ByBit, BitMEX, Hyperliquid). It is clamped to your account-level max leverage first.

If Use exchange leverage setting is on, the engine does NOT set leverage at all; it inherits whatever leverage and margin mode you already configured on the venue (typically cross). This is the recommended mode for cross-margin traders, since the platform never overrides your account settings.

On futures venues (Interactive Brokers, Tradovate, TradeStation, cTrader) there is no per-order leverage knob; margin is SPAN-based per contract or set at the account level, so the leverage setting is ignored there regardless.

What leverage doesn't do

  • Doesn't change your position size. Position size is decided by sizing; leverage affects margin requirement only.
  • Doesn't change your dollar risk. A 10x leveraged 1 BTC long has the same exposure as a 1x leveraged 1 BTC long, just different margin.
  • Doesn't apply to backtests in any way that affects P&L. Leverage affects liquidation calc, which the backtest engine doesn't model.

Per-regime intent

Higher leverage in trending regimes captures more move; lower leverage in sideways regimes caps damage from chop. Calibrate against your strategy's regime-classified P&L from backtests.

Pitfalls

  • Exchange caps. Each exchange has a maximum leverage. The engine clamps; check logs for "leverage capped" warnings.
  • Cross vs isolated margin is separate from leverage. See Margin and leverage.
Leverage per regime | Help Center | LucraX · LucraX