...
This commit is contained in:
@@ -165,7 +165,7 @@ object AutoTradingManager {
|
|||||||
)
|
)
|
||||||
var hasCodes =
|
var hasCodes =
|
||||||
KisSession.tradeConfig.lowerAveragePrice && currentBalance?.getHoldings()
|
KisSession.tradeConfig.lowerAveragePrice && currentBalance?.getHoldings()
|
||||||
?.any { it.code.equals(decision.stockCode) && it.quantity.toInt() > 2 && it.availOrderCount.toInt() > 0 } ?: false
|
?.any { it.code.equals(decision.stockCode) && it.quantity.toInt() >= KisSession.tradeConfig.lowerAverageTargetCount && it.availOrderCount.toInt() > 0 } ?: false
|
||||||
|
|
||||||
val calculatedQty =
|
val calculatedQty =
|
||||||
if (hasCodes == true) KisSession.tradeConfig.lowerAverageStockCount else (maxBudget / decision.currentPrice).toInt()
|
if (hasCodes == true) KisSession.tradeConfig.lowerAverageStockCount else (maxBudget / decision.currentPrice).toInt()
|
||||||
@@ -397,7 +397,9 @@ object AutoTradingManager {
|
|||||||
TradingLogStore.addLog(decision, "BUY", it.message ?: "매수 실패")
|
TradingLogStore.addLog(decision, "BUY", it.message ?: "매수 실패")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!hasCode && KisSession.isAvailBuyTime(LocalTime.now()) == false) {
|
} else if (!hasCode && KisSession.isAvailBuyTime(LocalTime.now()) == false &&
|
||||||
|
(decision.investmentGrade?.displayName?.contains("4") == true || decision.investmentGrade?.displayName?.contains("5") == true)
|
||||||
|
) {
|
||||||
AutoTradingManager.addToReanalysis(
|
AutoTradingManager.addToReanalysis(
|
||||||
RankingStock(
|
RankingStock(
|
||||||
mksc_shrn_iscd = stockCode,
|
mksc_shrn_iscd = stockCode,
|
||||||
|
|||||||
Reference in New Issue
Block a user