Overwrite print file

Questions about MultiCharts and user contributed studies.
User avatar
PaperoneJunior
Posts: 6
Joined: 24 Mar 2021
Has thanked: 2 times

Overwrite print file

Postby PaperoneJunior » 06 Apr 2021

Hi, I would like to print information in a dedicated file only for for the most recent bar of a chart (DURING AUTOTRADING).

The output I would like to have, can be obtained with these 2 lines:

Code: Select all

FileDelete(CompletePath); print(file(CompletePath),marketposition*currentcontracts," ",barinterval);
Unfortunately the reserved word "FileDelete" is very slow.

Is there a way to overwrite the print file every time the print reserved word is met?

User avatar
Kate MultiCharts
Posts: 591
Joined: 21 Oct 2020
Has thanked: 9 times
Been thanked: 148 times

Re: Overwrite print file

Postby Kate MultiCharts » 07 Apr 2021

Hello PaperoneJunior,

You can try the following:

1. If FileDelete is too slow, you can use a new file for each Print keyword.
2. You can write your own DLL to erase the file contents.


Return to “MultiCharts”