Reads a value from memory scoped to the current signal.
Resolves the active pending or scheduled signal automatically from execution context. Automatically detects backtest/live mode from execution context.
Memory bucket name
Unique memory entry identifier
Promise resolving to stored value
Error if no pending or scheduled signal exists, or if entry not found
import { readMemory } from "backtest-kit";const ctx = await readMemory<{ trend: string }>({ bucketName: "my-strategy", memoryId: "context" }); Copy
import { readMemory } from "backtest-kit";const ctx = await readMemory<{ trend: string }>({ bucketName: "my-strategy", memoryId: "context" });
Reads a value from memory scoped to the current signal.
Resolves the active pending or scheduled signal automatically from execution context. Automatically detects backtest/live mode from execution context.