You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the window fills, a value is added in one compensated step, as TradingView does. The previous fused evict-and-add step could store an entry one ulp off, and every later eviction carried the error. Volume-scaled and ratio sources (close * volume, (high - low) / close) hit this constantly; ta.sma and everything built on math.sum inherit the fix.
A growing length admits the raw values newest first and evicts with each bar's original stored entry. Verified bit-exact against TradingView on 131 isolated grows.
A length that changes on consecutive bars walks the same steps as an isolated change instead of being re-baselined to a plain linear sum. Verified bit-exact on sawtooth, ramp, alternating and pseudo-random lengths over six sources.
Strategy
calc_on_order_fills re-runs the script after every fill, like TradingView: a pass walks only the path legs after the node it stands at and stops at the first leg that fills. Gap tests use the node price of the pass, and sticky exit legs bound to different pyramid adds no longer evict each other. Covered by a new TradingView-verified test (270 trades).
strategy.entry / strategy.order re-issued with a quantity that floors to zero lots now cancel the pending order of the same id instead of leaving it resting.
strategy.exit with every price level na keeps a dormant leg that holds its slice of the entry until a later call re-arms it (a live broker position keeps the previous behavior).
request.security
request.security_lower_tf() at the chart's own symbol and timeframe returns a one-element array instead of the bare value, so array calls on the result work.
The security protocol injected into a script module is released when the run ends. It held OS semaphores, so a process running many scripts could exhaust the system semaphore limit.
CLI and data
pyne run --from/--to: a date without a UTC offset is read as UTC, as documented (it was read in the host's local time zone in file mode). Help texts of --to, the output paths and --recreate-provider-config corrected.
pyne data convert-from and DataConverter.convert_to_ohlcv() work on Python 3.11 again.
Broker
The sync engine no longer halts a cancel-tentative bracket while broker reads are down; it keeps probing and needs a fresh ambiguous answer after reads recover.
Performance
math.sum state lives in one self-restoring object with a compiled Cython twin (pynecore.core._native_rolling_sum, shipped in the platform wheels; PYNE_NO_NATIVE_MATH=1 keeps the pure-Python code). A loop call site restores it in O(1) instead of copying the value window on every iteration. A script with 4000 in-loop math.sum calls per bar went from 1269 s to 41 s over 29.7k bars. Results are unchanged.
Transforming request.security scripts is much faster: a second transform in the same process no longer takes over 100 s and gigabytes of memory, and the security instantiation pass indexes each region once.
Numeric divisions inside functions are inlined and test the quotient once; an inlined math.pow no longer calls isinstance, and the na test of for loop counters folds away. Results are unchanged.
Packaging
The capitalcom extra is removed and httpx / pycryptodome are dropped from the providers and all extras; the core does not use them.
Documentation
README rewritten around the measured TradingView results of Pyne in the Wild, with getting-started, CLI, guide, versioning and ecosystem pages brought up to date.