직접입력값 평가오류 수정

This commit is contained in:
Macbook
2026-06-18 00:15:18 +09:00
parent 9c832a3ab8
commit ea8576d756
9 changed files with 128 additions and 90 deletions
@@ -216,10 +216,22 @@ public class StrategyDslToTa4jAdapter {
case "OR" -> buildOrRule(node, ctx);
case "NOT" -> buildNotRule(node, ctx);
case "TIMEFRAME" -> buildTimeframeRule(node, ctx);
default -> buildConditionRule(node.path("condition"), ctx);
default -> buildConditionRuleNode(node, ctx);
};
}
/** CONDITION 래퍼 — nested condition 또는 인라인 조건 필드 모두 지원 */
private Rule buildConditionRuleNode(JsonNode node, RuleBuildContext ctx) {
JsonNode nested = node.path("condition");
if (nested != null && !nested.isNull() && nested.has("indicatorType")) {
return buildConditionRule(nested, ctx);
}
if (node.has("indicatorType")) {
return buildConditionRule(node, ctx);
}
return new BooleanRule(false);
}
/** 조건 DSL left/right 필드의 현재 봉 수치 (가상투자 UI 표시용) */
public Double readConditionFieldValue(JsonNode cond, BarSeries series,
Map<String, Map<String, Object>> params,