|
@@ -2710,23 +2710,36 @@ Will trigger when {token} price moves {alarm['direction']} ${target_price:,.2f}
|
|
|
|
|
|
total_pnl = 0
|
|
|
total_trades = 0
|
|
|
+ trading_days = 0
|
|
|
|
|
|
for day_stats in daily_stats:
|
|
|
- pnl_emoji = "🟢" if day_stats['pnl'] >= 0 else "🔴"
|
|
|
-
|
|
|
- daily_text += f"📊 <b>{day_stats['date_formatted']}</b>\n"
|
|
|
- daily_text += f" {pnl_emoji} P&L: ${day_stats['pnl']:,.2f} ({day_stats['pnl_pct']:+.1f}%)\n"
|
|
|
- daily_text += f" 🔄 Trades: {day_stats['trades']}\n\n"
|
|
|
-
|
|
|
- total_pnl += day_stats['pnl']
|
|
|
- total_trades += day_stats['trades']
|
|
|
+ if day_stats['has_trades']:
|
|
|
+ # Day with completed trades
|
|
|
+ pnl_emoji = "🟢" if day_stats['pnl'] >= 0 else "🔴"
|
|
|
+ daily_text += f"📊 <b>{day_stats['date_formatted']}</b>\n"
|
|
|
+ daily_text += f" {pnl_emoji} P&L: ${day_stats['pnl']:,.2f} ({day_stats['pnl_pct']:+.1f}%)\n"
|
|
|
+ daily_text += f" 🔄 Trades: {day_stats['trades']}\n\n"
|
|
|
+
|
|
|
+ total_pnl += day_stats['pnl']
|
|
|
+ total_trades += day_stats['trades']
|
|
|
+ trading_days += 1
|
|
|
+ else:
|
|
|
+ # Day with no trades
|
|
|
+ daily_text += f"📊 <b>{day_stats['date_formatted']}</b>\n"
|
|
|
+ daily_text += f" 📭 No completed trades\n\n"
|
|
|
|
|
|
# Add summary
|
|
|
- total_pnl_emoji = "🟢" if total_pnl >= 0 else "🔴"
|
|
|
- daily_text += f"💼 <b>10-Day Summary:</b>\n"
|
|
|
- daily_text += f" {total_pnl_emoji} Total P&L: ${total_pnl:,.2f}\n"
|
|
|
- daily_text += f" 🔄 Total Trades: {total_trades}\n"
|
|
|
- daily_text += f" 📊 Avg per Day: ${total_pnl/len(daily_stats):,.2f}"
|
|
|
+ if trading_days > 0:
|
|
|
+ total_pnl_emoji = "🟢" if total_pnl >= 0 else "🔴"
|
|
|
+ daily_text += f"💼 <b>10-Day Summary:</b>\n"
|
|
|
+ daily_text += f" {total_pnl_emoji} Total P&L: ${total_pnl:,.2f}\n"
|
|
|
+ daily_text += f" 🔄 Total Trades: {total_trades}\n"
|
|
|
+ daily_text += f" 📈 Trading Days: {trading_days}/10\n"
|
|
|
+ daily_text += f" 📊 Avg per Trading Day: ${total_pnl/trading_days:,.2f}"
|
|
|
+ else:
|
|
|
+ daily_text += f"💼 <b>10-Day Summary:</b>\n"
|
|
|
+ daily_text += f" 📭 No completed trades in the last 10 days\n"
|
|
|
+ daily_text += f" 💡 Start trading to see daily performance!"
|
|
|
|
|
|
await update.message.reply_text(daily_text.strip(), parse_mode='HTML')
|
|
|
|
|
@@ -2758,23 +2771,36 @@ Will trigger when {token} price moves {alarm['direction']} ${target_price:,.2f}
|
|
|
|
|
|
total_pnl = 0
|
|
|
total_trades = 0
|
|
|
+ trading_weeks = 0
|
|
|
|
|
|
for week_stats in weekly_stats:
|
|
|
- pnl_emoji = "🟢" if week_stats['pnl'] >= 0 else "🔴"
|
|
|
-
|
|
|
- weekly_text += f"📈 <b>{week_stats['week_formatted']}</b>\n"
|
|
|
- weekly_text += f" {pnl_emoji} P&L: ${week_stats['pnl']:,.2f} ({week_stats['pnl_pct']:+.1f}%)\n"
|
|
|
- weekly_text += f" 🔄 Trades: {week_stats['trades']}\n\n"
|
|
|
-
|
|
|
- total_pnl += week_stats['pnl']
|
|
|
- total_trades += week_stats['trades']
|
|
|
+ if week_stats['has_trades']:
|
|
|
+ # Week with completed trades
|
|
|
+ pnl_emoji = "🟢" if week_stats['pnl'] >= 0 else "🔴"
|
|
|
+ weekly_text += f"📈 <b>{week_stats['week_formatted']}</b>\n"
|
|
|
+ weekly_text += f" {pnl_emoji} P&L: ${week_stats['pnl']:,.2f} ({week_stats['pnl_pct']:+.1f}%)\n"
|
|
|
+ weekly_text += f" 🔄 Trades: {week_stats['trades']}\n\n"
|
|
|
+
|
|
|
+ total_pnl += week_stats['pnl']
|
|
|
+ total_trades += week_stats['trades']
|
|
|
+ trading_weeks += 1
|
|
|
+ else:
|
|
|
+ # Week with no trades
|
|
|
+ weekly_text += f"📈 <b>{week_stats['week_formatted']}</b>\n"
|
|
|
+ weekly_text += f" 📭 No completed trades\n\n"
|
|
|
|
|
|
# Add summary
|
|
|
- total_pnl_emoji = "🟢" if total_pnl >= 0 else "🔴"
|
|
|
- weekly_text += f"💼 <b>10-Week Summary:</b>\n"
|
|
|
- weekly_text += f" {total_pnl_emoji} Total P&L: ${total_pnl:,.2f}\n"
|
|
|
- weekly_text += f" 🔄 Total Trades: {total_trades}\n"
|
|
|
- weekly_text += f" 📊 Avg per Week: ${total_pnl/len(weekly_stats):,.2f}"
|
|
|
+ if trading_weeks > 0:
|
|
|
+ total_pnl_emoji = "🟢" if total_pnl >= 0 else "🔴"
|
|
|
+ weekly_text += f"💼 <b>10-Week Summary:</b>\n"
|
|
|
+ weekly_text += f" {total_pnl_emoji} Total P&L: ${total_pnl:,.2f}\n"
|
|
|
+ weekly_text += f" 🔄 Total Trades: {total_trades}\n"
|
|
|
+ weekly_text += f" 📈 Trading Weeks: {trading_weeks}/10\n"
|
|
|
+ weekly_text += f" 📊 Avg per Trading Week: ${total_pnl/trading_weeks:,.2f}"
|
|
|
+ else:
|
|
|
+ weekly_text += f"💼 <b>10-Week Summary:</b>\n"
|
|
|
+ weekly_text += f" 📭 No completed trades in the last 10 weeks\n"
|
|
|
+ weekly_text += f" 💡 Start trading to see weekly performance!"
|
|
|
|
|
|
await update.message.reply_text(weekly_text.strip(), parse_mode='HTML')
|
|
|
|
|
@@ -2806,23 +2832,36 @@ Will trigger when {token} price moves {alarm['direction']} ${target_price:,.2f}
|
|
|
|
|
|
total_pnl = 0
|
|
|
total_trades = 0
|
|
|
+ trading_months = 0
|
|
|
|
|
|
for month_stats in monthly_stats:
|
|
|
- pnl_emoji = "🟢" if month_stats['pnl'] >= 0 else "🔴"
|
|
|
-
|
|
|
- monthly_text += f"📅 <b>{month_stats['month_formatted']}</b>\n"
|
|
|
- monthly_text += f" {pnl_emoji} P&L: ${month_stats['pnl']:,.2f} ({month_stats['pnl_pct']:+.1f}%)\n"
|
|
|
- monthly_text += f" 🔄 Trades: {month_stats['trades']}\n\n"
|
|
|
-
|
|
|
- total_pnl += month_stats['pnl']
|
|
|
- total_trades += month_stats['trades']
|
|
|
+ if month_stats['has_trades']:
|
|
|
+ # Month with completed trades
|
|
|
+ pnl_emoji = "🟢" if month_stats['pnl'] >= 0 else "🔴"
|
|
|
+ monthly_text += f"📅 <b>{month_stats['month_formatted']}</b>\n"
|
|
|
+ monthly_text += f" {pnl_emoji} P&L: ${month_stats['pnl']:,.2f} ({month_stats['pnl_pct']:+.1f}%)\n"
|
|
|
+ monthly_text += f" 🔄 Trades: {month_stats['trades']}\n\n"
|
|
|
+
|
|
|
+ total_pnl += month_stats['pnl']
|
|
|
+ total_trades += month_stats['trades']
|
|
|
+ trading_months += 1
|
|
|
+ else:
|
|
|
+ # Month with no trades
|
|
|
+ monthly_text += f"📅 <b>{month_stats['month_formatted']}</b>\n"
|
|
|
+ monthly_text += f" 📭 No completed trades\n\n"
|
|
|
|
|
|
# Add summary
|
|
|
- total_pnl_emoji = "🟢" if total_pnl >= 0 else "🔴"
|
|
|
- monthly_text += f"💼 <b>10-Month Summary:</b>\n"
|
|
|
- monthly_text += f" {total_pnl_emoji} Total P&L: ${total_pnl:,.2f}\n"
|
|
|
- monthly_text += f" 🔄 Total Trades: {total_trades}\n"
|
|
|
- monthly_text += f" 📊 Avg per Month: ${total_pnl/len(monthly_stats):,.2f}"
|
|
|
+ if trading_months > 0:
|
|
|
+ total_pnl_emoji = "🟢" if total_pnl >= 0 else "🔴"
|
|
|
+ monthly_text += f"💼 <b>10-Month Summary:</b>\n"
|
|
|
+ monthly_text += f" {total_pnl_emoji} Total P&L: ${total_pnl:,.2f}\n"
|
|
|
+ monthly_text += f" 🔄 Total Trades: {total_trades}\n"
|
|
|
+ monthly_text += f" 📈 Trading Months: {trading_months}/10\n"
|
|
|
+ monthly_text += f" 📊 Avg per Trading Month: ${total_pnl/trading_months:,.2f}"
|
|
|
+ else:
|
|
|
+ monthly_text += f"💼 <b>10-Month Summary:</b>\n"
|
|
|
+ monthly_text += f" 📭 No completed trades in the last 10 months\n"
|
|
|
+ monthly_text += f" 💡 Start trading to see monthly performance!"
|
|
|
|
|
|
await update.message.reply_text(monthly_text.strip(), parse_mode='HTML')
|
|
|
|