전략 시간봉 오류 수정

This commit is contained in:
Macbook
2026-05-28 00:36:49 +09:00
parent 2713b2951d
commit 4f6694b206
16 changed files with 285 additions and 127 deletions
+10 -1
View File
@@ -147,11 +147,20 @@ function shouldShowBbBandFill(config: IndicatorConfig): boolean {
}
function attachBbBandFill(entry: IndicatorEntry, config: IndicatorConfig): void {
if (!shouldShowBbBandFill(config)) {
detachBbBandFill(entry);
return;
}
const basis = seriesByPlotId(entry, 'plot0');
const upper = seriesByPlotId(entry, 'plot1');
const lower = seriesByPlotId(entry, 'plot2');
if (!basis || !upper || !lower || !shouldShowBbBandFill(config)) return;
if (!basis || !upper || !lower) return;
const bg = resolveBbBandBackground(config.bandBackground);
if (entry.bbFillPrimitive) {
entry.bbFillPrimitive.updateBackground(bg);
entry.bbFillPrimitive.requestRefresh();
return;
}
entry.bbFillPrimitive = new BollingerBandFillPrimitive(upper, lower, bg);
basis.attachPrimitive(entry.bbFillPrimitive);
}