Path of property icon - problem

 

Hello, I need to get indicator's icon on the indicator's window when I attach the indicator on my metatrader chart.I specified the path on icon property:

#property icon "http://mysite.com/logo.ico"

but I get an error " cannot open icon file 'C:\Users\trading\AppData\Roaming\MetaQuotes\Terminal\B8A68C5F345865DD17F6020D17018025\MQL4\Indicators\http:\mysite.com"

This is because the specified path is attached to local default path.

how can I get different path from an external server? Thank you


 
You don't. Download the icon into the proper folder.
 

Is there anyone ever read the documentation ?

icon

string

Path to the file of an image that will be used as an icon of the EX5 program. Path specification rules are the same as for resources. The property must be specified in the main module with the MQL5 source code. The icon file must be in the ICO format.

Documentation on MQL5: Language Basics / Data Types / String Type
Documentation on MQL5: Language Basics / Data Types / String Type
  • www.mql5.com
The string type is used for storing text strings. A text string is a sequence of characters in the Unicode format with the final zero at the end of it. A string constant can be assigned to a string variable. A string constant is a sequence of Unicode characters enclosed in double quotes: "This is a string constant". If you need to include a...
 
Alain Verleyen:

Is there anyone ever read the documentation ?

icon

string

Path to the file of an image that will be used as an icon of the EX5 program. Path specification rules are the same as for resources. The property must be specified in the main module with the MQL5 source code. The icon file must be in the ICO format.

Thank you very much Alain for your reccomendation.

Could you provide me with more specific information about the code to write to import the logo.ico  (in fact i had already converted into ico format), <Deleted>

Thank you in advance,

 
GreenKobra:

Thank you very much Alain for your reccomendation.

Could you provide me with more specific information about the code to write to import the logo.ico  (in fact i had already converted into ico format), now logo.ico is at "http://mysite.com/".

Thank you in advance,

You would not need to pull the icon from an external server anyway - even if you wanted to build an in server compiler for your shop -

Place the .ico in the Images folder of MT5 in your hard drive .

Provide the path and filename of the .ico in the images folder in the icon property.

Once you compile it will be there , which means , if your buyers download the indicator they will not need to be sent the icon file or any resources that have been included in the indicator .

 
GreenKobra: Could you provide me with more specific information about the code to write to import the logo.ico
Alain Verleyen: Is there anyone ever read the documentation ?

What part of

#property icon "path\\name.ico"

was unclear?

 

#property icon "../images/uc24.ico"

Hi, thanks now it works though I don't  understand where it takes the picture because there isn't logo.ico in images folder in other Metatrader