전략편집기 기준값 보조지표 설정값 동기화
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user