시간봉 알림 수정
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user