MQL5 - ChartScreenShot() - Save to FILE_COMMON area?

 

From the documentation it appears that ChartScreenShot() only saves to \MQL5\Files\ directory, not \MetaQuotes\Terminal\Common\Files\ directory.

So, I am just double checking that there is no way to save into the latter using some sort of option like FILE_COMMON for file functions.

 

It turns out that FileMove() can move a file from local to FILE_COMMON area.

if ( FileMove(filename, 0, filename, FILE_COMMON ) )
{
    Print("File moved");
}

So, a workaround is to take the screenshot then move it to the common sandbox.

Because it takes a finite time for the screenshot to be created, and ChartScreenShot() does not block, I'd either have to use Sleep(), something with a timer,  or even possibly trigger an event using EventChartCustom().

Anyway, it seems like a bit of mussing around to have screenshots stored in the same directory as my EA-generated log files.

 
Anthony Garot:

It turns out that FileMove() can move a file from local to FILE_COMMON area.

So, a workaround is to take the screenshot then move it to the common sandbox.

Because it takes a finite time for the screenshot to be created, and ChartScreenShot() does not block, I'd either have to use Sleep(), something with a timer,  or even possibly trigger an event using EventChartCustom().

Anyway, it seems like a bit of mussing around to have screenshots stored in the same directory as my EA-generated log files.

Save them in MQL5\Files lool.

 
Alain Verleyen:

Save them in MQL5\Files lool.

I know, right! I thought of that, too.

:-D