This indicator fixes the issue of TradingView showing the price too early when using bar replay and switching to a higher timeframe. It works on any timeframe and allows you to switch to any higher timeframe from any candle you want, without showing you what is going to happen next. Everything is done automatically. Essentially, what you are doing is hiding the...
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...