전략평가 화면 전랸선택드롭다운 추가
This commit is contained in:
@@ -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')}
|
||||
|
||||
Reference in New Issue
Block a user