전략평가 화면 전랸선택드롭다운 추가
This commit is contained in:
@@ -183,9 +183,24 @@ export default function StrategyEvaluationPage({ theme = 'dark' }: Props) {
|
||||
setSelectedStrategy(hydrateStrategyDto(s));
|
||||
setAppliedIndicatorParams(null);
|
||||
setParamsRevision(v => v + 1);
|
||||
setTimeframeChoice(BACKTEST_STRATEGY_TIMEFRAME);
|
||||
setLeftTab('strategy');
|
||||
}, []);
|
||||
|
||||
const handleSelectStrategyById = useCallback((id: number) => {
|
||||
const found = strategies.find(s => s.id === id);
|
||||
if (found) {
|
||||
handleSelectStrategy(found);
|
||||
return;
|
||||
}
|
||||
setSelectedStrategyId(id);
|
||||
setSelectedStrategy(null);
|
||||
setAppliedIndicatorParams(null);
|
||||
setParamsRevision(v => v + 1);
|
||||
setTimeframeChoice(BACKTEST_STRATEGY_TIMEFRAME);
|
||||
setLeftTab('strategy');
|
||||
}, [strategies, handleSelectStrategy]);
|
||||
|
||||
const handleSaveIndicatorParams = useCallback((params: EvalIndicatorParams) => {
|
||||
setAppliedIndicatorParams(params);
|
||||
setParamsRevision(v => v + 1);
|
||||
@@ -308,6 +323,9 @@ export default function StrategyEvaluationPage({ theme = 'dark' }: Props) {
|
||||
timeframe={chartTimeframe}
|
||||
timeframeChoice={timeframeChoice}
|
||||
tfOptions={tfOptions}
|
||||
strategies={strategies}
|
||||
selectedStrategyId={selectedStrategyId}
|
||||
onStrategySelect={handleSelectStrategyById}
|
||||
onMarketChange={setMarket}
|
||||
onTimeframeChoiceChange={setTimeframeChoice}
|
||||
theme={theme}
|
||||
|
||||
Reference in New Issue
Block a user