This commit is contained in:
lunaticbum 2026-06-02 14:43:13 +09:00
parent ada0d9d6fe
commit 059d1830b7
2 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ data class UnifiedStockHolding(
val dailyChangeRate: String = "0.0", // 당일 등락율 (fltt_rt)
val pchsAmount: String = "0" // 총 매입금액 (pchs_amt)
) {
val isTodayEntry: Boolean get() = thdtBuyQty.toIntOrNull() ?: 0 > 0
val isTodayEntry: Boolean get() = (thdtBuyQty.toIntOrNull() ?: 0) > 0
}
@Serializable

View File

@ -216,7 +216,7 @@ object AutoTradingManager {
var stockName = decision.stockName
val finalPrice = MarketUtil.roundToTickSize(oneTickLowerPrice.toDouble())
val maxStocks = KisSession.config.getValues(ConfigIndex.MAX_HOLDING_COUNT).toInt()
var hasCodes = currentBalance?.getHoldings()?.any { it.code.equals(decision.stockCode) && it.quantity.toInt() > 2 && !it.isTodayEntry}
if (!canAddNewPosition(maxStocks)) {
TradingLogStore.addNotice("SYSTEM", "LIMIT", "최대 보유 종목 도달로 신규 매수 일시 중단")