Printing to a file: String always added to the file  [SOLVED]

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Printing to a file: String always added to the file

Postby arjfca » 11 Oct 2014

Hello

I want to use a text file to keep info. The data is captured from a mouse click event

Code: Select all

filedelete("G:\BarInfo.txt");
Print (file("G:\BarInfo.txt"), VClickBarOpen_S + comma + vClickBarHigh_S + vClickPrice_S);
I want that each time I access the .TXT file to write new data.

At the moment, each time I use my function, new data is added to the file, event if I use the FileDelete function just before using the print

Martin
BarInfo.jpg
(69.75 KiB) Downloaded 271 times

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Printing to a file: String always added to the file  [SOLVED]

Postby arjfca » 11 Oct 2014

Resolved

Used FileAppend Instead Print(file)


Return to “MultiCharts”