|
@@ -904,8 +904,8 @@ class InfoCommands:
|
|
|
|
|
|
if not daily_stats:
|
|
if not daily_stats:
|
|
await context.bot.send_message(chat_id=chat_id, text=
|
|
await context.bot.send_message(chat_id=chat_id, text=
|
|
- "📅 <b>Daily Performance</b>\\n"
|
|
|
|
- "📭 No daily performance data available yet.\\n"
|
|
|
|
|
|
+ "📅 <b>Daily Performance</b>\n"
|
|
|
|
+ "📭 No daily performance data available yet.\n"
|
|
"💡 Daily stats are calculated from completed trades. Start trading to see them!",
|
|
"💡 Daily stats are calculated from completed trades. Start trading to see them!",
|
|
parse_mode='HTML'
|
|
parse_mode='HTML'
|
|
)
|
|
)
|
|
@@ -930,7 +930,7 @@ class InfoCommands:
|
|
period_lines.append(f"📊 <b>{day_stats_item['date_formatted']}</b>: 📭 No trading activity")
|
|
period_lines.append(f"📊 <b>{day_stats_item['date_formatted']}</b>: 📭 No trading activity")
|
|
|
|
|
|
if period_lines: # Add collected period lines if any
|
|
if period_lines: # Add collected period lines if any
|
|
- daily_text_parts.append("\\n".join(period_lines))
|
|
|
|
|
|
+ daily_text_parts.append("\n".join(period_lines))
|
|
|
|
|
|
if trading_days_count > 0:
|
|
if trading_days_count > 0:
|
|
avg_daily_pnl = total_pnl_all_days / trading_days_count
|
|
avg_daily_pnl = total_pnl_all_days / trading_days_count
|
|
@@ -938,15 +938,15 @@ class InfoCommands:
|
|
total_pnl_all_days_str = formatter.format_price_with_symbol(total_pnl_all_days)
|
|
total_pnl_all_days_str = formatter.format_price_with_symbol(total_pnl_all_days)
|
|
avg_daily_pnl_str = formatter.format_price_with_symbol(avg_daily_pnl)
|
|
avg_daily_pnl_str = formatter.format_price_with_symbol(avg_daily_pnl)
|
|
|
|
|
|
- daily_text_parts.append(f"\\n\\n📈 <b>Period Summary:</b>")
|
|
|
|
|
|
+ daily_text_parts.append(f"\n\n📈 <b>Period Summary:</b>")
|
|
daily_text_parts.append(f" Total P&L: {avg_pnl_emoji} {total_pnl_all_days_str} | Avg Daily: {avg_daily_pnl_str}")
|
|
daily_text_parts.append(f" Total P&L: {avg_pnl_emoji} {total_pnl_all_days_str} | Avg Daily: {avg_daily_pnl_str}")
|
|
daily_text_parts.append(f" Trading Days: {trading_days_count}/10 | Total Trades: {total_trades_all_days}")
|
|
daily_text_parts.append(f" Trading Days: {trading_days_count}/10 | Total Trades: {total_trades_all_days}")
|
|
else:
|
|
else:
|
|
if not period_lines: # If there were no stat items at all, the header is the only part
|
|
if not period_lines: # If there were no stat items at all, the header is the only part
|
|
daily_text_parts = [daily_text_parts[0]] # Keep only the title
|
|
daily_text_parts = [daily_text_parts[0]] # Keep only the title
|
|
- daily_text_parts.append("\\n\\n📉 No trading activity in the last 10 days.")
|
|
|
|
|
|
+ daily_text_parts.append("\n\n📉 No trading activity in the last 10 days.")
|
|
|
|
|
|
- await context.bot.send_message(chat_id=chat_id, text="\\n".join(daily_text_parts).strip(), parse_mode='HTML')
|
|
|
|
|
|
+ await context.bot.send_message(chat_id=chat_id, text="\n".join(daily_text_parts).strip(), parse_mode='HTML')
|
|
|
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
error_message = f"❌ Error processing daily command: {str(e)}"
|
|
error_message = f"❌ Error processing daily command: {str(e)}"
|
|
@@ -970,8 +970,8 @@ class InfoCommands:
|
|
|
|
|
|
if not weekly_stats_list:
|
|
if not weekly_stats_list:
|
|
await context.bot.send_message(chat_id=chat_id, text=
|
|
await context.bot.send_message(chat_id=chat_id, text=
|
|
- "📊 <b>Weekly Performance</b>\\n"
|
|
|
|
- "📭 No weekly performance data available yet.\\n"
|
|
|
|
|
|
+ "📊 <b>Weekly Performance</b>\n"
|
|
|
|
+ "📭 No weekly performance data available yet.\n"
|
|
"💡 Weekly stats are calculated from completed trades. Start trading to see them!",
|
|
"💡 Weekly stats are calculated from completed trades. Start trading to see them!",
|
|
parse_mode='HTML'
|
|
parse_mode='HTML'
|
|
)
|
|
)
|
|
@@ -996,7 +996,7 @@ class InfoCommands:
|
|
period_lines.append(f"📈 <b>{week_stats_item['week_formatted']}</b>: 📭 No trading activity")
|
|
period_lines.append(f"📈 <b>{week_stats_item['week_formatted']}</b>: 📭 No trading activity")
|
|
|
|
|
|
if period_lines:
|
|
if period_lines:
|
|
- weekly_text_parts.append("\\n".join(period_lines))
|
|
|
|
|
|
+ weekly_text_parts.append("\n".join(period_lines))
|
|
|
|
|
|
if trading_weeks_count > 0:
|
|
if trading_weeks_count > 0:
|
|
avg_weekly_pnl = total_pnl_all_weeks / trading_weeks_count
|
|
avg_weekly_pnl = total_pnl_all_weeks / trading_weeks_count
|
|
@@ -1004,15 +1004,15 @@ class InfoCommands:
|
|
total_pnl_all_weeks_str = formatter.format_price_with_symbol(total_pnl_all_weeks)
|
|
total_pnl_all_weeks_str = formatter.format_price_with_symbol(total_pnl_all_weeks)
|
|
avg_weekly_pnl_str = formatter.format_price_with_symbol(avg_weekly_pnl)
|
|
avg_weekly_pnl_str = formatter.format_price_with_symbol(avg_weekly_pnl)
|
|
|
|
|
|
- weekly_text_parts.append(f"\\n\\n📅 <b>Period Summary:</b>")
|
|
|
|
|
|
+ weekly_text_parts.append(f"\n\n📅 <b>Period Summary:</b>")
|
|
weekly_text_parts.append(f" Total P&L: {avg_pnl_emoji} {total_pnl_all_weeks_str} | Avg Weekly: {avg_weekly_pnl_str}")
|
|
weekly_text_parts.append(f" Total P&L: {avg_pnl_emoji} {total_pnl_all_weeks_str} | Avg Weekly: {avg_weekly_pnl_str}")
|
|
weekly_text_parts.append(f" Trading Weeks: {trading_weeks_count}/10 | Total Trades: {total_trades_all_weeks}")
|
|
weekly_text_parts.append(f" Trading Weeks: {trading_weeks_count}/10 | Total Trades: {total_trades_all_weeks}")
|
|
else:
|
|
else:
|
|
if not period_lines:
|
|
if not period_lines:
|
|
weekly_text_parts = [weekly_text_parts[0]]
|
|
weekly_text_parts = [weekly_text_parts[0]]
|
|
- weekly_text_parts.append("\\n\\n📉 No trading activity in the last 10 weeks.")
|
|
|
|
|
|
+ weekly_text_parts.append("\n\n📉 No trading activity in the last 10 weeks.")
|
|
|
|
|
|
- await context.bot.send_message(chat_id=chat_id, text="\\n".join(weekly_text_parts).strip(), parse_mode='HTML')
|
|
|
|
|
|
+ await context.bot.send_message(chat_id=chat_id, text="\n".join(weekly_text_parts).strip(), parse_mode='HTML')
|
|
|
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
error_message = f"❌ Error processing weekly command: {str(e)}"
|
|
error_message = f"❌ Error processing weekly command: {str(e)}"
|
|
@@ -1036,8 +1036,8 @@ class InfoCommands:
|
|
|
|
|
|
if not monthly_stats_list:
|
|
if not monthly_stats_list:
|
|
await context.bot.send_message(chat_id=chat_id, text=
|
|
await context.bot.send_message(chat_id=chat_id, text=
|
|
- "🗓️ <b>Monthly Performance</b>\\n"
|
|
|
|
- "📭 No monthly performance data available yet.\\n"
|
|
|
|
|
|
+ "🗓️ <b>Monthly Performance</b>\n"
|
|
|
|
+ "📭 No monthly performance data available yet.\n"
|
|
"💡 Monthly stats are calculated from completed trades. Start trading to see them!",
|
|
"💡 Monthly stats are calculated from completed trades. Start trading to see them!",
|
|
parse_mode='HTML'
|
|
parse_mode='HTML'
|
|
)
|
|
)
|
|
@@ -1062,7 +1062,7 @@ class InfoCommands:
|
|
period_lines.append(f"📅 <b>{month_stats_item['month_formatted']}</b>: 📭 No trading activity")
|
|
period_lines.append(f"📅 <b>{month_stats_item['month_formatted']}</b>: 📭 No trading activity")
|
|
|
|
|
|
if period_lines:
|
|
if period_lines:
|
|
- monthly_text_parts.append("\\n".join(period_lines))
|
|
|
|
|
|
+ monthly_text_parts.append("\n".join(period_lines))
|
|
|
|
|
|
if trading_months_count > 0:
|
|
if trading_months_count > 0:
|
|
avg_monthly_pnl = total_pnl_all_months / trading_months_count
|
|
avg_monthly_pnl = total_pnl_all_months / trading_months_count
|
|
@@ -1070,15 +1070,15 @@ class InfoCommands:
|
|
total_pnl_all_months_str = formatter.format_price_with_symbol(total_pnl_all_months)
|
|
total_pnl_all_months_str = formatter.format_price_with_symbol(total_pnl_all_months)
|
|
avg_monthly_pnl_str = formatter.format_price_with_symbol(avg_monthly_pnl)
|
|
avg_monthly_pnl_str = formatter.format_price_with_symbol(avg_monthly_pnl)
|
|
|
|
|
|
- monthly_text_parts.append(f"\\n\\n📈 <b>Period Summary:</b>")
|
|
|
|
|
|
+ monthly_text_parts.append(f"\n\n📈 <b>Period Summary:</b>")
|
|
monthly_text_parts.append(f" Total P&L: {avg_pnl_emoji} {total_pnl_all_months_str} | Avg Monthly: {avg_monthly_pnl_str}")
|
|
monthly_text_parts.append(f" Total P&L: {avg_pnl_emoji} {total_pnl_all_months_str} | Avg Monthly: {avg_monthly_pnl_str}")
|
|
monthly_text_parts.append(f" Trading Months: {trading_months_count}/12 | Total Trades: {total_trades_all_months}")
|
|
monthly_text_parts.append(f" Trading Months: {trading_months_count}/12 | Total Trades: {total_trades_all_months}")
|
|
else:
|
|
else:
|
|
if not period_lines:
|
|
if not period_lines:
|
|
monthly_text_parts = [monthly_text_parts[0]]
|
|
monthly_text_parts = [monthly_text_parts[0]]
|
|
- monthly_text_parts.append("\\n\\n📉 No trading activity in the last 12 months.")
|
|
|
|
|
|
+ monthly_text_parts.append("\n\n📉 No trading activity in the last 12 months.")
|
|
|
|
|
|
- await context.bot.send_message(chat_id=chat_id, text="\\n".join(monthly_text_parts).strip(), parse_mode='HTML')
|
|
|
|
|
|
+ await context.bot.send_message(chat_id=chat_id, text="\n".join(monthly_text_parts).strip(), parse_mode='HTML')
|
|
|
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
error_message = f"❌ Error processing monthly command: {str(e)}"
|
|
error_message = f"❌ Error processing monthly command: {str(e)}"
|