How can I launch MT4 in command line?

General discussion about the Tickstory Lite software package.
Post Reply
rotem4432
Posts: 2
Joined: Mon Apr 08, 2019 11:52 am

How can I launch MT4 in command line?

Post by rotem4432 »

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

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);
}

However, I keep getting error code 5 which means Access denied (I assume that the problem is that the file is already open)

tickstory
Posts: 3857
Joined: Sun Jan 06, 2013 12:27 am

Re: How can I launch MT4 in command line?

Post by tickstory »

Hi Rotem4432,

Unfortunately there is no feature to launch via the command-line.

Thanks.

rotem4432
Posts: 2
Joined: Mon Apr 08, 2019 11:52 am

Re: How can I launch MT4 in command line?

Post by rotem4432 »

Thanks for the fast replay.
There is any other way to run backtest with 99.9% modeling quality without running the MT4 through Tickstory? This can also solve the problem

tickstory
Posts: 3857
Joined: Sun Jan 06, 2013 12:27 am

Re: How can I launch MT4 in command line?

Post by tickstory »

That's exactly the problem Tickstory solves ;)

Post Reply