.
It seems a recent change by TradingView to their platform has broken this script.
At the moment, I can't find the issue that is causing the drawing of the grid to be all messed up, so for now I have changed the way it displays data.
It still works the same as before in terms of giving signals. Just looks different.