PyneCore v6.8.2 released — a strategy's declared account currency is now actually…

Features

  • Account-currency conversion at the cash-flow level — each amount converts at the rate of the bar it is booked on, so a trade’s profit is gross at the exit rate minus each fee at its own bar’s rate; run-up and draw-down mark at their own bar
  • strategy.cash and strategy.percent_of_equity size an account-currency budget, so contract counts land on TradingView’s grid
  • initial_capital and cash_per_contract / cash_per_order deliberately do not convert — measured, they are already in the account currency
  • New builtins: strategy.margin_liquidation_price, strategy.convert_to_account, strategy.convert_to_symbol, strategy.account_currency

Fixes

  • str.format now reads its pattern the way MessageFormat does: a single quote escapes braces instead of vanishing, so a webhook body with quoted braces formats instead of raising
  • The OHLCV reader snaps the base price to the declared tick grid, not just the delta-decoded high/low/close — an off-grid open no longer decodes into a bar the writer rejects
  • Strategy report money columns are labelled with the account currency, and the rate lookup no longer reads a rate bar that has not closed yet

Full release notes: https://github.com/PyneSys/pynecore/releases/tag/v6.8.2

PyneComp v6.0.51 — compiled v4/v5 scripts now trade with the strategy() defaults they were written against.

Fixes

  • Pine silently changed two built-in strategy() defaults between versions, and TradingView’s own converter does not write the old value out when it migrates a script — so its v6 output trades differently from the source it came from. Measured against live TradingView: margin_long/margin_short were 0 through v5 and became 100 in v6, and initial_capital was 100000 in v4 and is 1000000 from v5.
  • The repair happens on the compile path, not in the converter, which stays byte-comparable with TradingView’s: the global block carries the source’s Pine version and codegen appends the missing arguments to the emitted @script.strategy(...). An argument the author set explicitly is never overridden, and a v6 source is untouched.
  • Test corpus entries for Pine libraries that are unavailable, and for reference data that is absent, now skip with a specific message instead of failing.