This commit is contained in:
2026-02-12 13:11:07 +09:00
parent 4bf055fa68
commit da4ab01d5f
8 changed files with 31 additions and 28 deletions
+7 -10
View File
@@ -21,6 +21,7 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import kotlinx.coroutines.launch
import model.MAX_BUDGET
import model.MIN_PURCHASE_SCORE
import model.buyWeight
import model.feesAndTaxRate
import model.minimumNetProfit
@@ -185,11 +186,12 @@ fun IntegratedOrderSection(
scope.launch {
val tickSize = MarketUtil.getTickSize(basePrice)
val oneTickLowerPrice = basePrice - (tickSize * when(investmentGrade) {
InvestmentGrade.LEVEL_5_STRONG_RECOMMEND -> 0
InvestmentGrade.LEVEL_4_BALANCED_RECOMMEND -> 1
InvestmentGrade.LEVEL_3_CAUTIOUS_RECOMMEND -> 1
InvestmentGrade.LEVEL_2_HIGH_RISK -> 2
InvestmentGrade.LEVEL_1_SPECULATIVE -> 3
InvestmentGrade.LEVEL_5_STRONG_RECOMMEND -> 1
InvestmentGrade.LEVEL_4_BALANCED_RECOMMEND -> 2
InvestmentGrade.LEVEL_3_CAUTIOUS_RECOMMEND -> 3
InvestmentGrade.LEVEL_2_HIGH_RISK -> 3
InvestmentGrade.LEVEL_1_SPECULATIVE -> 4
else -> 4
})
// 2. 주문 가격 설정 (직접 입력값이 없으면 한 틱 낮은 가격 사용)
@@ -257,15 +259,10 @@ fun IntegratedOrderSection(
"safe" to 0.4 // 중장기 점수 비중 강화
)
// 2. 토탈 스코어 계산
val totalScore =
(completeTradingDecision.shortPossible() * weights["short"]!!) +
(completeTradingDecision.profitPossible() * weights["profit"]!!) +
(completeTradingDecision.safePossible() * weights["safe"]!!)
// 3. 매수 결정 문턱값 (예: 70점 이상이면 매수 가능)
val MIN_PURCHASE_SCORE = 68.0
val HIGH_QUALITY_SCORE = 85.0 // 강력 추천 기준
println("""
corpName : ${completeTradingDecision.corpName}
confidence : ${completeTradingDecision.confidence + append}