PyneCore v6.3.2
What's Changed
Features
- Add timenow() function: Implemented Pine Script
timenow()function that returns current UTC time in milliseconds since Unix epoch, with @module_property decorator for Pine Script compatibility
Bug Fixes
- Fix strategy order ID collision: Resolved critical bug where entry and exit orders with the same ID would overwrite each other. Now uses prefix-based storage ("entry_" and "exit_" prefixes) to maintain Pine Script compatibility while preventing collisions
Refactoring
- Improve function isolation performance: Replaced global
_call_countersdictionary with local counter variables using unicode separators, eliminating global state and improving thread safety
Testing
- Test improvements: Moved and updated persistent annotation assignment tests, fixed matrix test section
Technical Details
The order ID collision fix is particularly important for strategy execution. Previously, if you had:
strategy.entry("order1", ...)
strategy.exit("order1", ...) The exit order would overwrite the entry order. Now they're stored separately with prefixes, maintaining full Pine Script compatibility.
The function isolation refactoring removes global state, making the code cleaner and more performant. Counter variables are now local to each function with collision-safe naming using unicode middle dot separators.
Full Changelog: v6.3.1...v6.3.2