알림목록 obv 그래프 문제 최종수정
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
import { useEffect, useRef, useCallback, useState } from 'react';
|
||||
import { getIndicatorDef, mergePlotDefs, normalizeHLines, normalizeObvParams, enrichIndicatorConfig, PlotDef, HLineDef } from '../utils/indicatorRegistry';
|
||||
import { getIndicatorDef, mergePlotDefs, mergePlotDefsFromSavedVisual, normalizeHLines, normalizeObvParams, enrichIndicatorConfig, PlotDef, HLineDef } from '../utils/indicatorRegistry';
|
||||
import { createDefaultSmaParams, createDefaultSmaPlots, normalizeSmaConfig } from '../utils/smaConfig';
|
||||
import { normalizeIchimokuConfig, mergeIchimokuPlots } from '../utils/ichimokuConfig';
|
||||
import {
|
||||
@@ -39,6 +39,7 @@ import {
|
||||
loadIndicatorVisualSettings,
|
||||
saveIndicatorVisualSettings,
|
||||
} from '../utils/backendApi';
|
||||
import { invalidateWorkspaceChartIndicatorsCache } from '../utils/workspaceChartIndicatorsCache';
|
||||
|
||||
type ParamMap = Record<string, unknown>;
|
||||
type AllSettings = Record<string, ParamMap>;
|
||||
@@ -114,6 +115,7 @@ export function invalidateIndicatorSettingsCache() {
|
||||
_visualCache = null;
|
||||
_visualLoadPromise = null;
|
||||
_loadedSessionKey = null;
|
||||
invalidateWorkspaceChartIndicatorsCache();
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
@@ -278,7 +280,7 @@ export function useIndicatorSettings(sessionKey = 0) {
|
||||
const saved = _visualCache?.[type];
|
||||
const def = getIndicatorDef(type);
|
||||
const registryPlots = defaultPlots ?? def?.plots ?? [];
|
||||
let plots = mergePlotDefs(saved?.plots as PlotDef[] | undefined, registryPlots);
|
||||
let plots = mergePlotDefsFromSavedVisual(saved?.plots as PlotDef[] | undefined, registryPlots, type);
|
||||
const registryHlines = defaultHlines ?? def?.hlines ?? [];
|
||||
const rawHlines = (saved?.hlines as HLineDef[] | undefined) ?? registryHlines;
|
||||
const hlines = normalizeHLines(rawHlines, type, registryHlines);
|
||||
|
||||
Reference in New Issue
Block a user