Sets internal flag to prevent strategy from opening new signals.
Current active signal (if any) will complete normally.
Backtest/Live mode will stop at the next safe point (idle state or after signal closes).
Automatically detects backtest/live mode from execution context.
Parameters
symbol: string
Trading pair symbol
Returns Promise<void>
Promise that resolves when stop flag is set
Example
import { stop } from"backtest-kit";
// Stop strategy after some condition awaitstop("BTCUSDT", "my-strategy");
Stops the strategy from generating new signals.
Sets internal flag to prevent strategy from opening new signals. Current active signal (if any) will complete normally. Backtest/Live mode will stop at the next safe point (idle state or after signal closes).
Automatically detects backtest/live mode from execution context.