알림목록 백테스팅 차트에서 이동평균선, 일목균형표, 볼린저 그래프 표시

This commit is contained in:
Macbook
2026-06-08 13:21:30 +09:00
parent 7f29bbd309
commit 1d1c277e3a
8 changed files with 182 additions and 36 deletions
@@ -47,8 +47,15 @@ export function applyPaperOverlayVisibility(
});
}
/** 투자관리 차트 — 표시 설정 메뉴에 항상 노출할 오버레이 (지표 인스턴스 유무와 무관) */
const PAPER_OVERLAY_ALWAYS_MENU: PaperOverlayToggleKey[] = ['ma', 'bollinger'];
/** 캔들 오버레이 토글 — 전략·지표 유무와 무관하게 항상 노출 */
const PAPER_OVERLAY_ALWAYS_MENU: PaperOverlayToggleKey[] = ['ma', 'ichimoku', 'bollinger'];
/** ChartManager.setChartOverlayVisibility 용 */
export function paperOverlayVisibilityToChart(
visibility: PaperOverlayVisibility,
): import('./chartOverlayVisibility').ChartOverlayVisibility {
return { ma: visibility.ma, bollinger: visibility.bollinger, ichimoku: visibility.ichimoku, candle: true };
}
export function listPaperOverlayToggleItems(
indicators: IndicatorConfig[],
@@ -254,8 +254,8 @@ export function buildStrategyChartIndicators(
const MA_OVERLAY_TYPES = new Set(['SMA', 'EMA']);
/**
* 투자관리 차트 탭 — 캔들 영역에 이동평균(SMA)·볼린저밴드를 기본 포함
* (전략 조건에 없어도 표시 설정 메뉴로 표시/숨김 가능)
* 캔들 영역 기본 오버레이 — 이동평균(SMA)·일목균형표·볼린저밴드
* (전략에 없어도 표시, 우측 상단 토글로 표시/숨김)
*/
export function ensurePaperChartOverlays(
indicators: IndicatorConfig[],
@@ -263,6 +263,7 @@ export function ensurePaperChartOverlays(
getVisual: GetVisual,
): IndicatorConfig[] {
const hasMa = indicators.some(i => MA_OVERLAY_TYPES.has(i.type));
const hasIchimoku = indicators.some(i => i.type === 'IchimokuCloud');
const hasBb = indicators.some(i => i.type === 'BollingerBands');
const prepend: IndicatorConfig[] = [];
@@ -274,6 +275,14 @@ export function ensurePaperChartOverlays(
);
if (sma) prepend.push(sma);
}
if (!hasIchimoku) {
const ichimoku = buildOneIndicator(
{ dslType: 'ICHIMOKU', registryType: 'IchimokuCloud' },
getParams,
getVisual,
);
if (ichimoku) prepend.push(ichimoku);
}
if (!hasBb) {
const bb = buildOneIndicator(
{ dslType: 'BOLLINGER', registryType: 'BollingerBands' },