This commit is contained in:
2026-04-29 15:32:09 +09:00
parent a3a0338cc5
commit 2c736e687c
13 changed files with 857 additions and 104 deletions
+31 -9
View File
@@ -470,7 +470,9 @@ object TradingLogStore {
val stockName: String,
val decision: String,
val confidence: Double,
val reason: String
val reason: String,
var stockCode: String? = null,
var qty: Int? = 0,
)
fun addLog(decision: TradingDecision) {
@@ -519,15 +521,17 @@ object TradingLogStore {
fun addAnalyzer(name : String, code : String, log: String, positive : Boolean = false) {
synchronized(this) {
if (decisionLogs.size > 1000) decisionLogs.removeAt(0)
decisionLogs.add(
LogEntry(
time = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss")),
stockName = "$name[$code] 분석",
decision = if(positive) "ANALYZER" else "PASS",
confidence = 100.0,
reason = log
if (positive) {
decisionLogs.add(
LogEntry(
time = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss")),
stockName = "$name[$code] 분석",
decision = if (positive) "ANALYZER" else "PASS",
confidence = 100.0,
reason = log
)
)
)
}
}
}
@@ -546,6 +550,24 @@ object TradingLogStore {
}
}
fun addNotice(name : String, code : String, log: String, qty: Int? = null) {
synchronized(this) {
if (decisionLogs.size > 1000) decisionLogs.removeAt(0)
decisionLogs.add(
LogEntry(
time = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss")),
stockName = "$name[$code] 분석",
decision = "NOTICE",
confidence = 100.0,
reason = log,
stockCode = code,
qty = qty
)
)
}
}
fun addAfterMarketLog(name : String, code : String, log: String) {
synchronized(this) {