How can I launch MT4 in command line?
Posted: Mon Apr 08, 2019 11:55 am
Hey,
this topic describes exactly my issue: https://tickstory.com/forum/viewtopic.php?f=2&t=301
However, the solution that proposed there is not working.
I wrote down this function that runs on init
However, I keep getting error code 5 which means Access denied (I assume that the problem is that the file is already open)
this topic describes exactly my issue: https://tickstory.com/forum/viewtopic.php?f=2&t=301
However, the solution that proposed there is not working.
I wrote down this function that runs on init
Code: Select all
void FixFxt()
{
int time= Period();
string symbol=Symbol();
string strCurrentFile = TerminalInfoString(TERMINAL_DATA_PATH) + "\\tester\\history\\x"+ symbol + time + "_0.fxt";
string strNewName = TerminalInfoString(TERMINAL_DATA_PATH) + "\\tester\\history\\"+symbol+time+"_0.fxt";
PrintFormat("current File - %s new name - %s", strCurrentFile, strNewName);
int copy=CopyFileW(strCurrentFile, strNewName, 0);
int aa = ::GetLastError();
int ab = kernel32::GetLastError();
//PrintFormat("FXT file copied - %d %d %d", copy, aa, ab);
}