배포
This commit is contained in:
@@ -50,6 +50,7 @@ import '../styles/strategyEditorTheme.css';
|
||||
import { getKoreanName } from '../utils/marketNameCache';
|
||||
import { repairUtf8Mojibake } from '../utils/textEncoding';
|
||||
import { enrichStrategyNameMap, strategyNamesFromList } from '../utils/strategyNameResolver';
|
||||
import { markStrategyIdsMissingUnlessValid } from '../utils/strategyMissingCache';
|
||||
|
||||
const LEFT_KEY = 'btd-left-width';
|
||||
const RIGHT_KEY = 'btd-right-width';
|
||||
@@ -148,6 +149,10 @@ export function BacktestHistoryPage({ theme = 'dark' }: Props) {
|
||||
loadStrategies(),
|
||||
]);
|
||||
const baseNames = strategyNamesFromList(strategies);
|
||||
markStrategyIdsMissingUnlessValid(
|
||||
strategies.map(s => s.id).filter((id): id is number => id != null && id > 0),
|
||||
trades.map(t => t.strategyId),
|
||||
);
|
||||
const strategyNames = await enrichStrategyNameMap(
|
||||
baseNames,
|
||||
trades.map(t => t.strategyId),
|
||||
@@ -166,6 +171,13 @@ export function BacktestHistoryPage({ theme = 'dark' }: Props) {
|
||||
loadStrategies(),
|
||||
]);
|
||||
const baseNames = strategyNamesFromList(strategies);
|
||||
markStrategyIdsMissingUnlessValid(
|
||||
strategies.map(s => s.id).filter((id): id is number => id != null && id > 0),
|
||||
[
|
||||
...trades.map(t => t.strategyId),
|
||||
...list.map(r => r.strategyId),
|
||||
],
|
||||
);
|
||||
const strategyNames = await enrichStrategyNameMap(
|
||||
baseNames,
|
||||
[
|
||||
|
||||
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState, type MutableR
|
||||
import TradingChart from '../TradingChart';
|
||||
import type { BacktestSignal, StrategyDto } from '../../utils/backendApi';
|
||||
import { loadStrategyForNotification } from '../../utils/backendApi';
|
||||
import { isStrategyMissingOnServer } from '../../utils/strategyMissingCache';
|
||||
import type { ChartType, IndicatorConfig, OHLCVBar, Theme, Timeframe } from '../../types';
|
||||
import { loadAnalysisCandles } from '../../utils/analysisChartData';
|
||||
import type { ChartManager } from '../../utils/ChartManager';
|
||||
@@ -149,7 +150,7 @@ const BacktestAnalysisChart: React.FC<Props> = ({
|
||||
}, [strategy, timeframeRaw]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!strategyId) {
|
||||
if (!strategyId || isStrategyMissingOnServer(strategyId)) {
|
||||
setStrategy(undefined);
|
||||
setStrategyLoading(false);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user