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 51ec74175d Phase 4: Paper trading implementation
- Create PaperStrategyInstance extending StrategyInstance
- Integrate PaperBroker for simulated order execution
- Add trade_order() method translating Blockly calls to broker
- Add mode selection in Strategies.create_strategy_instance()
- Update execute_strategy() to support paper/backtest/live modes
- Include comprehensive tests for paper trading functionality

Paper trading now works with:
- Market and limit orders
- Position tracking with P&L
- Balance management
- Trade history
- Reset functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 17:07:34 -04:00