Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Is it possible to have headers in the first row of the FileAppend function.
Eg: My current code is:
if Marketposition = 1 then
FileAppend("C:\Users\roland\Desktop\DT\Example.csv", Symbolname +","+ Numtostr(date + 19000000,0)+","+ Numtostr(Volume,0)+ Newline);
Is the only way to do this by adding more columns in front of each with a "header"? I just want my CSV to have headers on the top line if possible.
you could write the header within a once block or "if CurrentBar = 1" conditional branching. Depending on how you write your files you might have to add additional checks to make sure the file doesn't exist yet, as FileAppend would otherwise append another header.
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,388
Thanks Received: 10,208
The annoying thing is, I find that often my header row is actually the 2nd row of the csv file rather than the first, especially if I'm doing optimizations and writing results.
I sent to you a message, anyway I will Explain here what i'm looking for.
I would need to write a few lines of code that would allow me to save as a text file all the alerts or emails generated by the Strategy Filled Order function of TradeStation's TradeManager.
if anyone can help me or write me a piece of code I would be very happy.
I've already tried with strategy host but seems to be working only with the Simulated account, my algorithm is for Forex and as you know forex is not anymore available on TradeStation.
this is the reason why I was asking something inside the code without using strategy host.
Do you know an easy way to do it?
Kind Regards,