diff --git a/src/bot/strategy.rs b/src/bot/strategy.rs index 7e50e5a..fac9b46 100644 --- a/src/bot/strategy.rs +++ b/src/bot/strategy.rs @@ -62,7 +62,8 @@ impl RedCandleStrategy { symbol, buy_order.price, filters.format_qty(buy_order.quantity), buy_order.order_id ); - let sell_price = buy_order.price * (1.0 + profit_percent / 100.0); + // +0.2: alış (%0.1) + satış (%0.1) komisyonları dahil, net kar = profit_percent + let sell_price = buy_order.price * (1.0 + (profit_percent + 0.2) / 100.0); let sell_price_str = filters.format_price(sell_price); let sell_quantity = filters.format_qty(buy_order.quantity); diff --git a/src/web/bot.html b/src/web/bot.html index ab3b182..c468540 100644 --- a/src/web/bot.html +++ b/src/web/bot.html @@ -628,9 +628,8 @@ function renderOpenTable() { const buyCommissionPct = p.buy_commission_usdt > 0 ? (p.buy_commission_usdt / (p.buy_price * p.quantity) * 100) : 0.1; - // satış komisyonu tahmini: aynı oran üzerinden (currentPrice × quantity için) - const sellCommissionPct = buyCommissionPct; - pnl = grossPnl - buyCommissionPct - sellCommissionPct; + // satış komisyonu: sabit %0.1 (BNB olmasa da güvende olalım) + pnl = grossPnl - buyCommissionPct - 0.1; } const pnlHtml = pnl !== null ? `${pnl >= 0 ? '+' : ''}${pnl.toFixed(2)}%`