Create csv file, and write array to files

 

Hey,

I have four one dimensional arrays, would like to write them to a csv file, one column per array.

I'm not sure how to do this, I cannot find a function to create a new file with.  

Any idea how to do this? 

 
As sample see script Export Indicator's Values v1