전략 시간봉 오류 수정
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user