PyneCore now chooses overloaded functions the way Pine does

When a Pine function has several versions, TradingView picks one from the types of the arguments, decided once when the script compiles. PyneCore used to decide at run time from the values, and the two answers could differ: an integer-typed expression holding a fractional value, an empty array, or a method called by name could land in another version than on TradingView, and the script then quietly computed something else.

PyneCore now makes the same decision ahead of time, from the types, and runs the chosen version directly. Where the types leave the choice open, it says so instead of guessing. This also covers functions whose versions differ only in whether a parameter is simple or series, which compiled Pine libraries use: a probe with a simple float and a plain float version, called with a constant, an input and close, now matches TradingView across 22,743 bars of an hourly EUR/USD chart; the one value that differed came from an unfinished last bar in the local data.

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