Download MetaTrader 5
To add comments, please log in or register
Start making profit using the Market. Publish your product!
Bruce Lesko
Bruce Lesko 2013.01.26 13:05 

 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".




Bruce Lesko
Bruce Lesko 2013.01.27 11:49  

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" 

Konstantin Chernov
Konstantin Chernov 2013.01.27 20:19  

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

phi nuts
phi nuts 2013.01.28 09:04  

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


  selected by moderator phi.nuts  


enbo lu
enbo lu 2013.02.03 14:13  
Thanks! I am finding the solution too.
To add comments, please log in or register