전략편집기 기준값 보조지표 설정값 동기화

This commit is contained in:
Macbook
2026-05-28 09:20:06 +09:00
parent 9137864f48
commit e2816b037f
18 changed files with 710 additions and 153 deletions
@@ -6,6 +6,8 @@ import {
getCompositeRightCandleType,
getConditionRightPeriod,
getConditionThreshold,
getChartReferenceThreshold,
isThresholdOverridden,
getConditionValuePeriod,
getCompositePeriodPresetOptions,
getPeriodPresetOptions,
@@ -52,8 +54,9 @@ export default function ConditionNodeSettings({
}, [onClose]);
const inheritedThreshold = getDefaultConditionFields(condition.indicatorType, signalType, def).r;
const rightThreshold = getConditionThreshold(condition, 'right', inheritedThreshold);
const showThreshold = hasEditableThreshold(condition) && rightThreshold != null;
const chartRef = getChartReferenceThreshold(condition, 'right', inheritedThreshold, def);
const strategyThreshold = getConditionThreshold(condition, 'right', inheritedThreshold, def);
const showThreshold = hasEditableThreshold(condition) && chartRef != null;
const periodPresets = getPeriodPresetOptions(condition.indicatorType, def);
const thresholdPresets = getThresholdPresetOptions(condition.indicatorType);
const thresholdBounds = getThresholdBounds(condition.indicatorType);
@@ -139,18 +142,24 @@ export default function ConditionNodeSettings({
/>
</label>
) : null}
{showThreshold && rightThreshold != null && (
<label className="se-flow-settings-field">
<span></span>
<ComboNumberInput
value={rightThreshold}
options={thresholdPresets}
min={thresholdBounds.min}
max={thresholdBounds.max}
allowDecimal
onChange={v => onChange(setConditionThreshold(condition, 'right', v))}
/>
</label>
{showThreshold && chartRef != null && (
<>
<label className="se-flow-settings-field se-flow-settings-field--readonly">
<span> ( )</span>
<output className="se-flow-settings-readout">{chartRef}</output>
</label>
<label className="se-flow-settings-field">
<span> {isThresholdOverridden(condition) ? ' (전용)' : ''}</span>
<ComboNumberInput
value={strategyThreshold ?? chartRef}
options={thresholdPresets}
min={thresholdBounds.min}
max={thresholdBounds.max}
allowDecimal
onChange={v => onChange(setConditionThreshold(condition, 'right', v, def))}
/>
</label>
</>
)}
{condition.composite && (
<p className="se-flow-settings-hint">{compositeDisplayName(condition.indicatorType)}</p>