Really...I ran it through a simulator by SoftFX and once the candle closed, the waveform never changed. But you're the expert and I thank you looking into it. However, here is another version I found that does the same thing, but when I add the MA to it, it flattens. I don't know if the code has errors or something. However, it you can check it out and apply the MA with alerts, I'd be eternally grateful!!!!
P.S. Or is it possible not to make it non-repaint...