PyneComp v6.0.63 — four conversion bugs that silently changed what a strategy does are…

Fixes

  • Converting a v4 strategy whose strategy.entry() or strategy.order() took a computed long argument produced a script that traded the wrong way — a DCA bot closing with long=(IS_LONG?false:true) opened a doubling long every bar instead. The expression is now wrapped into a proper direction the way TradingView’s own converter does it.
  • A parenthesized conditional used as the condition of another conditional lost its parentheses, which quietly rebound the branches and changed the result. It now keeps them.
  • Comparing a string variable to na stopped working after conversion: Pine treats s == na as a real test for strings, so scripts that steer on it took no trades at all. Those comparisons are now converted to na() — the numeric forms, where == na is always false, are left alone.
  • strategy.exit() calls that pass both an absolute level and a tick distance for the same side (limit with profit, stop with loss, trail_price with trail_points) now behave after conversion exactly as they did on the original version. The tick distance was being dropped, which silenced the exit on every bar where the absolute level was na — and Pine changed which of the two wins in v6, so a converted script exited at a different price than the one you pasted in.