#!/bin/bash # create-live-report.sh - Create HTML report from live MT5 data (screenshot/terminal) # Usage: ./create-live-report.sh [profit_amount] [balance] [trades] SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Colors GREEN='\033[0;32m' BLUE='\033[0;34m' YELLOW='\033[1;33m' NC='\033[0m' echo -e "${BLUE}=== Create Live Trading Report ===${NC}" echo "" # Get current data from screenshot or user input if [ -z "$1" ]; then echo "Enter current trading data from your MT5 terminal:" echo "" read -p "Current Profit (e.g., 6935.12): " PROFIT read -p "Current Balance (e.g., 106935.12): " BALANCE read -p "Total Trades (e.g., 45): " TRADES read -p "Account Number (default: 104125640): " ACCOUNT ACCOUNT=${ACCOUNT:-104125640} else PROFIT=$1 BALANCE=${2:-$((100000 + PROFIT))} TRADES=${3:-45} ACCOUNT=${4:-104125640} fi # Validate if [ -z "$PROFIT" ] || [ -z "$BALANCE" ]; then echo "❌ Error: Profit and Balance are required" exit 1 fi # Create Python script to generate report python3 << EOFPY import os from datetime import datetime profit = float("${PROFIT}") balance = float("${BALANCE}") trades = int("${TRADES}") account = "${ACCOUNT}" starting = 100000.00 return_pct = (profit / starting) * 100 html_content = f'''
Account {account} | Generated: {datetime.now().strftime('%Y-%m-%d %H:%M')}