strategy_sweep
Sweep a strategy across symbols, timeframes, and indicator input combinations to identify optimal parameter settings.
Instructions
Iterate a strategy across symbols × timeframes × indicator input combinations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inputs | No | Input variations: { length: [20, 50], source: ["close", "hl2"] } | |
| symbols | Yes | Symbols to sweep (e.g. ["ES1!", "NQ1!"]) | |
| on_error | No | Error behavior (default "continue") | |
| entity_id | Yes | Strategy study entity ID (from chart_get_state) | |
| use_cache | No | Reuse cached per-combo metrics from ~/.tv-mcp/sweep-cache/ within TTL (default true) | |
| timeframes | Yes | Timeframes to sweep (e.g. ["15", "60"]) | |
| cooldown_ms | No | Cooldown between combos in ms (default 1500) | |
| parallelism | No | Spawn N worker tabs and run combos in parallel (default 1 = serial). Cap 6. | |
| cache_max_age_ms | No | Cache entry TTL in ms (default 86_400_000 = 24h). Set 0 to force fresh. | |
| max_combinations | No | Max combinations allowed (default 100, abs cap 500) | |
| resume_from_run_id | No | Continue from a partial sweep run_id | |
| restore_start_state | No | Snapshot chart before sweep, restore after (default true) | |
| timeout_per_combo_ms | No | Timeout per combo in ms (default 30000) | |
| same_symbol_cooldown_ms | No | Shorter cooldown when only inputs change (same symbol+timeframe). Default 200ms; clamped to [0, cooldown_ms]. |