PyneComp v6.0.80: more published Pine scripts now convert and compile cleanly, and inputs…

Fixes

  • A global x := input.*() or x += input.*() always ran with its default value and ignored your settings. It now reads your setting, and x keeps its earlier value until the reassignment.
  • Scripts with an unused helper function no longer fail to compile with a type error such as “The branches of ‘?:’ have incompatible types”. TradingView doesn’t report these either.
  • Converting older scripts no longer fails on a v4 for while = 0 to n loop, a line that ends in a comparison operator (v >), or legacy kagi(...) calls.
  • Converted scripts no longer contain a typeless na in bool positions (array.new_bool(n, na), bool parameters, bool reassignments) or a bare pivot used as a condition (if ph), both of which v6 rejects.
  • Calls that repeat an argument by name, such as input.int(7, "A", title = "B"), now convert for every built-in, not only a handful. strategy.close("L", cond, comment = c) keeps its comment.
  • A local variable next to a parenthesized expression is no longer renamed to ta.dev, and a bool cast in one function no longer leaks into the values of another.
  • A switch with its default branch on its own line no longer crashes the conversion, and its layout now matches TradingView’s.
  • for k in m.keys() no longer types k as the map’s value type.
  • In the editor, a reference to a variable no longer points at the wrong place in the script.

This website uses cookies and similar technologies. By continuing to use the site, you accept this. Details in our Privacy Policy.