...
This commit is contained in:
@@ -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
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user