obv 신호선

This commit is contained in:
Macbook
2026-06-09 01:06:35 +09:00
parent 8a2d8054ad
commit 1f0671aa7a
4 changed files with 69 additions and 9 deletions
@@ -8,6 +8,8 @@ import {
enrichIndicatorConfig,
getIndicatorDef,
getHLineLabel,
mergePlotDefs,
normalizeObvParams,
type HLineDef,
} from './indicatorRegistry';
import { buildMainIndicatorConfig } from './indicatorMainConfig';
@@ -199,6 +201,17 @@ function buildOneIndicator(
plots: mainSma?.plots ?? cfg.plots,
plotVisibility: mainSma?.plotVisibility ?? cfg.plotVisibility,
});
} else if (ref.registryType === 'OBV') {
const p = normalizeObvParams({ ...cfg.params });
const signalLen = ref.rightPeriod ?? ref.period;
if (signalLen != null && signalLen > 0) {
p.maLength = signalLen;
}
cfg = {
...cfg,
params: p,
plots: mergePlotDefs(cfg.plots, def.plots),
};
} else if (ref.period != null && ref.period > 0) {
cfg = {
...cfg,