Writing a Header to a file just once
Author: akar
Creation Date: 10/28/2018 4:42 AM
profile picture

akar

#1
I want to create a file with a header and then populate it with data for each symbol. I tried the following however the header line keeps getting repeated over and over for each symbol.

Please suggest a solution.

CODE:
Please log in to see this code.
profile picture

Eugene

#2
The "Knowledge Base" in the Wealth-Lab Wiki has an article which speaks for itself:

WealthScript Techniques | Executing some code only once

Here's how to apply this pattern to your case:

CODE:
Please log in to see this code.
profile picture

akar

#3
Eugene, perfect solution and works get. Many many thanks for your help.
profile picture

Eugene

#4
Glad to help you.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).