보조지표 직접입력 오류 수정
This commit is contained in:
@@ -20,12 +20,18 @@ public final class IndicatorHlineResolver {
|
||||
|
||||
if (field == null || field.isBlank()) return null;
|
||||
|
||||
// K_ 직접입력 — targetValue 가 있으면 thresholdOverride 플래그와 무관하게 우선
|
||||
if (field.startsWith("K_") && cond != null && cond.has("targetValue") && !cond.path("targetValue").isNull()) {
|
||||
return cond.path("targetValue").asDouble();
|
||||
boolean override = cond != null && cond.path("thresholdOverride").asBoolean(false);
|
||||
|
||||
// K_ 직접입력 — targetValue·override 시 필드명/스냅샷 숫자 우선
|
||||
if (field.startsWith("K_")) {
|
||||
if (cond != null && cond.has("targetValue") && !cond.path("targetValue").isNull()) {
|
||||
return cond.path("targetValue").asDouble();
|
||||
}
|
||||
if (override) {
|
||||
try { return Double.parseDouble(field.substring(2)); } catch (NumberFormatException ignored) {}
|
||||
}
|
||||
}
|
||||
|
||||
boolean override = cond != null && cond.path("thresholdOverride").asBoolean(false);
|
||||
if (override) {
|
||||
if (cond.has("targetValue") && !cond.path("targetValue").isNull()) {
|
||||
return cond.path("targetValue").asDouble();
|
||||
|
||||
Reference in New Issue
Block a user