일목균형표 수정
This commit is contained in:
+15
-2
@@ -148,7 +148,7 @@ public class StrategyConditionTimeframeService {
|
||||
String type = node.path("type").asText("");
|
||||
|
||||
if ("TIMEFRAME".equals(type)) {
|
||||
out.add(LiveStrategyTimeframeService.normalize(node.path("candleType").asText("1m")));
|
||||
addTimeframeCandleTypes(node, out);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ public class StrategyConditionTimeframeService {
|
||||
if (children.isArray() && !children.isEmpty()) {
|
||||
if (allTimeframeChildren(children)) {
|
||||
for (JsonNode tf : children) {
|
||||
out.add(LiveStrategyTimeframeService.normalize(tf.path("candleType").asText("1m")));
|
||||
addTimeframeCandleTypes(tf, out);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -183,4 +183,17 @@ public class StrategyConditionTimeframeService {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/** TIMEFRAME 노드 — candleTypes 배열 또는 단일 candleType */
|
||||
static void addTimeframeCandleTypes(JsonNode timeframeNode, Set<String> out) {
|
||||
JsonNode arr = timeframeNode.path("candleTypes");
|
||||
if (arr.isArray() && !arr.isEmpty()) {
|
||||
for (JsonNode t : arr) {
|
||||
String ct = LiveStrategyTimeframeService.normalize(t.asText(""));
|
||||
if (!ct.isBlank()) out.add(ct);
|
||||
}
|
||||
return;
|
||||
}
|
||||
out.add(LiveStrategyTimeframeService.normalize(timeframeNode.path("candleType").asText("1m")));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user