The Signal and Schedule adapters persist the mutable runtime state of a running strategy. The Signal adapter holds the current active signal row for aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-kit-redis-mongo-docker/llms.txt
Use this file to discover all available pages before exploring further.
(symbol, strategyName, exchangeName) context — representing what the strategy currently believes about the market. The Schedule adapter stores a pending scheduled signal for the same context — used when a strategy defers an action to a future bar. Both adapters support writing null to explicitly clear state.
Signal Adapter
Constructor
The trading pair symbol, e.g.
"ETHUSDT".The unique name of the strategy instance persisting its signal.
The exchange identifier used to namespace this context.
readSignalData
Fetches the storedISignalRow payload for this context from the signal-items collection. Returns null when no signal has been written yet or when the last write was null.
ISignalRow | null
writeSignalData
Upserts the signal payload for this context. Passingnull clears the stored signal, marking it as absent.
The signal payload to persist, or
null to clear the current signal state.Writing
null is the canonical way to reset signal state between strategy runs. The
document is updated in MongoDB but not deleted — a subsequent read returns null from
the payload field.Redis Cache Key
Schedule Adapter
The Schedule adapter mirrors the Signal adapter in structure. It stores aIScheduledSignalRow — a signal that has been deferred to execute at a specific future bar. Like the Signal adapter, writing null clears any pending schedule.
Constructor
The trading pair symbol.
The unique name of the strategy instance.
The exchange identifier.
readScheduleData
Fetches the storedIScheduledSignalRow payload for this context from the schedule-items collection.
IScheduledSignalRow | null
writeScheduleData
Upserts the scheduled signal payload for this context. Passingnull cancels any pending scheduled signal.
The scheduled signal payload to persist, or
null to cancel the pending schedule.Redis Cache Key
Collection Summary
| Adapter | Collection | Context Key | Null Write |
|---|---|---|---|
| Signal | signal-items | (symbol, strategyName, exchangeName) | Clears signal |
| Schedule | schedule-items | (symbol, strategyName, exchangeName) | Cancels schedule |