전략편집기 수정
This commit is contained in:
@@ -39,3 +39,25 @@ export function normalizeStartCandleType(value: string | undefined | null): stri
|
||||
export function formatStartCandleLabel(candleType: string): string {
|
||||
return normalizeStartCandleType(candleType);
|
||||
}
|
||||
|
||||
const CANDLE_TYPE_LABELS: Record<string, string> = {
|
||||
'1m': '1분봉',
|
||||
'3m': '3분봉',
|
||||
'5m': '5분봉',
|
||||
'10m': '10분봉',
|
||||
'15m': '15분봉',
|
||||
'30m': '30분봉',
|
||||
'1h': '1시간봉',
|
||||
'4h': '4시간봉',
|
||||
'1d': '일봉',
|
||||
};
|
||||
|
||||
export function formatStrategyCandleLabel(candleType: string): string {
|
||||
const ct = normalizeStartCandleType(candleType);
|
||||
return CANDLE_TYPE_LABELS[ct] ?? ct;
|
||||
}
|
||||
|
||||
export const STRATEGY_CANDLE_TYPE_OPTIONS = STRATEGY_CANDLE_TYPES.map(ct => ({
|
||||
value: ct,
|
||||
label: CANDLE_TYPE_LABELS[ct] ?? ct,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user