RRG Lines and show bar

I've put a simple script on RRG lines -close is up. What I've found is that in by adding this to my page layout it shows points where the RRG is falling. If I apply to the chart independently the script works. Can you help?

In the screen shot the first RRG is from the template created and the bottom RRG is independently applied.

Thanks Peter

Found the problem. The RRG applied in the template had changed the index from xjo to spx. Hopefully all should be fine.