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,