fix: 백테스팅 시 인디케이터 파라미터를 DB에서 자동 로드

BacktestingService에 IndicatorSettingsService를 주입하여 백테스팅
실행 시 deviceId 기반으로 DB 저장 인디케이터 설정을 자동으로 로드한다.

- 프론트엔드가 indicatorParams를 전달하지 않아도 DB 저장값 사용 보장
- 요청에 포함된 indicatorParams는 DB값 위에 override로 적용(우선순위 높음)
- 어떠한 경우에도 백엔드 하드코딩 기본값만으로 테스트되는 상황 방지
- mergeIndicatorParams() 헬퍼로 DB+요청 파라미터 내부 필드 단위 병합

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-11 17:48:21 +09:00
parent 9d9c14c2b1
commit dafb1e49af
2 changed files with 48 additions and 4 deletions
@@ -39,9 +39,10 @@ public class BacktestRequest {
private String timeframe;
/**
* 지표 파라미터 오버라이드.
* 지표 파라미터 오버라이드 (선택).
* key = indicatorType (e.g. "CCI"), value = {length:13, ...}
* 없으면 IndicatorService 기본값 사용.
* BacktestingService 가 deviceId 기반으로 DB 저장값을 자동 로드하므로
* 보통 생략해도 되며, 명시 시 DB 값 위에 덮어쓴다(우선 적용).
*/
private Map<String, Map<String, Object>> indicatorParams;