전략편집기 수정

This commit is contained in:
Macbook
2026-05-25 17:56:25 +09:00
parent aac6454724
commit 02d14e4b2b
39 changed files with 1974 additions and 288 deletions
@@ -2,6 +2,8 @@ import React, { useEffect, useRef } from 'react';
import type { ConditionDSL } from '../../utils/strategyTypes';
import type { DefType } from '../../utils/strategyEditorShared';
import {
getCompositeLeftCandleType,
getCompositeRightCandleType,
getConditionRightPeriod,
getConditionThreshold,
getConditionValuePeriod,
@@ -10,12 +12,15 @@ import {
getThresholdBounds,
getThresholdPresetOptions,
hasEditableThreshold,
setCompositeLeftCandleType,
setCompositeRightCandleType,
setConditionRightPeriod,
setConditionThreshold,
setConditionValuePeriod,
usesValuePeriodField,
} from '../../utils/conditionPeriods';
import { compositeDisplayName, compositeElementLabel } from '../../utils/compositeIndicators';
import { STRATEGY_CANDLE_TYPE_OPTIONS } from '../../utils/strategyStartNodes';
import ComboNumberInput from './ComboNumberInput';
interface Props {
@@ -67,6 +72,30 @@ export default function ConditionNodeSettings({
</div>
{condition.composite ? (
<>
<label className="se-flow-settings-field">
<span>{compositeElementLabel(condition.indicatorType, 1)} </span>
<select
className="se-combo-num-select sp-cond-sel"
value={getCompositeLeftCandleType(condition)}
onChange={e => onChange(setCompositeLeftCandleType(condition, e.target.value))}
>
{STRATEGY_CANDLE_TYPE_OPTIONS.map(o => (
<option key={o.value} value={o.value}>{o.label}</option>
))}
</select>
</label>
<label className="se-flow-settings-field">
<span>{compositeElementLabel(condition.indicatorType, 2)} </span>
<select
className="se-combo-num-select sp-cond-sel"
value={getCompositeRightCandleType(condition)}
onChange={e => onChange(setCompositeRightCandleType(condition, e.target.value))}
>
{STRATEGY_CANDLE_TYPE_OPTIONS.map(o => (
<option key={o.value} value={o.value}>{o.label}</option>
))}
</select>
</label>
<label className="se-flow-settings-field">
<span>{compositeElementLabel(condition.indicatorType, 1)} (, )</span>
<ComboNumberInput