Indicator only appears after compiling twice.

 

Hi all -

I'm in the process of developing this indicator, and need some help. I find that I have to compile it twice to get it to appear every time I attach it to a chart or change the timeframe.

Any help would be much appreciated!

 
HackyHack:

Hi all -

I'm in the process of developing this indicator, and need some help. I find that I have to compile it twice to get it to appear every time I attach it to a chart or change the timeframe.

Any help would be much appreciated!


I'm not sure if this image or the source code was attached, so I'm adding them now.
 
HackyHack:

I'm not sure if this image or the source code was attached, so I'm adding them now.

I'm attaching the source code here now.
Files:
 
HackyHack:

I'm attaching the source code here now.

OK - here's the image:
Reason: