Commit 23b2f5d
v3.5.6: Critical Event System and Bracket Order Fixes
## Multi-Instrument Event System Fixes
- Implemented event forwarding from instrument EventBuses to suite EventBus
- Added event methods (on, once, off, wait_for) to InstrumentContext
- Fixed event propagation for multi-instrument support
- Resolved mnq_context.wait_for(EventType.NEW_BAR) functionality
## Bracket Order Enhancements
- Changed from price validation failure to automatic alignment
- Orders with misaligned prices now auto-correct to tick size
- Improved user experience with transparent price handling
## Example Scripts Updates
- Fixed all 4 advanced trading examples
- Corrected OrderBook API method usage
- Fixed real-time data streaming bar access
- Updated TypedDict field access patterns
## Test Suite Improvements
- Fixed 30 failing tests to match correct behavior
- Updated event system tests for forwarding verification
- Modified price alignment tests for auto-correction
- Added event_bus parameter to InstrumentContext tests
## Documentation
- Updated README.md with v3.5.6 features
- Added comprehensive CHANGELOG entry
- Updated example documentation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent ba6ae6a commit 23b2f5d
File tree
11 files changed
+949
-497
lines changed- docs/examples
- examples/advanced_trading
- src/project_x_py/order_manager
- tests
- order_manager
- trading_suite
11 files changed
+949
-497
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
17 | 51 | | |
18 | 52 | | |
19 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments