Hi
I'm writing an script and I want to use a function which I've written previously in an "mqh" file, in my script and I don't want to do a simple copy-paste and put the code in my script, instead I want to use #import to use the previously written function in my script. As I read the documentation, it stated that the #import can only be used to import functions from .dll and .ex4 files so I'd appreciated if anyone can help me know whether I can use the #import for ".mqh" files as well or not.
Please be noted that I can easily use #include to have my .mqh file codes in my script, but because some minor problems I'd prefer not using #include for having my .mqh file codes in my scripts.
Your kind guidance is highly appreciated.
Use #include
#import is for something else
Use #include
#import is for something else
Thank you for your kind answer,
May I know what it is exactly for?
As I describe in my previous post, I'd prefer an alternative solution for #include.
Thank you for your kind answer,
May I know what it is exactly for?
As I describe in my previous post, I'd prefer an alternative solution for #include.

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
I'm writing an script and I want to use a function which I've written previously in an "mqh" file, in my script and I don't want to do a simple copy-paste and put the code in my script, instead I want to use #import to use the previously written function in my script. As I read the documentation, it stated that the #import can only be used to import functions from .dll and .ex4 files so I'd appreciated if anyone can help me know whether I can use the #import for ".mqh" files as well or not.
Please be noted that I can easily use #include to have my .mqh file codes in my script, but because some minor problems I'd prefer not using #include for having my .mqh file codes in my scripts.
Your kind guidance is highly appreciated.