Problem in uploading a Chart

 

Hi all!

I'm trying to run my personal strategy using a custom Chart with the following code:

void OnStart()
  {
//--- example of applying template, located in \MQL4\Files
   if(FileIsExist("MyTemplate.tpl"))
     {
      Print("File my_template.tpl found");
      //--- apply template
      if(ChartApplyTemplate(0,"\\Users\\xxxxxx\\AppData\\Roaming\\MetaQuotes\\Terminal\\1DAFD9A7C67DC84FE37EAA1FC1E5CF75\\templates\\MyTemplate.tpl"))
        {
         Print("The template 'my_template.tpl' applied successfully");
        }
      else
         Print("Failed to apply 'my_template.tpl', error code ",GetLastError());
     }
   else
     {
      Print("File 'my_template.tpl' not found in "
            +TerminalInfoString(TERMINAL_PATH)+"\\MQL4\\Files");
     }
  }

The code compile correctly, but when I run the debugging program from the MetaEditor on ICMArkets, it crash and it doesn't tell me what kind of error it is. I'm working in the virtual machine because i have Mac. 

 
Hernandez18:

Hi all!

I'm trying to run my personal strategy using a custom Chart with the following code:

The code compile correctly, but when I run the debugging program from the MetaEditor on ICMArkets, it crash and it doesn't tell me what kind of error it is. I'm working in the virtual machine because i have Mac. 

may the path of teplet file is the cuse of error, I think just write the file name without this long path

Reason: