-
-
Notifications
You must be signed in to change notification settings - Fork 11
fix: Tick price alignment in real-time data manager (v3.1.9) #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add tick size storage when initializing instrument - Apply align_price_to_tick when creating new bars - Apply alignment when updating existing bars - Apply alignment to empty bars created during low-volume periods - Ensures all OHLC prices respect instrument tick size (e.g., 0.25 for NQ) This fixes the issue where bar prices like $23,927.62 and $23,927.88 were not aligned to the 0.25 tick size for NQ futures.
- Apply tick alignment when getting price from tick data - Bar close prices are already aligned from previous fix - Ensures get_current_price() always returns tick-aligned values This fixes the issue where current price could be misaligned (e.g., $23,927.62) when sourced from raw tick data.
- Update README.md version to v3.1.9 - Add CHANGELOG.md entry for tick price alignment fixes - Update CLAUDE.md with recent changes - Document ProjectX volume data limitations
|
Claude finished @TexasCoding's task —— View job Pull Request ReviewReviewing PR #42: fix: Tick price alignment in real-time data manager (v3.1.9) Todo Checklist:
Overall Assessment: ✅ APPROVED WITH MINOR SUGGESTIONSThis is a high-quality fix that properly addresses tick price alignment issues in the real-time data manager. The implementation is consistent, well-documented, and follows existing patterns. 🎯 Strengths✅ Proper Implementation
✅ Code Quality
✅ Performance Considerations
✅ Documentation
🔍 Detailed AnalysisTick Price Alignment Logic ✅# core.py:541 - Proper initialization
self.tick_size = getattr(instrument_info, "tickSize", 0.25)
# data_processing.py:368 - Consistent application
aligned_price = align_price_to_tick(price, self.tick_size)
# data_access.py:240-244 - Current price alignment
raw_price = float(self.current_tick_data[-1]["price"])
return align_price_to_tick(raw_price, self.tick_size)Analysis: The implementation correctly uses Test Coverage
|
Summary
Changes
🔧 Bug Fixes
get_current_price()returns tick-aligned values📚 Documentation
Technical Details
The real-time data manager now:
align_price_to_tick()when creating/updating barsget_current_price()when sourced from raw tick dataTesting
Notes
Closes #42
🤖 Generated with Claude Code