BMP File not loading on tester?

 

Hi, on executing the following code, why is it, the bmp file shows okay when i place ea directly onto the chart but when i use on tester it doesnt show the image? 

This problem is in mql5. In mql4 it works with no problems on chart or tester the image is always showing?

int OnInit()
{
   string objName1="img1";
   string imgFile1="\\Images\\euro.bmp";

   //ObjectDelete(0,objName1);
   ObjectCreate(0,objName1,OBJ_BITMAP_LABEL,0,0,0);
   ObjectSetString(0,objName1,OBJPROP_BMPFILE,0,imgFile1);
   ObjectSetInteger(0,objName1,OBJPROP_XDISTANCE,200);
   ObjectSetInteger(0,objName1,OBJPROP_YDISTANCE,200);
   
   return(INIT_SUCCEEDED);
}

I have sent 2 images to show what i mean?

Help would be really appreciated

int OnInit()
{
   string objName1="img1";
   string imgFile1="\\Images\\euro.bmp";

   //ObjectDelete(0,objName1);
   ObjectCreate(0,objName1,OBJ_BITMAP_LABEL,0,0,0);
   ObjectSetString(0,objName1,OBJPROP_BMPFILE,0,imgFile1);
   ObjectSetInteger(0,objName1,OBJPROP_XDISTANCE,200);
   ObjectSetInteger(0,objName1,OBJPROP_YDISTANCE,200);
   
   if(!ObjectSetString(0,objName1,OBJPROP_BMPFILE,"Images\\euro.bmp"))
   { printf("Error creating bmp. Error code: %i", GetLastError()); }
   
   return(INIT_SUCCEEDED);
}

Also i notice when i add a get last error code i get error 5019 

Which is saying file does not exist? Which makes no sense as it is finding the image okay when placed on chart?

Files:
 
Stephen Reynolds:

Hi, on executing the following code, why is it, the bmp file shows okay when i place ea directly onto the chart but when i use on tester it doesnt show the image? 

This problem is in mql5. In mql4 it works with no problems on chart or tester the image is always showing?

I have sent 2 images to show what i mean?

Help would be really appreciated

Also i notice when i add a get last error code i get error 5019 

Which is saying file does not exist? Which makes no sense as it is finding the image okay when placed on chart?

Now i find when i use the following it works

#resource "\\Images\\euro.bmp" 

int OnInit()
{
   string objName1="img1";
   string imgFile1="::Images\\euro.bmp";

   //ObjectDelete(0,objName1);
   ObjectCreate(0,objName1,OBJ_BITMAP_LABEL,0,0,0);
   ObjectSetString(0,objName1,OBJPROP_BMPFILE,0,imgFile1);
   ObjectSetInteger(0,objName1,OBJPROP_XDISTANCE,200);
   ObjectSetInteger(0,objName1,OBJPROP_YDISTANCE,200);
   
   return(INIT_SUCCEEDED);
}

So somehow by using resource it can understand the file.

Though im pleased ive now got it to display id still like to know why this is?

Reason: