가상투자 화면 목록 선택 동작

This commit is contained in:
Macbook
2026-05-25 14:05:13 +09:00
parent 20f11f6c4b
commit 3102169541
24 changed files with 130 additions and 27 deletions
@@ -535,6 +535,7 @@ public class BacktestingService {
case "1m" -> Duration.ofMinutes(1);
case "3m" -> Duration.ofMinutes(3);
case "5m" -> Duration.ofMinutes(5);
case "10m" -> Duration.ofMinutes(10);
case "15m" -> Duration.ofMinutes(15);
case "30m" -> Duration.ofMinutes(30);
case "1h" -> Duration.ofHours(1);
@@ -163,6 +163,7 @@ public class IndicatorService {
case "1m" -> Duration.ofMinutes(1);
case "3m" -> Duration.ofMinutes(3);
case "5m" -> Duration.ofMinutes(5);
case "10m" -> Duration.ofMinutes(10);
case "15m" -> Duration.ofMinutes(15);
case "30m" -> Duration.ofMinutes(30);
case "1h" -> Duration.ofHours(1);
@@ -66,7 +66,7 @@ public class LiveStrategyTimeframeService {
private static String mapChartTfToCandleType(String chartTf) {
return switch (chartTf) {
case "1m", "3m", "5m", "15m", "30m" -> chartTf;
case "1m", "3m", "5m", "10m", "15m", "30m" -> chartTf;
case "1h", "4h" -> chartTf;
case "1D" -> "1d";
case "1W", "1M" -> "1d";
@@ -25,7 +25,7 @@ import java.util.concurrent.ConcurrentHashMap;
*
* 구조: ConcurrentHashMap<market, Map<candleType, BarSeries>>
* - market : "KRW-BTC", "KRW-ETH" 등 업비트 종목 코드
* - candleType: "1m", "3m", "5m", "15m", "30m", "1h", "4h", "1d"
* - candleType: "1m", "3m", "5m", "10m", "15m", "30m", "1h", "4h", "1d"
*
* 슬라이딩 윈도우: 모든 BarSeries 에 setMaximumBarCount(300) 적용.
* 301번째 캔들이 들어오면 가장 오래된 캔들이 자동 소멸.
@@ -51,6 +51,7 @@ public class Ta4jStorage {
"1m", "minutes/1",
"3m", "minutes/3",
"5m", "minutes/5",
"10m", "minutes/10",
"15m", "minutes/15",
"30m", "minutes/30",
"1h", "minutes/60",
@@ -231,6 +232,7 @@ public class Ta4jStorage {
case "1m" -> Duration.ofMinutes(1);
case "3m" -> Duration.ofMinutes(3);
case "5m" -> Duration.ofMinutes(5);
case "10m" -> Duration.ofMinutes(10);
case "15m" -> Duration.ofMinutes(15);
case "30m" -> Duration.ofMinutes(30);
case "1h" -> Duration.ofHours(1);
@@ -48,7 +48,7 @@ public class CandleGapBackfillService {
@Value("${upbit.api.request-delay-ms:110}")
private long requestDelayMs;
private static final String[] BACKFILL_TYPES = {"1m", "3m", "5m", "15m", "30m", "1h", "4h", "1d"};
private static final String[] BACKFILL_TYPES = {"1m", "3m", "5m", "10m", "15m", "30m", "1h", "4h", "1d"};
private volatile long lastRunAtMs;
private final AtomicInteger lastRunMarkets = new AtomicInteger();
@@ -32,9 +32,9 @@ import java.util.concurrent.ConcurrentHashMap;
* 명세서 3.2 준수:
* - 동일 분(minute) 내 틱 → series.addPrice(price, volume) 로 현재 Bar 갱신
* - 분이 바뀌는 틱 → 이전 Bar 를 확정하고 series.addBar(newBar) 로 새 캔들 열기
* - 1분봉 확정 시 상위 타임프레임(3m, 5m, 15m, 30m, 1h, 4h, 1d)으로 집계 전파
* - 1분봉 확정 시 상위 타임프레임(3m, 5m, 10m, 15m, 30m, 1h, 4h, 1d)으로 집계 전파
*
* 지원 캔들 타입: 1m, 3m, 5m, 15m, 30m, 1h, 4h, 1d
* 지원 캔들 타입: 1m, 3m, 5m, 10m, 15m, 30m, 1h, 4h, 1d
*/
@Component
@RequiredArgsConstructor
@@ -49,9 +49,9 @@ public class BarBuilder {
private final GcLiveStrategySettingsRepository liveSettingsRepo;
private final StrategyConditionTimeframeService conditionTimeframes;
/** 상위 집계 타임프레임 (분 단위 집계 주기: 3, 5, 15, 30, 60, 240, 1440) */
private static final int[] UPPER_MINUTES = {3, 5, 15, 30, 60, 240, 1440};
private static final String[] UPPER_TYPES = {"3m", "5m", "15m", "30m", "1h", "4h", "1d"};
/** 상위 집계 타임프레임 (분 단위 집계 주기: 3, 5, 10, 15, 30, 60, 240, 1440) */
private static final int[] UPPER_MINUTES = {3, 5, 10, 15, 30, 60, 240, 1440};
private static final String[] UPPER_TYPES = {"3m", "5m", "10m", "15m", "30m", "1h", "4h", "1d"};
/** 진행 중인 1분봉 상태 (market → PartialBar) */
private final ConcurrentHashMap<String, PartialBar> partialBars = new ConcurrentHashMap<>();