Adding an icon to EA

 

 I am trying to add an icon to my EA.  When I try to compile the code #property icon "C:\Users\Goliath\Desktop\Advisor\Logo\AlphaSeeker.ico" I get the following error.

cannot open icon file 'C:\Users\Goliath\Desktop\Advisor\C:\Users\Goliath\Desktop\Advisor\Logo\AlphaSeeker.ico'

I am not a programmer so all I see is gibberish when I read the how to guide.  What did I do wrong?  Below is the guidance I was trying to follow.

 

Specify the product version and its description in the code. In addition, a good idea is to add icons for your software as a graphical file in ICO format. This gives your product a professional finished look and allows the trader to easily find it from other compiled EX5 files:

#property icon path_to_icon_file

Properties of MQL5 programs are defined by the #property directive. All the graphical and sound files needed to run the program, can be placed in the form of resources directly into the executable file EX5. More information can be found in article "Use of Resources in MQL5".

 

V/R

Redfox 

 

I solved my issue by moving the ICO image into the same folder

as the MQ5 code.  Hope that is helpful for others.  The final code

looks as such. 

 

#property icon "AlphaSeeker.ico" 

 

I keep my icons in the folder "MetaTrader 5\MQL5\Images"

 
Konstantin83:

I keep my icons in the folder "MetaTrader 5\MQL5\Images"

  RECOMMENDED SOLUTION  

  selected by moderator phi.nuts  

 

 
Thanks! I am finding the solution too.
 

hi, pls help needed, I tried to use the .ico format file with the #resource but it is not recognized. It does appear the .bmp is recognized by #resource. Question is:

how do I use Resources to append the icon file (or better still use .bmp to create an icon) so that when the programme is distributed or moved to a different computer there will be no need to transfer the icon file?

thanks in advance for your help. 

 
Marcel Igboanugo:

hi, pls help needed, I tried to use the .ico format file with the #resource but it is not recognized. It does appear the .bmp is recognized by #resource. Question is:

how do I use Resources to append the icon file (or better still use .bmp to create an icon) so that when the programme is distributed or moved to a different computer there will be no need to transfer the icon file?

thanks in advance for your help. 


Program Properties (#property).

 

thank you.
 
solved  thx u bro..
Reason: