시간봉 알림 수정

This commit is contained in:
Macbook
2026-05-27 16:32:02 +09:00
parent 972e8f7178
commit d7ceb8cbfd
4 changed files with 105 additions and 20 deletions
@@ -0,0 +1,20 @@
import { loadStrategyTimeframes, pinCandleWatch } from './backendApi';
import { normalizeStartCandleType } from './strategyStartNodes';
/** 전략 DSL 평가 분봉 전체 pin — 1m 집계·상위 봉 warm-up */
export async function pinStrategyEvaluationTimeframes(
market: string,
strategyId: number,
): Promise<string[]> {
const raw = await loadStrategyTimeframes(strategyId);
const timeframes = [...new Set(raw.map(tf => normalizeStartCandleType(tf)))];
if (timeframes.length === 0) timeframes.push('1m');
for (const tf of timeframes) {
await pinCandleWatch(market, tf);
}
if (!timeframes.includes('1m')) {
await pinCandleWatch(market, '1m');
}
return timeframes;
}