══════════════════════════════════════════════ LittleDrops — Multi-Account Setup Guide xtraders.co.uk/glean ══════════════════════════════════════════════ WHAT'S NEW IN THIS VERSION ───────────────────────────── • Supports up to 12 (or more) MT5 accounts under one login • Each account has its OWN independent consensus vote — both users can allow trading on Account A while blocking Account B • New "Accounts" overview page shows every account at a glance • Accounts are auto-registered the first time that account's EA sends a heartbeat — no manual setup needed per account STEP 1 — Create the database ───────────────────────────── 1. cPanel → MySQL Databases → create a new database + user 2. Grant the user ALL PRIVILEGES on that database 3. phpMyAdmin → select the database → SQL tab 4. Paste the entire contents of db/schema.sql → Go This creates: users, accounts, account_votes, positions, commands Default login credentials (change these): user1 / littledrops1 user2 / littledrops2 STEP 2 — Configure the server ─────────────────────────────── Open api/config.php and fill in: DB_HOST, DB_NAME, DB_USER, DB_PASS — your database details API_KEY — any long random string (must match every EA's ApiKey input) STEP 3 — Upload to your hosting ───────────────────────────────── Upload everything EXCEPT the ea/ folder to: public_html/glean/ Folder structure on the server: public_html/glean/ login.php accounts.php <- new overview page, now the post-login landing page dashboard.php <- per-account detail view (?account_id=N) logout.php api/ config.php heartbeat.php commands.php action.php assets/ style.css dashboard.js STEP 4 — Test the web side ─────────────────────────── Visit https://xtraders.co.uk/glean/login.php, log in. You'll land on the Accounts page — empty until Step 5. STEP 5 — Configure TradeGate.mq5 on EACH account ─────────────────────────────────────────────────── Repeat this for every MT5 account you want to connect: 1. Compile ea/TradeGate.mq5 in MetaEditor 2. In that terminal: Tools → Options → Expert Advisors ✅ Allow WebRequest for listed URL → add: https://xtraders.co.uk 3. Attach TradeGate to any chart on that account 4. Set inputs: ServerURL = https://xtraders.co.uk/glean/api/ ApiKey = [same value as api/config.php on ALL accounts] FirmName = [whatever you want shown for that account] TradeSymbol1/2/3 = your preferred instruments for the panel buttons That account will appear automatically on the Accounts page within a few seconds of the EA's first heartbeat — using its real MT5 account number as the unique identifier. No further server-side setup is needed per account. STEP 6 — Per-account consensus ───────────────────────────────── Click into any account from the Accounts page. The "My Vote" section there applies ONLY to that specific account. You can have: Account A: both users Allow → trading permitted Account B: one user Block → trading blocked, unauthorised positions auto-closed by that account's own TradeGate instance ══════════════════════════════════════════════ SECURITY NOTES ══════════════════════════════════════════════ • Change both default passwords immediately after first login • Change API_KEY in config.php — must match on every account's EA • Every account's EA independently enforces its OWN consensus — a compromised or misbehaving EA on one account cannot affect another account's trading state