일목균형표 조건 수정

This commit is contained in:
Macbook
2026-06-16 21:23:41 +09:00
parent c4123b51f8
commit 26bfca7b4c
5 changed files with 190 additions and 15 deletions
@@ -29,7 +29,7 @@ export async function fetchEvaluationSnapshotAtBar(
const baseRows = hydrated ? extractVirtualConditions(hydrated) : [];
try {
await pinStrategyEvaluationTimeframes(normalizedMarket, strategyId);
await pinStrategyEvaluationTimeframes(normalizedMarket, strategyId, chartTimeframe);
} catch {
/* pin 실패해도 평가 시도 */
}
+8 -2
View File
@@ -1,12 +1,18 @@
import { loadStrategyTimeframes, pinCandleWatch, repairStrategyTimeframes, type StrategyDto } from './backendApi';
import { pinCandleWatch, loadStrategyTimeframes, repairStrategyTimeframes, type StrategyDto } from './backendApi';
import { normalizeStartCandleType } from './strategyStartNodes';
import { collectUiEvaluationTimeframes, syncStrategyTimeframesFromLayoutIfNeeded } from './strategyTimeframeSync';
/** 전략 DSL 평가 분봉 전체 pin — 1m 집계·상위 봉 warm-up */
/** 전략 DSL 평가 분봉 pin — chartTimeframe 이 있으면 UI 선택 분봉 우선 */
export async function pinStrategyEvaluationTimeframes(
market: string,
strategyId: number,
chartTimeframe?: string | null,
): Promise<string[]> {
if (chartTimeframe) {
const tf = normalizeStartCandleType(chartTimeframe);
await pinCandleWatch(market, tf);
return [tf];
}
const synced = await syncStrategyTimeframesFromLayoutIfNeeded(strategyId);
if (!synced) return ['1m'];
await repairStrategyTimeframes(strategyId);