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

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
@@ -12,14 +12,12 @@ import {
type PaletteItemKind,
} from '../../utils/strategyPaletteStorage';
/** 팔레트 카드 기간 표시 — 항상 보조지표 설정(DEF) 기준 */
function periodLabel(item: PaletteItem, def: DefType): string {
if (item.kind === 'composite') {
const d = getCompositeDefaultPeriods(item.value, def);
const s = item.shortPeriod ?? d.short;
const l = item.longPeriod ?? d.long;
return `${s} / ${l}`;
return `${d.short} / ${d.long}`;
}
if (item.period != null) return String(item.period);
return getIndicatorPeriodLabel(item.value, def) || String(getDefaultIndicatorPeriod(item.value, def));
}
@@ -39,7 +39,7 @@ export default function PaletteItemModal({
setLabel(initial.label);
setDesc(initial.desc);
if (kind === 'auxiliary') {
setPeriod(initial.period ?? getDefaultIndicatorPeriod(initial.value, def));
setPeriod(getDefaultIndicatorPeriod(initial.value, def));
} else {
const d = getCompositeDefaultPeriods(initial.value, def);
setShortPeriod(initial.shortPeriod ?? d.short);