분석레포트 로직 수정
This commit is contained in:
@@ -251,14 +251,10 @@ export function BacktestHistoryPage({ theme = 'dark' }: Props) {
|
||||
);
|
||||
}
|
||||
if (tab === 'live' && selectedLive) {
|
||||
return buildLiveReportModel(
|
||||
selectedLive,
|
||||
activeSignals,
|
||||
chartProps?.timeframe ?? '1h',
|
||||
);
|
||||
return buildLiveReportModel(selectedLive, activeSignals);
|
||||
}
|
||||
return null;
|
||||
}, [tab, selectedBacktest, backtestDetail, selectedLive, activeSignals, chartProps?.timeframe, strategyNamesById]);
|
||||
}, [tab, selectedBacktest, backtestDetail, selectedLive, activeSignals, strategyNamesById]);
|
||||
|
||||
const showRightDetail = tab === 'backtest'
|
||||
? backtestDetail?.analysis != null
|
||||
|
||||
@@ -119,7 +119,7 @@ export function AnalysisReportPage({ theme = 'dark' }: Props) {
|
||||
);
|
||||
}
|
||||
if (sourceTab === 'live' && selectedLive) {
|
||||
return buildLiveReportModel(selectedLive, ctx?.signals ?? [], '1h');
|
||||
return buildLiveReportModel(selectedLive, ctx?.signals ?? []);
|
||||
}
|
||||
return null;
|
||||
}, [sourceTab, selectedBacktest, selectedLive, ctx, strategyNamesById]);
|
||||
|
||||
@@ -110,10 +110,12 @@ export default function BacktestExecutionList({
|
||||
const code = item.symbol.replace(/^KRW-/i, '').toLowerCase();
|
||||
const strategy = item.strategyLabel.toLowerCase();
|
||||
const source = item.sourceLabel.toLowerCase();
|
||||
const tf = item.timeframe?.toLowerCase() ?? '';
|
||||
return ko.includes(normalizedQuery)
|
||||
|| code.includes(normalizedQuery)
|
||||
|| strategy.includes(normalizedQuery)
|
||||
|| source.includes(normalizedQuery);
|
||||
|| source.includes(normalizedQuery)
|
||||
|| tf.includes(normalizedQuery);
|
||||
});
|
||||
}, [liveItems, normalizedQuery]);
|
||||
|
||||
@@ -133,7 +135,7 @@ export default function BacktestExecutionList({
|
||||
<input
|
||||
type="text"
|
||||
className="btd-exec-search-input"
|
||||
placeholder={tab === 'backtest' ? '종목·전략·타임프레임 검색…' : '종목·전략 검색…'}
|
||||
placeholder={tab === 'backtest' ? '종목·전략·타임프레임 검색…' : '종목·전략·타임프레임 검색…'}
|
||||
value={query}
|
||||
onChange={e => setQuery(e.target.value)}
|
||||
aria-label="목록 검색"
|
||||
@@ -242,12 +244,16 @@ 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">{item.strategyLabel} · {item.sourceLabel}</span>
|
||||
<span className="btd-history-strategy">
|
||||
{item.strategyLabel}
|
||||
{item.timeframe !== 'unknown' ? ` · ${formatTimeframeKo(item.timeframe)}` : ''}
|
||||
{item.sourceLabel !== '자동' ? ` · ${item.sourceLabel}` : ''}
|
||||
</span>
|
||||
<span className="btd-history-date">{fmtShortTimestamp(item.createdAt)}</span>
|
||||
</div>
|
||||
<div className="btd-history-card-side">
|
||||
<BacktestSparkline curve={parseLiveSpark(item)} positive={positive} width={56} height={22} />
|
||||
<span className="btd-history-win">체결 {item.tradeCount}건</span>
|
||||
<span className="btd-history-win">라운드 {item.roundTripCount} · 체결 {item.tradeCount}건</span>
|
||||
<span className={`btd-history-roi${positive ? ' up' : ' down'}`}>{pct(item.totalReturnPct)}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user