전략평가 차트설정탭 추가수정
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user