직접입력값 평가오류

This commit is contained in:
Macbook
2026-06-17 23:45:39 +09:00
parent 3130de113b
commit d4b5814bbc
7 changed files with 220 additions and 24 deletions
+8 -1
View File
@@ -266,7 +266,7 @@ export function getConditionThreshold(
}
export type SetConditionThresholdOptions = {
/** true: 직접입력 — K_+targetValue+thresholdOverride 유지 (프리셋 HL_* 로 접지 않음) */
/** true: 직접입력 모드 — hline 역할과 일치하지 않는 값만 K_ 스냅샷 유지 */
directInput?: boolean;
};
@@ -294,6 +294,13 @@ export function setConditionThreshold(
const current = cond[fieldKey];
if (!isThresholdFieldOrSymbol(current)) {
if (side === 'right' && INDICATORS_WITH_RIGHT_THRESHOLD_INPUT.has(cond.indicatorType)) {
const matchedRole = def
? inferThresholdRoleForValue(value, cond.indicatorType, def.hlThresh)
: null;
if (matchedRole != null) {
const { targetValue: _t, ...rest } = cond;
return { ...rest, [fieldKey]: matchedRole, thresholdOverride: false };
}
return {
...cond,
[fieldKey]: thresholdField(value),