Multi-line Stochastic indicator

 
Attached are a screenshot and the source of an indicator written to show 4 Stochastic lines (of different periods - obviously).
In practice, it compiles ok but it resolutely refuses to show more than one line - as shown in the screenshot (which also shows the periods it's set to display).
Oddly, in the data window only buffer 6 has a value (the rest being blank) while it's the buffer 0/1 curve shown in the indi window.
Any ideas?
PS the platform doesn't seem to allow a 2nd attachment.
Files:
stochs4.mq4  6 kb
 
Junja:
Attached are a screenshot and the source of an indicator written to show 4 Stochastic lines (of different periods - obviously).
In practice, it compiles ok but it resolutely refuses to show more than one line - as shown in the screenshot (which also shows the periods it's set to display).
Oddly, in the data window only buffer 6 has a value (the rest being blank) while it's the buffer 0/1 curve shown in the indi window.
Any ideas?
PS the platform doesn't seem to allow a 2nd attachment.

Here is the screenshot

 

 
Junja:
Attached are a screenshot and the source of an indicator written to show 4 Stochastic lines (of different periods - obviously).
In practice, it compiles ok but it resolutely refuses to show more than one line - as shown in the screenshot (which also shows the periods it's set to display).
Oddly, in the data window only buffer 6 has a value (the rest being blank) while it's the buffer 0/1 curve shown in the indi window.
Any ideas?
PS the platform doesn't seem to allow a 2nd attachment.

Ok, found the problem - copy & paste programming :-(

Reason: