PyneCore v6.8.10 released — a strategy-engine release: how TradingView sizes, books and…
Fixes
strategy.risk.max_drawdownnow enforces against the realized (closed-equity) high-water mark and only on bars that book realized P&L — floating drawdown alone no longer halts trading- Exit orders settle against the entry they were bound to: one
strategy.exitleg per filled entry, own OCA reduce group, own entry fill price for tick offsets, pyramiding counted on the binding book - Quantities carried on TradingView’s 1e-8 unit grid and added in the long lot domain;
position_avg_priceandstrategy.netprofitare derived instead of accumulated - Default sizing quantizes its money budget to 10 significant digits (half-up) below 1e7 account currency, then truncates
- A
strategy.exitleg gapping through the same bar open as a reversing entry survives it and opens a position under its own exit id;strategy.cancel_all()now also cancels pending market orders - The intraday session mask admits a bar by its opening time (
open <= bar_open < close), not by overlap — a"1550-1555"session no longer fires on every 15:30 bar ticker.heikinashi(<local>)no longer raisesNameErrorat import, and a tuplerequest.security()outside an assignment no longer crashes the security childmath.powtakes TradingView’s exact shortcuts for exponents 2, 1, 0 and 0.5ta.crosskeeps its own unarmed three-state flag (it is notta.crossoverorta.crossunder);crossover/crossunderreverted to the classic exact rule- Broker: an expired cancel grace probes the venue before halting; a re-issued same-parameter
strategy.entrydispatches again, and a filledclose_allretires its slot
Full release notes: https://github.com/PyneSys/pynecore/releases/tag/v6.8.10