This commit is contained in:
2026-03-13 17:34:48 +09:00
parent 57abcbf8f8
commit 7fa1c36355
4 changed files with 66 additions and 12 deletions
+30 -1
View File
@@ -1,4 +1,3 @@
import AutoTradeTable.orderNo
import androidx.compose.runtime.mutableStateListOf
import kotlinx.serialization.Serializable
import model.AppConfig
@@ -399,6 +398,21 @@ object TradingLogStore {
}
}
fun addSellLog(stockName: String,sellPrice : String , decision: String, log: String) {
synchronized(this) {
if (decisionLogs.size > 1000) decisionLogs.removeAt(0)
decisionLogs.add(
LogEntry(
time = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss")),
stockName = "${stockName}[${sellPrice}][]",
decision = decision,
confidence = 100.0,
reason = log
)
)
}
}
fun addLog(tradingDecision: TradingDecision , decision: String, log: String) {
synchronized(this) {
if (decisionLogs.size > 1000) decisionLogs.removeAt(0)
@@ -414,5 +428,20 @@ object TradingLogStore {
}
}
fun addSettingLog(settingDesc : String, old : String, new : String, log: String) {
synchronized(this) {
if (decisionLogs.size > 1000) decisionLogs.removeAt(0)
decisionLogs.add(
LogEntry(
time = LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss")),
stockName = "설정변경[${settingDesc}][$old]->[$new]",
decision = "SETTING",
confidence = 100.0,
reason = log
)
)
}
}
}