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 this bug use _percentrank function (the "shim") - you can find it in the script.
NOTE: Don't push on TradingView Support or Pine Core Team because they already know about this issue and work on the fix. I publish it to warn you.
A list of Paid indicators:
Toss a coin to your witcher:
I followed the built-in percentrank() description: "Percent rank is the percents of how many previous values was less than or equal to the current value of given series."
More info about how they do it in NumPy:
This is a good article about the different ways how to calculate percentiles