백테스팅 수정
This commit is contained in:
@@ -35,7 +35,6 @@ import {
|
||||
import {
|
||||
buildVirtualTradingChartIndicators,
|
||||
ensurePaperChartOverlays,
|
||||
resolveStrategyPrimaryTimeframe,
|
||||
} from '../../utils/strategyToChartIndicators';
|
||||
import type { ChartOverlayToggleKey } from '../../utils/chartOverlayVisibility';
|
||||
|
||||
@@ -145,10 +144,9 @@ const BacktestAnalysisChart: React.FC<Props> = ({
|
||||
const market = symbol.startsWith('KRW-') ? symbol : `KRW-${symbol}`;
|
||||
|
||||
const chartTimeframe = useMemo((): Timeframe => {
|
||||
// 백테스트 결과: 실행 타임프레임 우선 (전략 DSL TF와 실행 TF 불일치 시 차트·시그널 어긋남 방지)
|
||||
const tf = timeframeRaw || (strategy ? resolveStrategyPrimaryTimeframe(strategy) : '1m');
|
||||
const tf = timeframeRaw?.trim() ? timeframeRaw : '1m';
|
||||
return normalizeChartTimeframe(tf) as Timeframe;
|
||||
}, [strategy, timeframeRaw]);
|
||||
}, [timeframeRaw]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!strategyId || isStrategyMissingOnServer(strategyId)) {
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
formatTimeframeKo,
|
||||
pct,
|
||||
pctAbs,
|
||||
resolveBacktestRecordExecTimeframe,
|
||||
toUpbitMarket,
|
||||
} from '../../utils/backtestUiUtils';
|
||||
import { getKoreanName } from '../../utils/marketNameCache';
|
||||
@@ -88,7 +89,7 @@ export default function BacktestExecutionList({
|
||||
const ko = getKoreanName(market).toLowerCase();
|
||||
const code = r.symbol.replace(/^KRW-/i, '').toLowerCase();
|
||||
const strategy = (r.strategyName ?? '').toLowerCase();
|
||||
const tf = r.timeframe?.toLowerCase() ?? '';
|
||||
const tf = resolveBacktestRecordExecTimeframe(r).toLowerCase();
|
||||
return ko.includes(normalizedQuery)
|
||||
|| code.includes(normalizedQuery)
|
||||
|| strategy.includes(normalizedQuery)
|
||||
@@ -200,7 +201,7 @@ export default function BacktestExecutionList({
|
||||
<div className="btd-history-card-row">
|
||||
<div className="btd-history-card-main">
|
||||
<span className="btd-history-ko">{ko}</span>
|
||||
<span className="btd-history-strategy">{strategy} · {formatTimeframeKo(r.timeframe)}</span>
|
||||
<span className="btd-history-strategy">{strategy} · {formatTimeframeKo(resolveBacktestRecordExecTimeframe(r))}</span>
|
||||
<span className="btd-history-date">{fmtListTimestamp(r.createdAt)}</span>
|
||||
</div>
|
||||
<div className="btd-history-card-side">
|
||||
|
||||
Reference in New Issue
Block a user