JMA2 repetitively draw the same pattern!!

 

Hello,
I found this .MQ4 indicator: JMA2.mq4
It repetitively draw the same pattern of the 200 first bar !!
How to fix it, to draw simply the indicators on all bars in the charts?

I guess, the range of the main FOR loop (in line 148) should be wrong.


for ( shift=BarCount ; shift >= 0 ; shift-- ) {

Thanks and Regards

Files:
jma2.mq4  12 kb