The following code cannot find a file and returns error 5002, wrong file name.
I include also a file explorer picture showing the file is in existence.
Can you please help me why the file is not found?
if (FileIsExist(TerminalInfoString(TERMINAL_DATA_PATH) + "\\templates\\reitron_trend_trading.tpl"))
ChartApplyTemplate(0,TerminalInfoString(TERMINAL_DATA_PATH) + "\\templates\\reitron_trend_trading.tpl");
else
{
int iErr = GetLastError();
string sErrDesc = ErrorDescription(iErr);
Print("Cannot open file - err " + IntegerToString(iErr) + " " + sErrDesc);
Print(TerminalInfoString(TERMINAL_DATA_PATH));
Print(TerminalInfoString(TERMINAL_DATA_PATH) + "\\templates\\reitron_trend_trading.tpl");
}
The output in my terminal says the following:
2018.03.07 15:59:30.628 Reitron_Scalping_Working_Model_2 EURUSD,M1: C:\Users\Jean\AppData\Roaming\MetaQuotes\Terminal\BB190E062770E27C3E79391AB0D1A117\templates\reitron_trend_trading.tpl when I output the path that I am searching in the program.
Thanks,