Hi DayTrder,
In MetaEditor, create it as .mqh (mq header) in include folder then compiled it, Drag and drop the .mqh from include to your EA. It will automatically will be written like this
#include <aaaa.mqh>
In MetaEditor, create it as .mq4 as a library then compiled it, Drag and Drop the .mq4 from MetaEditor's libraries to your EA. It will automatically will be written like this
#include "..\libraries\aaaa.mq4"
If you still have problem when compiling EA, don't install MT in C:\Program Files for Vista/7, and try again
:D
Hmmm. Spoonfeed me!
Tried D&D inside the editor, and between two explorer windows, no luck
In metaeditor go to file/new choose include file from the list.
copy paste the code from your existing mq4 file to the new include file then save it. dont bother trying to compile it, include files dont need compliling.
now in your EA do #include <filename.mqh>
Include files are not quite the same thing as libraries but when creating separate files for functions they do what you want to do. According to the documentation, the mql4 developers recommend the use of include files over libraries because libraries are heavier on resources at runtime.
Hmmm. Spoonfeed me!
Tried D&D inside the editor, and between two explorer windows, no luck
This following script which is shipped with MetaEditor has include in it, try to compile it, if you have error when compiling, then you have to install MT4 somewhere else.
rotate_text, period_converter, trade.
:D
IMO The UAC issues with MT4 & Vista/Windows7 have been blown out of proportion.
Akthough Those versions of Windows do divert new files created by MT4 (and other installed programs) to a different directory known as "virtual store", Windows maintains a connection from ProgramFiles to that directory.
This means those diverted files are still "seen" by MT4 and can be accessed and used by MT4 as if they were still in the ProgramFiles/MT4 Directory even though they are not.
The only noticable difference is when you look in the Program Files/MT4 folder yourself for a new file created in MT4 and it is not there.
You should then click on the compatability files icon on the toolbar of the folder. Windows will then automatically change the folder being viewed to show the one in the virtual store directory and voila, the missing new file is there.
I have been using MT4 installed the default way in ProgramFiles on Vista for years without a problem.
If you install MT4 or any other program outside of ProgramFiles in an attempt to avoid UAC, not only is that pointless, but you are also losing protection UAC provides which helps prevent attacks on your installed programs by malicious software.
IMO The UAC issues with MT4 & Vista/Windows7 have been blown out of proportion.
.......................
This following script which is shipped with MetaEditor has include in it, try to compile it, if you have error when compiling, then you have to install MT4 somewhere else.
rotate_text, period_converter, trade.
:D
Would you please compile these script below in your MetaEditor and please report back if the compiling successful or not :
1. rotate_text.mq4
2. Period_Converter.mq4
3. trade.mq4
:D
IMO, they are very real. Many hard to diagnose problems, even when UAC was disabled. Why fight it. Even IBFX installs in C:\InterbankFX_1-Click\
What part of "hard to diagnose problems, even when UAC was disabled" was not understood. If the user understand UAC and runs the terminal properly is irrelevant - people STILL have UAC related problems. Stop fighting it. Mt4 is not completely compatible with UAC.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- 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, to make it easier to develop and work with the EA code I want to hide away simple standard functions that are fully finished. In the file I put only the functions, like this:
And refer to it in the EA like this:
But when compiling the EA I get "'aaaa.mq4' - cannot open the program file C:\......
Dunno how to do this... should I use mq4 or mqh?
Where should the file be saved?
Should it be just saved, or compiled also?
If I try to compile it I get "variable not defined" for all the EA externals...twice for each of'em.