보조지표 기준값 변경시 전략편집기 연동

This commit is contained in:
Macbook
2026-05-27 09:53:19 +09:00
parent 8876dbd752
commit cd5502d302
13 changed files with 288 additions and 110 deletions
+8 -7
View File
@@ -1086,13 +1086,10 @@ export function makeNodeOptionsFromPalette(data: {
if (data.composite) {
return {
composite: true,
leftPeriod: data.shortPeriod,
rightPeriod: data.longPeriod,
leftCandleType: data.leftCandleType,
rightCandleType: data.rightCandleType,
};
}
if (data.period != null) return { period: data.period };
return undefined;
}
@@ -1106,12 +1103,16 @@ export const makeNode = (
if (type === 'operator') return { id: genId(), type: value as LogicNodeType, children: [] };
if (options?.composite) {
let condition = makeCompositeCondition(value, signalType, DEF);
if (options.leftPeriod != null || options.rightPeriod != null
|| options.leftCandleType != null || options.rightCandleType != null) {
condition = {
...condition,
valuePeriodOverride: false,
rightPeriodOverride: false,
thresholdOverride: false,
};
if (options.leftCandleType != null || options.rightCandleType != null) {
condition = syncCompositeFields({
...condition,
leftPeriod: options.leftPeriod ?? condition.leftPeriod,
rightPeriod: options.rightPeriod ?? condition.rightPeriod,
composite: true,
leftCandleType: options.leftCandleType ?? condition.leftCandleType,
rightCandleType: options.rightCandleType ?? condition.rightCandleType,
});