How to close a file after printing to it  [SOLVED]

Questions about MultiCharts and user contributed studies.
Zheka
Posts: 225
Joined: 13 Jan 2016
Has thanked: 8 times
Been thanked: 53 times

How to close a file after printing to it

Postby Zheka » 29 Mar 2018

Hi,

I am automating export of price and indicator values from a chart by starting MC and loading a relevant workspace with a signal that does the job with print(filename, value1,value2,...).

The problem is that the resulting file is not released by MC until the signal is switched off, and so it cannot be opened by another program.

Aborting at Lastbaronchart works. But this switches off the signal in the workspace (it is impossible to save a workspace with a signal ON). And on next automated loading manual intervention is required to switch it on again..

Are there any workarounds?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: How to close a file after printing to it  [SOLVED]

Postby Henry MultiСharts » 06 Apr 2018

Hello Zheka,

Print command does not release the file on each calculation. Instead of print please use the FileAppend command.


Return to “MultiCharts”