일목균형표 조건 수정
This commit is contained in:
@@ -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 실패해도 평가 시도 */
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user