I created a basic indicator that shows % change of SMA since last bar and inverses the currency pairs to all be going in the same direction (see image - for instance the "GBP tracking panel" tracks all currencies against the GBP....if the lines are above zero, it means GBP is generally appreciating against all currencies and vice-versa. If they are mixed its price action as normal).
The issue i am having is some buggy-ness in the code. Sometimes it works fine, however other times it doesn't. I am self-taught in coding. Any hints?
(as you can see in the screenshot here, the data has flatlined in some instances...usually a deletion of all historical data files resolves this for a short period...)

Comment