일목균형표 서버 미표시 버그 수정
1. isIchimokuCloudVisible에서 areIchimokuSpanLinesVisible 검사 제거 - 서버 DB 구버전 설정(plot3/plot4=false)에서 구름이 미표시되는 회귀 수정 - 라인 표시 여부와 구름 표시 여부를 독립적으로 동작하도록 변경 2. calculateIndicator: ind.calculate에 calcParams 전달하도록 버그 수정 - senkouDisplacement 커스텀 값이 실제 계산에 반영되지 않던 문제 수정 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -113,10 +113,14 @@ export function areIchimokuSpanLinesVisible(config: IndicatorConfig): boolean {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 구름 영역을 그릴 수 있는지 (지표 표시 on + 선행스팬 + 구름 색상 설정) */
|
/** 구름 영역을 그릴 수 있는지 (지표 표시 on + 구름 색상 설정)
|
||||||
|
*
|
||||||
|
* 선행스팬 라인의 개별 표시 여부(plotVisibility)와 구름 표시는 독립적으로 동작.
|
||||||
|
* 서버 DB에 저장된 구버전 설정에서 plot3·plot4 가 false 여도 구름은 표시해야 하므로
|
||||||
|
* areIchimokuSpanLinesVisible 검사를 생략한다.
|
||||||
|
*/
|
||||||
export function isIchimokuCloudVisible(config: IndicatorConfig): boolean {
|
export function isIchimokuCloudVisible(config: IndicatorConfig): boolean {
|
||||||
if (config.hidden === true) return false;
|
if (config.hidden === true) return false;
|
||||||
if (!areIchimokuSpanLinesVisible(config)) return false;
|
|
||||||
const colors = resolveIchimokuCloudColors(config.cloudColors);
|
const colors = resolveIchimokuCloudColors(config.cloudColors);
|
||||||
return colors.bullishVisible !== false || colors.bearishVisible !== false;
|
return colors.bullishVisible !== false || colors.bearishVisible !== false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -657,8 +657,8 @@ export async function calculateIndicator(
|
|||||||
calculate: (b: Bar[], p: unknown) => { plots?: Record<string, PlotData>; markers?: MarkerData[] }
|
calculate: (b: Bar[], p: unknown) => { plots?: Record<string, PlotData>; markers?: MarkerData[] }
|
||||||
}>)[type];
|
}>)[type];
|
||||||
if (!ind?.calculate) throw new Error(`Unknown indicator: ${type}`);
|
if (!ind?.calculate) throw new Error(`Unknown indicator: ${type}`);
|
||||||
// 파라미터 키 이름을 라이브러리 기대값으로 변환 후 전달
|
// calcParams(displacement 등 정규화된 값)를 라이브러리에 전달
|
||||||
const result = ind.calculate(b, translateParams(type, params));
|
const result = ind.calculate(b, translateParams(type, calcParams));
|
||||||
return {
|
return {
|
||||||
plots: (result.plots ?? {}) as IndicatorResult,
|
plots: (result.plots ?? {}) as IndicatorResult,
|
||||||
markers: result.markers as MarkerData[] | undefined,
|
markers: result.markers as MarkerData[] | undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user