n봉 존재 조건 수정
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import type { LogicNode } from '../../utils/strategyTypes';
|
||||
import { CONDITION_LABEL } from '../../utils/strategyTypes';
|
||||
import { CONDITION_LABEL, resolveCandleRangeMode, candleRangeWindowBars } from '../../utils/strategyTypes';
|
||||
import { getStrategyIndicatorDisplayName } from '../../utils/strategyPaletteStorage';
|
||||
import { getIndicatorPaletteCategory } from '../strategyEditor/paletteCategories';
|
||||
import { nodeToText } from '../../utils/strategyEditorShared';
|
||||
@@ -56,9 +56,13 @@ const ConditionCard: React.FC<{ node: LogicNode }> = ({ node }) => {
|
||||
const descText = fullText.startsWith(prefix) ? fullText.slice(prefix.length) : fullText;
|
||||
const { left, mid: condStr, right } = splitDescByCondType(descText);
|
||||
|
||||
const candleRange = cond.candleRange != null && cond.candleRange > 0
|
||||
? `${cond.candleRange}캔들 전`
|
||||
: '현재 캔들';
|
||||
const rangeMode = resolveCandleRangeMode(cond);
|
||||
const rangeN = candleRangeWindowBars(cond);
|
||||
const candleRangeLabel = rangeMode === 'CURRENT'
|
||||
? '현재 캔들'
|
||||
: rangeMode === 'EXISTS_IN'
|
||||
? `최근 ${rangeN}봉 내 존재`
|
||||
: `최근 ${rangeN}봉 내 미존재`;
|
||||
|
||||
const condLabelDisplay = CONDITION_LABEL[cond.conditionType] ?? (condStr || cond.conditionType);
|
||||
|
||||
@@ -71,7 +75,7 @@ const ConditionCard: React.FC<{ node: LogicNode }> = ({ node }) => {
|
||||
<div className="scv-cond-fields">
|
||||
<div className="scv-cond-field">
|
||||
<span className="scv-cond-field-lbl">캔들범위</span>
|
||||
<span className="scv-cond-field-val">{candleRange}</span>
|
||||
<span className="scv-cond-field-val">{candleRangeLabel}</span>
|
||||
</div>
|
||||
{left && (
|
||||
<div className="scv-cond-field">
|
||||
|
||||
Reference in New Issue
Block a user