obv 신호선
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user