All accounts in the same batch trade the same resolved direction.
Each new batch (after positions are flat) picks a fresh random direction.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Privacy button: masks account names beyond the first 5 chars with bullets;
eye/eye-off icon toggles the mode in the header toolbar
- computeDailyTarget: accepts minDayPnL + minTradingDays params; when a
positive min floor is set and mandatory days remain, reserves future-day
profit so each day hits the floor (cap = remaining - futureReserve, floor
= minDayPnL); returns effectiveMinDay directly once profit target is met
but days are not yet satisfied
- auto-trade: passes minDayPnL/minTradingDays to computeDailyTarget; for
zero-floor accounts that have met the profit target but still owe trading
days, trades 1 MNQ in-and-out at market (extra-day mode) and bypasses the
normal target=0 skip gate via isMnqExtraDay flag
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Auto-trade scheduler fires every 60s; uses Promise.allSettled batch so no new trades fire while any position from the current batch is open
- Commission gross-up: read entryCommission from cash.realizedPnL after fill (fallback 2.5×contracts), grossTarget = target + 2×entryCommission
- Sync gate: TradovateClient.syncComplete flag; scheduler skips tick until every client finishes initial position/balance sync
- Contracts formula changed to Math.ceil so $1500 target = 2 contracts
- Removed all fee caching (perContractFees, recentFills, fillFee handler) from tradovate-class.ts
- Removed firm_fees table, getFirmFees, upsertFirmFee from db.ts
- Deleted instrument-configs API routes; removed Fees UI from firm settings page
- /api/instruments returns full {symbol, enabled}[] objects; dashboard filters to enabled-only for trade selector
- Added auto-trade, debug, orders, settings, and trade API routes
- Instrument selector on dashboard now driven by enabled instruments from DB
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- SQLite DB (better-sqlite3) with firms, account_configs, firm_fees, instruments tables
- REST API routes: firms CRUD, account configs CRUD, state, accounts, instruments
- Live Tradovate WebSocket client: login, sync, positions, auto-liq thresholds
- Dashboard (app/page.tsx): per-firm account list with balance, day P&L, days traded,
target progress, and Dead/Inactive/Flat status based on Tradovate auto-liq floors
- Account detail page: objectives progress, daily P&L chart, consistency tracking
- Per-firm settings page: account configs and instrument fee management
- Dead detection uses trailingMaxDrawdownLimit - trailingMaxDrawdown from
userAccountAutoLiqs; filters Tradovate sentinel value (999999999 = no limit)
- FIFO P&L engine with commission accounting for daily P&L history
- Removed manual maxLoss fallback in favour of live Tradovate auto-liq data
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>