..
This commit is contained in:
@@ -272,7 +272,7 @@ object AutoTradingManager {
|
|||||||
MarketUtil.roundToTickSize(basePrice * (1 + effectiveProfitRate / 100.0))
|
MarketUtil.roundToTickSize(basePrice * (1 + effectiveProfitRate / 100.0))
|
||||||
val calculatedStop = MarketUtil.roundToTickSize(basePrice * (1 + sRate / 100.0))
|
val calculatedStop = MarketUtil.roundToTickSize(basePrice * (1 + sRate / 100.0))
|
||||||
val inputQty = orderQty.replace(",", "").toIntOrNull() ?: 0
|
val inputQty = orderQty.replace(",", "").toIntOrNull() ?: 0
|
||||||
|
if (!hasCode) {
|
||||||
DatabaseFactory.saveAutoTrade(
|
DatabaseFactory.saveAutoTrade(
|
||||||
AutoTradeItem(
|
AutoTradeItem(
|
||||||
orderNo = realOrderNo,
|
orderNo = realOrderNo,
|
||||||
@@ -287,7 +287,6 @@ object AutoTradingManager {
|
|||||||
isDomestic = true
|
isDomestic = true
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
TradingReportManager.recordTradeDecision(
|
TradingReportManager.recordTradeDecision(
|
||||||
orderNo = realOrderNo,
|
orderNo = realOrderNo,
|
||||||
stockCode = stockCode,
|
stockCode = stockCode,
|
||||||
@@ -297,7 +296,6 @@ object AutoTradingManager {
|
|||||||
reason = decision.reason ?: "", // AI 이유
|
reason = decision.reason ?: "", // AI 이유
|
||||||
decision = decision // AI 객체 통째로 전달
|
decision = decision // AI 객체 통째로 전달
|
||||||
)
|
)
|
||||||
if (!hasCode) {
|
|
||||||
syncAndExecute(realOrderNo)
|
syncAndExecute(realOrderNo)
|
||||||
}
|
}
|
||||||
// 💡 [개선 3] 감시 설정 로그에도 등급 정보 노출
|
// 💡 [개선 3] 감시 설정 로그에도 등급 정보 노출
|
||||||
@@ -994,6 +992,7 @@ object AutoTradingManager {
|
|||||||
currentBalance?.getHoldings()?.map {
|
currentBalance?.getHoldings()?.map {
|
||||||
if(
|
if(
|
||||||
it.quantity.toInt() > KisSession.tradeConfig.lowerAverageTargetCount &&
|
it.quantity.toInt() > KisSession.tradeConfig.lowerAverageTargetCount &&
|
||||||
|
it.profitRate.toDouble() < 0.0 &&
|
||||||
it.profitRate.toDouble() < (abs(KisSession.tradeConfig.lowerAverageMaxRate) * -1) &&
|
it.profitRate.toDouble() < (abs(KisSession.tradeConfig.lowerAverageMaxRate) * -1) &&
|
||||||
it.profitRate.toDouble() > (abs(KisSession.tradeConfig.lowerAverageMinRate) * -1))
|
it.profitRate.toDouble() > (abs(KisSession.tradeConfig.lowerAverageMinRate) * -1))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user