diff --git a/frontend/src/components/BacktestHistoryPage.tsx b/frontend/src/components/BacktestHistoryPage.tsx index 2cbeb6d..1737a4d 100644 --- a/frontend/src/components/BacktestHistoryPage.tsx +++ b/frontend/src/components/BacktestHistoryPage.tsx @@ -14,7 +14,13 @@ import { } from '../utils/backendApi'; import type { Theme } from '../types'; import { buildEquityFromSignals } from '../utils/backtestEquity'; -import { normalizeEpochSec, normalizeEpochSecOptional } from '../utils/backtestUiUtils'; +import { + formatChartTypeKo, + formatTimeframeKo, + normalizeEpochSec, + normalizeEpochSecOptional, + toUpbitMarket, +} from '../utils/backtestUiUtils'; import BacktestExecutionList, { type ExecutionListTab } from './backtest/BacktestExecutionList'; import BacktestAnalysisChart from './backtest/BacktestAnalysisChart'; import BacktestKpiPanel from './backtest/BacktestKpiPanel'; @@ -29,10 +35,6 @@ import { import '../styles/strategyEditorTheme.css'; import { getKoreanName } from '../utils/marketNameCache'; -function toUpbitMarket(symbol: string): string { - return symbol.startsWith('KRW-') ? symbol : `KRW-${symbol}`; -} - const LEFT_KEY = 'btd-left-width'; const RIGHT_KEY = 'btd-right-width'; const LEFT_DEFAULT = 380; @@ -199,7 +201,10 @@ export function BacktestHistoryPage({ theme = 'dark' }: Props) { return { ko: getKoreanName(market), strategy: selectedBacktest.strategyName || '전략 없음', - meta: selectedBacktest.timeframe, + metaParts: [ + formatTimeframeKo(selectedBacktest.timeframe), + formatChartTypeKo('candlestick'), + ], }; } if (tab === 'live' && selectedLive) { @@ -207,11 +212,15 @@ export function BacktestHistoryPage({ theme = 'dark' }: Props) { return { ko: getKoreanName(market), strategy: selectedLive.strategyLabel, - meta: selectedLive.sourceLabel, + metaParts: [ + formatTimeframeKo(chartProps?.timeframe ?? '1h'), + formatChartTypeKo('candlestick'), + selectedLive.sourceLabel, + ], }; } return null; - }, [tab, selectedBacktest, selectedLive]); + }, [tab, selectedBacktest, selectedLive, chartProps]); const footerTrades = equityData.trades; @@ -276,7 +285,12 @@ export function BacktestHistoryPage({ theme = 'dark' }: Props) {
{centerHead.strategy} - {centerHead.meta ? · {centerHead.meta} : null} + {centerHead.metaParts.length > 0 && ( + + {' · '} + {centerHead.metaParts.filter(Boolean).join(' · ')} + + )}
)} diff --git a/frontend/src/components/backtest/BacktestAnalysisChart.tsx b/frontend/src/components/backtest/BacktestAnalysisChart.tsx index 3a1b910..519bbf4 100644 --- a/frontend/src/components/backtest/BacktestAnalysisChart.tsx +++ b/frontend/src/components/backtest/BacktestAnalysisChart.tsx @@ -8,7 +8,13 @@ import type { ChartManager } from '../../utils/ChartManager'; import { useHistoryLoader, LOAD_MORE_TRIGGER } from '../../hooks/useHistoryLoader'; import { isUpbitMarket } from '../../utils/upbitApi'; import { DEFAULT_DISPLAY_TIMEZONE } from '../../utils/timezone'; -import { normalizeChartTimeframe, timeframeBarSeconds } from '../../utils/backtestUiUtils'; +import { + formatChartTypeKo, + formatTimeframeKo, + normalizeChartTimeframe, + timeframeBarSeconds, +} from '../../utils/backtestUiUtils'; +import { getKoreanName } from '../../utils/marketNameCache'; import { useIndicatorSettings } from '../../hooks/useIndicatorSettings'; import { useAppSettings } from '../../hooks/useAppSettings'; import { enrichIndicatorConfig, getIndicatorDef } from '../../utils/indicatorRegistry'; @@ -294,7 +300,9 @@ const BacktestAnalysisChart: React.FC