전략편집기 지표요소값 오류 수정
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { Connection, Edge, Node } from '@xyflow/react';
|
||||
import type { LogicNode, ConditionDSL } from './strategyTypes';
|
||||
import { nodeToText, type DefType } from './strategyEditorShared';
|
||||
import { formatIndicatorPeriodLabel } from './strategyIndicatorPeriods';
|
||||
import {
|
||||
START_NODE_ID,
|
||||
defaultStartMeta,
|
||||
@@ -735,17 +736,7 @@ export function logicNodeToFlow(
|
||||
}
|
||||
|
||||
export function getIndicatorPeriodLabel(indicator: string, def: DefType): string {
|
||||
switch (indicator) {
|
||||
case 'RSI': return String(def.rsiPeriod);
|
||||
case 'MACD': return `${def.macdFast}/${def.macdSlow}`;
|
||||
case 'CCI': return String(def.cciPeriod);
|
||||
case 'STOCHASTIC': return `${def.stochK}/${def.stochD}`;
|
||||
case 'ADX': return String(def.adxPeriod);
|
||||
case 'MA': return String(def.maLines[0] ?? 5);
|
||||
case 'EMA': return String(def.maLines[0] ?? 5);
|
||||
case 'BOLLINGER': return String(def.bbPeriod);
|
||||
default: return '';
|
||||
}
|
||||
return formatIndicatorPeriodLabel(indicator, def);
|
||||
}
|
||||
|
||||
/** 트리에서 노드 추출 (부모에서 제거 후 반환) */
|
||||
|
||||
Reference in New Issue
Block a user