run_strategy_regime_analysis
Evaluate a saved Pine strategy's behavior across market regimes by running it temporarily, joining trades to regime bars, and reporting PF, expectancy, win rate, drawdown, and coverage.
Instructions
Run one exact saved Pine Strategy temporarily, collect its complete immutable trade ledger, and join each closed trade to the latest market-regime bar whose nominal close was available by entry time. Returns PF, expectancy, win rate, closed-trade drawdown, run-up/drawdown, and coverage by directional, volatility, and combined regime. Dry-run by default; confirm=true is required. The strategy is removed and the original chart fingerprint is verified. It never ranks regimes, changes the saved Pine source, or places orders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Most recent loaded bars used for regime evidence. Default: 20000 | |
| inputs | No | ||
| confirm | No | Must be true to add the strategy temporarily and run the analysis. Default: false | |
| pine_id | Yes | ||
| sessions | No | Optional DST-aware session windows used for entry-time grouping | |
| atr_lookback | No | ||
| pine_version | Yes | ||
| trend_lookback | No | ||
| event_proximity | No | Optional scheduled-event entry-time groups; caller supplies canonical UTC timestamps | |
| expected_symbol | Yes | ||
| correlation_regime | No | Optional rolling correlation groups from a second bound chart with the same timeframe | |
| expected_timeframe | Yes | ||
| max_regime_age_bars | No | Maximum age of the prior closed regime evidence. Default: 3 bars | |
| low_volatility_ratio | No | ||
| minimum_group_trades | No | Joined trades required for an individual regime group. Default: 30 | |
| session_match_policy | No | Session overlap handling. Default: all_matches_non_exclusive; exclusive uses input order | |
| high_volatility_ratio | No | ||
| minimum_coverage_ratio | No | Eligible closed trades that must join to a regime. Default: 0.8 | |
| minimum_classified_bars | No | Regime observations required before evaluation is complete. Default: 100 | |
| range_efficiency_threshold | No | ||
| trend_efficiency_threshold | No | ||
| volatility_baseline_lookback | No | ||
| directional_move_atr_threshold | No |