I realized that the file-name and the function-name must be different.
For example, if I choose the file-name as import_test.mql4, then I can't use import_test for function-name.
I need to change the function-name to import_test123() or something.
Is this the bug of MQL5 ?
I spend too much time for this trouble.
Thank you for your sharing. I wanted to know how to do function import.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The code of Libraries\import_test.mq5 is as below.
And the code of Indicators\TEST.mq5 is as below.
I compiled each code.
There is no problem in compiling import_test.mq5.
After I got import_test.ex5, I tired to compile TEST.mq5.
Then I had a error.
The error massage is : ')' - undeclared identifier.
And the message is given to 15th line of TEST.mq5, namely 'import_test();' which is inside OnInit function.
Why the compiling is failed?
I never had such problem while using MT4 and MQL4.
I read MQL5 Reference, but I can't find out big difference between MQL5 and MQL4 with using #import.