ExecutionSimulationConfig

data class ExecutionSimulationConfig(val preset: ExecutionPreset = ExecutionPreset.PAPER_FAST, val seed: Long? = null, val latencyMs: Long = 0, val orderSpacingMs: Long = 0, val stopLatencyMs: Long = 0, val takeProfitFill: TakeProfitFill = TakeProfitFill.PRINT, val candleCloseGraceMs: Long = com.qkt.app.LiveSession.DEFAULT_CANDLE_CLOSE_GRACE_MS, val heartbeatIntervalMs: Long, val slippage: SlippageSpec = SlippageSpec.ZERO, val slippagePoints: Int = 0, val rejectEvery: Int? = null, val partialFillFraction: BigDecimal? = null, val enforceStopsLevel: Boolean = false, val positionMode: PositionAccountingMode = com.qkt.broker.PositionAccountingMode.NETTING)

Constructors

Link copied to clipboard
constructor(preset: ExecutionPreset = ExecutionPreset.PAPER_FAST, seed: Long? = null, latencyMs: Long = 0, orderSpacingMs: Long = 0, stopLatencyMs: Long = 0, takeProfitFill: TakeProfitFill = TakeProfitFill.PRINT, candleCloseGraceMs: Long = com.qkt.app.LiveSession.DEFAULT_CANDLE_CLOSE_GRACE_MS, heartbeatIntervalMs: Long, slippage: SlippageSpec = SlippageSpec.ZERO, slippagePoints: Int = 0, rejectEvery: Int? = null, partialFillFraction: BigDecimal? = null, enforceStopsLevel: Boolean = false, positionMode: PositionAccountingMode = com.qkt.broker.PositionAccountingMode.NETTING)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Replay closes a quiet symbol's ended bar the way the live heartbeat does: at the first heartbeatIntervalMs step at or after windowEnd + candleCloseGraceMs, in event time (#1138). A tick of the same stream from the next window still closes it immediately. Shares runtime.candle_close_grace_ms with the live daemon.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val latencyMs: Long = 0
Link copied to clipboard

Minimum gap between consecutive releases on the venue's send lane (com.qkt.broker.SendLane); 0 = none.

Link copied to clipboard
Link copied to clipboard

Venue position model the simulated broker books (#1071). HEDGING gives every entry its own coexisting position leg with exits closing that leg (the retail-MT5 semantic); NETTING collapses opposite fills into one signed position. The library default stays NETTING so embedded com.qkt.backtest.Backtest callers keep their semantics; the CLI defaults to HEDGING (both production venues hedge) unless --position-mode netting / execution.position_mode says otherwise.

Link copied to clipboard
Link copied to clipboard
val rejectEvery: Int? = null
Link copied to clipboard
val seed: Long? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Execution delay applied to protective stops only (#1135): a crossed stop fills at the first quote at or after trigger + stopLatencyMs, sided, plus slippage. Entry latency (latencyMs) delays order placement and does not model this. 0 keeps the on-trigger fill.

Link copied to clipboard

Pricing of a gap-crossed protective take-profit (#1135).

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

What the run's evidence.execution records about this execution model.