추세검색 설정 추가

This commit is contained in:
Macbook
2026-05-27 01:36:06 +09:00
parent c1bcf88c6c
commit 2e08c6b16f
42 changed files with 1507 additions and 226 deletions
@@ -138,6 +138,10 @@ public class AppSettingsService {
Boolean.parseBoolean(d.get("paperAutoTradeEnabled").toString()));
if (d.containsKey("paperAutoTradeBudgetPct")) s.setPaperAutoTradeBudgetPct(
new java.math.BigDecimal(d.get("paperAutoTradeBudgetPct").toString()));
if (d.containsKey("virtualTargetMaxCount")) {
int max = Integer.parseInt(d.get("virtualTargetMaxCount").toString());
s.setVirtualTargetMaxCount(Math.min(100, Math.max(1, max)));
}
if (d.containsKey("tradingMode")) {
String mode = d.get("tradingMode").toString().toUpperCase();
s.setTradingMode("LIVE".equals(mode) || "BOTH".equals(mode) ? mode : "PAPER");
@@ -164,6 +168,9 @@ public class AppSettingsService {
new java.math.BigDecimal(d.get("liveAutoTradeBudgetPct").toString()));
if (d.containsKey("fcmPushEnabled")) s.setFcmPushEnabled(
Boolean.parseBoolean(d.get("fcmPushEnabled").toString()));
if (d.containsKey("trendSearchSettings")) {
s.setTrendSearchSettingsJson(toJson(d.get("trendSearchSettings")));
}
}
private Map<String, Object> toMap(GcAppSettings s) {
@@ -202,6 +209,8 @@ public class AppSettingsService {
m.put("paperAutoTradeEnabled", s.getPaperAutoTradeEnabled() != null ? s.getPaperAutoTradeEnabled() : false);
m.put("paperAutoTradeBudgetPct", s.getPaperAutoTradeBudgetPct() != null
? s.getPaperAutoTradeBudgetPct().doubleValue() : 95);
m.put("virtualTargetMaxCount", s.getVirtualTargetMaxCount() != null
? s.getVirtualTargetMaxCount() : 20);
m.put("tradingMode", s.getTradingMode() != null ? s.getTradingMode() : "PAPER");
m.put("liveAutoTradeEnabled", s.getLiveAutoTradeEnabled() != null ? s.getLiveAutoTradeEnabled() : false);
UpbitApiCredentials creds = resolveUpbitCredentials(s);
@@ -211,6 +220,7 @@ public class AppSettingsService {
m.put("liveAutoTradeBudgetPct", s.getLiveAutoTradeBudgetPct() != null
? s.getLiveAutoTradeBudgetPct().doubleValue() : 95);
m.put("fcmPushEnabled", s.getFcmPushEnabled() != null ? s.getFcmPushEnabled() : false);
m.put("trendSearchSettings", parseJson(s.getTrendSearchSettingsJson()));
return m;
}