Skip to content

PyneCore v6.3.1

Choose a tag to compare

@wallneradam wallneradam released this 15 Aug 13:19
· 25 commits to main since this release

What's Changed

πŸ› Bug Fixes

Strategy System

  • Fixed critical order leak in position direction changes: Resolved a bug where orders were not properly deleted from the orders dictionary when a position was fully closed during a direction change
  • Fixed unnecessary position split: Added condition to prevent unnecessary splitting when closing to zero position

Provider System

  • Improved CCXT ticker extraction robustness: Enhanced ticker extraction logic for better market details handling
  • Fixed symbol casing in output paths: Ensured symbols are properly uppercased in provider output paths

✨ New Features

Trailing Stop Implementation

  • Complete trailing stop functionality: Added full support for trailing stop orders with trail_price and trail_offset parameters
  • Dynamic stop price updates: Trailing stops now automatically adjust based on high/low price movements
  • Enhanced Order class: Added trail_price, trail_offset, and trail_triggered attributes
  • Exit function improvements: Updated exit() function to support trailing stop parameters
  • Close price execution: Added _check_close() method for trailing stop execution at close price

Logging Enhancements

  • Pine Script timezone support: Added custom PineRichHandler that formats log timestamps using syminfo.timezone
  • Improved time handling: Modified PineLogFormatter to use Pine Script time when available, with fallback to UTC or system time
  • Better log formatting: Replaced default RichHandler with custom PineRichHandler for improved time display

πŸš€ Improvements

CLI Enhancements

  • Added 120-minute interval support: Extended TimeframeEnum to include 120-minute intervals for data commands

Code Quality

  • Improved price rounding logic: Avoided unnecessary rounding when prices are already at tick level
  • Better None comparison: Updated check methods to use is None instead of falsy checks for proper None comparison
  • Enhanced trailing stop checks: Added trailing stop support in both high and low price checks for long and short positions

Technical Details

The main changes focus on fixing critical order management issues and implementing comprehensive trailing stop functionality. The order leak fix prevents memory issues and incorrect order state during position direction changes. The new trailing stop feature provides advanced order management capabilities matching Pine Script v6 functionality.

Full Changelog

  • febd4f1: fix: resolve order leak in position direction change and implement trailing stop
  • e2a5dcf: feat(log): add custom time handling with Pine Script timezone
  • 0cb4085: fix(ccxt): improve ticker extraction for market details robustness