Where have I gone wrong?

 
deleted by request, with apologies.
I have an indicator that has a curve type moving average and I applied user definable "bands" above and below the MA. It worked well.

I want to modify an indicator that is similar but is a straight line trend indicator. I have added the buffers and it compiles without errors but does not work. I changed the location of the last line i.e.TLnBuffer [l_index ... and this gave me the lines I needed but for one bartime only. I would like the lines to show for the period of barscounted. Can anyone spot my error(s)? Help gratefully received.
 
NewtonLeo:
Help gratefully received.
Don't use STOLEN code. Decompiled code is STOLEN code. You are either a THIEF or the receiver. Your problem is simple but no one should help you with it.
 
Thanks for alerting me. The source of the file was one of the numerous depositories of MT4 indicators any search engine will list or an attached file in a forum. It was inncocently come by and I have learned.
Reason: