This is just published for visibility as a public service until the Pine devs are able to fix or document this behavior. The barssince() function returns different values when inside a conditional context. As long as it can be documented (and relied upon), this could be a pretty cool feature, but right now this is now how I read the help documentation to...
This is a code to showcase a function call bug in PineScript. Problem description: When a function is called from inside of if-then scope, this function may return an invalid result. Code description: Two identical code pieces are used to perform simple calculation. The only difference is that one piece has a part of its code wrapped into a...
I found a bug with built-in percentrank function. Sometimes it gives unexpected and incorrect results. You can see a one of them on the chart. ALL scripts which use percentrank function are affected. No matter which version they use, no matter who is their author - ALL scripts which use this built-in function can work incorrectly. If you want to avoid...