fix: respect candle_delay from config, default to fast tests

- Tests now run with candle_delay=0 for fast execution
- Simulation defaults to candle_delay based on interval (e.g., 30s for 1m)
- Progress saved to DB every 5 seconds during simulation
- User can now see real-time updates while simulation runs

Tests: 14 passing in 0.15s
This commit is contained in:
shokollm
2026-04-12 05:24:43 +00:00
parent 984656c83c
commit cadea23e40
5 changed files with 83 additions and 39 deletions

View File

@@ -118,6 +118,9 @@ export interface Simulation {
signals: Signal[] | null;
klines?: { time: number; close: number }[];
trade_log?: TradeLogEntry[];
current_candle_index?: number;
total_candles?: number;
candles_processed?: number;
}
export interface SimulationConfig {