Commit Graph

2 Commits

Author SHA1 Message Date
rob 205305fe0e Fix math blocks and add backtest cancellation
- Fix all math block handlers (floor, ceil, min, max, round, sqrt, abs,
  power, modulo, log, ln, trig, mean, median, std_dev, random, clamp,
  factorial) to check inside 'inputs' wrapper for parameters
- Add math, random, statistics modules to strategy execution context
- Add backtest cancellation feature with cancel button in UI
- Fix balances_generators.js to unwrap dynamic_value structures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-16 05:04:03 -03:00
rob 639043b261 Live trading infrastructure functional on testnet
Key fixes:
- ExchangeInterface: Remove stale entries before creating new exchange connections
- LiveBroker: Optimize get_total_equity() to price only top 10 assets (was hanging on 462 testnet assets)
- LiveBroker: Add fiat currency skip list to avoid failed price lookups
- PythonGenerator: Fix market symbol regex to handle 2-5 char symbols (BTC/USDT)

New features:
- LiveStrategyInstance: Full live trading strategy execution
- Circuit breaker and position limits for live trading safety
- Restart-safe order reconciliation via client order IDs

Verified working:
- Live strategy starts on Binance testnet
- Orders placed and filled successfully
- Execution loop runs with active strategies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-01 15:23:34 -04:00