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
If the error with global variables has gone why not to use this method? Actually, if there is a bug in the tester or terminal (related to the global variables or whatever else) we will find it and they will fix it.
The idea with a stub is as follows. For example, if you have a library.dll with exported function runTask, create a libraryWrapper.mq4 file (in Libraries subfolder) and code runTaskWrapper function with the same signature (parameter list and return type) and export modificator. Your EA should import the libraryWrapper.ex4 from now on, and call functions from it. The libraryWrapper in turn has 2 versions. First imports actual dll and calls corresponding functions (such as runTask) from wrappers (such as runTaskWrapper). Second imports nothing and does nothing (runTaskWrapper is empty), but there will be no errors.
You can distribute EA with the empty wrapper by default, and then send redirecting version with DLL file when necessary.