Cryptocurrency trading platform with Blockly-based strategy builder
Go to file
rob 5866319b5e Fix critical Phase 4 issues: wire SL/TP to broker, reconcile trades, fix schema
High priority fixes:
- Wire time_in_force, stop_loss, take_profit to broker.place_order()
  * Pass time_in_force from received_new_trade() to new_trade()
  * Pass SL/TP/TIF from new_trade() to broker.place_order()

- Reconcile Trade ledger when SL/TP triggers
  * Find all matching paper trades for symbol
  * Settle trades at trigger price
  * Move from active_trades to settled_trades
  * Save to database

- Fix fresh schema missing SL/TP columns
  * Add stop_loss and take_profit to CREATE TABLE statement
  * Ensures first-run trade persistence works

Medium priority fixes:
- Hide SL/TP fields for SELL orders (inventory-only model)
  * SL/TP only makes sense for BUY (opening positions)
  * SELL closes existing positions, no SL/TP needed
  * Added _updateSltpVisibility() method
  * Side change listener shows/hides SL/TP row
  * Removed SELL-side SL/TP validation

Tests:
- Added 2 integration tests for manual trading SL/TP path
- 353 tests pass (4 pre-existing failures unrelated)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-11 19:49:39 -03:00
.github/workflows Implement execution loop, paper persistence, and CI pipeline 2026-02-28 19:48:50 -04:00
UML
__pycache__
archived_code
config
markdown The test seem to run without errors but are still process blocking. 2024-11-15 18:08:32 -04:00
src Fix critical Phase 4 issues: wire SL/TP to broker, reconcile trades, fix schema 2026-03-11 19:49:39 -03:00
tests Fix critical Phase 4 issues: wire SL/TP to broker, reconcile trades, fix schema 2026-03-11 19:49:39 -03:00
.claudeignore Fix chart loading and stabilize local runtime 2026-02-28 15:15:56 -04:00
.gitignore Add chart analysis feature with candlestick pattern detection 2026-03-11 15:26:49 -03:00
AGENTS.md Add chart analysis feature with candlestick pattern detection 2026-03-11 15:26:49 -03:00
CLAUDE.md Document ExternalSources and ExternalIndicators modules 2026-03-09 21:35:33 -03:00
FORMATIONS_PLAN.md Address second round of Codex review feedback on formations plan 2026-03-10 16:03:33 -03:00
pytest.ini Add Bitcoin wallet system with configurable strategy fees 2026-03-09 12:45:25 -03:00
requirements.txt Add external data sources and indicators for backtesting 2026-03-09 21:25:36 -03:00
test_live_manual.py Live trading infrastructure functional on testnet 2026-03-01 15:23:34 -04:00