Faulty, unsafe, untested 3rd party TradingView plugin - beware

To further clarify, when I wrote about the "original" code, I was exclusively referring to the code snippet that the OP got following the @link he included in his first post:

And nothing more.