A high-fidelity Bitcoin paper-trading simulator. Real-time Binance data, EMA-cross strategy engine, and a Supabase-backed $1,000 virtual wallet — with zero financial risk.
How the EMA-cross signal works, stop loss / take profit logic, and how to backtest against up to 5 years of historical data.
→All five Cloudflare Pages Function endpoints — status, history, settings, execute-trade, and backtest — with request and response shapes.
→Position sizing (95% of balance as margin), leveraged PnL formula, and how stop loss and take profit are enforced intra-candle.
→Supabase PostgreSQL tables: wallet (single-row balance), positions (every trade), and bot_settings (JSONB strategy config).
→How the three layers talk to each other.