전략평가 차트설정탭 추가수정

This commit is contained in:
Macbook
2026-06-18 09:38:10 +09:00
parent 914afc9d5a
commit 615f509f7d
8 changed files with 607 additions and 28 deletions
@@ -233,3 +233,31 @@ export function resetConfigToDefaults(config: IndicatorConfig): IndicatorConfig
};
return enrichIndicatorConfig(draft);
}
export interface PersistIndicatorDefaultsFns {
saveParams: (type: string, params: Record<string, number | string | boolean>) => void;
saveVisual: (
type: string,
plots?: PlotDef[],
hlines?: HLineDef[],
cloudColors?: IchimokuCloudColors,
bandBackground?: HlinesBackground,
plotVisibility?: Record<string, boolean>,
) => void;
}
/** 보조지표 설정 1건을 DB 기본값(파라미터·시각)에 즉시 반영 */
export function persistIndicatorConfigToDb(
config: IndicatorConfig,
fns: PersistIndicatorDefaultsFns,
): void {
fns.saveParams(config.type, config.params);
fns.saveVisual(
config.type,
config.plots,
config.hlines,
config.cloudColors,
config.bandBackground,
config.plotVisibility,
);
}