From b69a8c8901134318758a91b880cbd638668a26d2 Mon Sep 17 00:00:00 2001 From: Macbook Date: Tue, 2 Jun 2026 03:41:53 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=BC=EB=AA=A9=EA=B7=A0=ED=98=95=ED=91=9C?= =?UTF-8?q?=20=EC=84=9C=EB=B2=84=20=EB=AF=B8=ED=91=9C=EC=8B=9C=20=EB=B2=84?= =?UTF-8?q?=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. isIchimokuCloudVisible에서 areIchimokuSpanLinesVisible 검사 제거 - 서버 DB 구버전 설정(plot3/plot4=false)에서 구름이 미표시되는 회귀 수정 - 라인 표시 여부와 구름 표시 여부를 독립적으로 동작하도록 변경 2. calculateIndicator: ind.calculate에 calcParams 전달하도록 버그 수정 - senkouDisplacement 커스텀 값이 실제 계산에 반영되지 않던 문제 수정 Co-authored-by: Cursor --- frontend/src/utils/ichimokuConfig.ts | 8 ++++++-- frontend/src/utils/indicatorRegistry.ts | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/utils/ichimokuConfig.ts b/frontend/src/utils/ichimokuConfig.ts index 6ea3329..b7dadd8 100644 --- a/frontend/src/utils/ichimokuConfig.ts +++ b/frontend/src/utils/ichimokuConfig.ts @@ -113,10 +113,14 @@ export function areIchimokuSpanLinesVisible(config: IndicatorConfig): boolean { ); } -/** 구름 영역을 그릴 수 있는지 (지표 표시 on + 선행스팬 + 구름 색상 설정) */ +/** 구름 영역을 그릴 수 있는지 (지표 표시 on + 구름 색상 설정) + * + * 선행스팬 라인의 개별 표시 여부(plotVisibility)와 구름 표시는 독립적으로 동작. + * 서버 DB에 저장된 구버전 설정에서 plot3·plot4 가 false 여도 구름은 표시해야 하므로 + * areIchimokuSpanLinesVisible 검사를 생략한다. + */ export function isIchimokuCloudVisible(config: IndicatorConfig): boolean { if (config.hidden === true) return false; - if (!areIchimokuSpanLinesVisible(config)) return false; const colors = resolveIchimokuCloudColors(config.cloudColors); return colors.bullishVisible !== false || colors.bearishVisible !== false; } diff --git a/frontend/src/utils/indicatorRegistry.ts b/frontend/src/utils/indicatorRegistry.ts index 7bfcf72..2a95ee9 100644 --- a/frontend/src/utils/indicatorRegistry.ts +++ b/frontend/src/utils/indicatorRegistry.ts @@ -657,8 +657,8 @@ export async function calculateIndicator( calculate: (b: Bar[], p: unknown) => { plots?: Record; markers?: MarkerData[] } }>)[type]; if (!ind?.calculate) throw new Error(`Unknown indicator: ${type}`); - // 파라미터 키 이름을 라이브러리 기대값으로 변환 후 전달 - const result = ind.calculate(b, translateParams(type, params)); + // calcParams(displacement 등 정규화된 값)를 라이브러리에 전달 + const result = ind.calculate(b, translateParams(type, calcParams)); return { plots: (result.plots ?? {}) as IndicatorResult, markers: result.markers as MarkerData[] | undefined,