전략평가 화면 전랸선택드롭다운 추가

This commit is contained in:
Macbook
2026-06-12 14:42:12 +09:00
parent ae9266bd28
commit d80a854d5b
3 changed files with 49 additions and 0 deletions
@@ -19,6 +19,7 @@ import { loadBacktestSettings, runBacktest } from '../../utils/backendApi';
import { buildVirtualTradingChartIndicators } from '../../utils/strategyToChartIndicators';
import { buildEvalParamsFromStrategy } from '../../utils/strategyEvaluationParams';
import { resolveEvaluationFromLoadedBars } from '../../utils/backtestWarmup';
import { repairUtf8Mojibake } from '../../utils/textEncoding';
import StrategyEvaluationBarSelector from './StrategyEvaluationBarSelector';
import {
parseBacktestRunTimeframeChoice,
@@ -30,6 +31,9 @@ interface Props {
timeframe: Timeframe;
timeframeChoice: BacktestRunTimeframeChoice;
tfOptions: { value: string; label: string }[];
strategies: StrategyDto[];
selectedStrategyId: number | null;
onStrategySelect: (strategyId: number) => void;
onMarketChange: (market: string) => void;
onTimeframeChoiceChange: (choice: BacktestRunTimeframeChoice) => void;
theme?: Theme;
@@ -67,6 +71,9 @@ const StrategyEvaluationChart: React.FC<Props> = ({
timeframe,
timeframeChoice,
tfOptions,
strategies,
selectedStrategyId,
onStrategySelect,
onMarketChange,
onTimeframeChoiceChange,
theme = 'dark',
@@ -326,6 +333,23 @@ const StrategyEvaluationChart: React.FC<Props> = ({
<option key={o.value} value={o.value}>{o.label}</option>
))}
</select>
<select
className="btd-run-select btd-run-select--strategy seval-chart-strategy-select"
value={selectedStrategyId ?? ''}
onChange={e => {
const raw = e.target.value;
if (!raw) return;
onStrategySelect(Number(raw));
}}
title="전략"
>
<option value=""> </option>
{strategies.map(s => (
<option key={s.id} value={s.id ?? ''}>
{repairUtf8Mojibake(s.name ?? `전략 #${s.id}`)}
</option>
))}
</select>
{selectedBar && (
<span className="seval-chart-bar-time">
{new Date(selectedBar.time * 1000).toLocaleString('ko-KR')}