수정
This commit is contained in:
@@ -11,11 +11,11 @@ import {
|
||||
} from './conditionPeriods';
|
||||
import {
|
||||
defaultInheritedThresholdField,
|
||||
inferThresholdSymbolFromLegacy,
|
||||
inferThresholdSymbolFromLegacyExact,
|
||||
isThresholdFieldOrSymbol,
|
||||
isThresholdSymbol,
|
||||
} from './thresholdSymbols';
|
||||
import { parseThresholdField, setDirectThreshold } from './conditionPeriods';
|
||||
import { repairPriceExtremePairForest } from './priceExtremeBreakoutPair';
|
||||
|
||||
function isConditionCarrier(node: LogicNode): node is LogicNode & { condition: ConditionDSL } {
|
||||
@@ -34,8 +34,16 @@ function migrateConditionThreshold(
|
||||
|
||||
let rightField = cond.rightField;
|
||||
if (rightField?.startsWith('K_')) {
|
||||
rightField = inferThresholdSymbolFromLegacyExact(rightField, cond.indicatorType, {})
|
||||
?? inferThresholdSymbolFromLegacy(rightField, cond.indicatorType, {});
|
||||
const exact = inferThresholdSymbolFromLegacyExact(rightField, cond.indicatorType, def.hlThresh);
|
||||
if (exact) {
|
||||
rightField = exact;
|
||||
} else {
|
||||
// K_55 등 비표준값 — 가장 가까운 HL_* 로 접지 않고 숫자 스냅샷 유지
|
||||
const val = parseThresholdField(rightField);
|
||||
if (val != null) {
|
||||
return migrateConditionPeriod(setDirectThreshold(cond, 'right', val));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!rightField || (!isThresholdSymbol(rightField) && !rightField.startsWith('K_'))) {
|
||||
const defaults = getDefaultConditionFields(cond.indicatorType, signalType, def);
|
||||
|
||||
Reference in New Issue
Block a user