how to get "indicator file name" in the "indicator" dir?

 

hello guys. 

I have a indicator in main windows. Is that possible to get the indicator-file-name in the "indicator" dir?

I can only get the shortname of the indicator using "ChartIndicatorName()".

but the shortname is not equal to the filename...

confusing ...

 
 

look in your reference for:

__FILE__
 
gooly: look in your reference for: __FILE__
I keep forgetting about the new stuff. Predefined Macro Substitutions - MQL4 Documentation
 
gooly:

look in your reference for:





thank you so so much .both working!!
 
WHRoeder:
gooly: look in your reference for: __FILE__
I keep forgetting about the new stuff. Predefined Macro Substitutions - MQL4 Documentation
both  "__FILE__" and WindowExpertName() are working!! thank you !
 

There is a difference between __FILE__ and WindowExpertName():

__FILE__ is a predefined Macro Substitution, which saves the name of the file when it is getting compiled (the .mq4 file name, without its extension).

WindowExpertName() is a function which returns the name of the executable file (.ex4), without its extension.

If at some point, you change the name of the executable but used __FILE__ in your code, the result will not change accordingly.

Reason: