This commit is contained in:
lunaticbum 2026-01-22 16:26:29 +09:00
parent 99804b892a
commit 5587635624
2 changed files with 11 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import model.CandleData
import network.KisTradeService
import network.NewsService
import java.time.LocalTime
import kotlin.collections.List
// service/AutoTradingManager.kt
object AutoTradingManager {
@ -54,6 +55,8 @@ object TechnicalAnalyzer {
var weekly: List<CandleData> = emptyList()
var daily: List<CandleData> = emptyList()
var min30: List<CandleData> = emptyList()
fun generateComprehensiveReport(): String {
// [1] 단기 에너지 지표 계산 (최근 30분봉 기준)
val obv = calculateOBV(min30)
@ -160,4 +163,11 @@ object TechnicalAnalyzer {
return ad
}
fun clear() {
monthly = emptyList()
weekly = emptyList()
daily = emptyList()
min30 = emptyList()
}
}

View File

@ -91,6 +91,7 @@ fun StockDetailSection(
// 2. 차트 데이터 로드 (KisSession 기반으로 파라미터 간소화)
coroutineScope {
TechnicalAnalyzer.clear()
launch {tradeService.fetchChartData(stockCode, isDomestic)
.onSuccess { data ->
println("✅ 차트 데이터 로드 성공: ${data.size}") // ${} 사용하여 정확히 출력