Discussion on "How to write a DLL for MQL5 and exchange data in 10 minutes". - page 5
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
1) which version of the terminal is 32 or 64 bit?
2) which version of dll is 32 or 64 bit?
1) is there a choice? I think only x86 downloads from here...
2) dll 32
Reinstalling MT5 gave the following result. When launching the script, the following info appears in the log Cannot find function fnCalculateSpeed in 'MQL5DLLSamples.dll'.
I am attaching a screenshot of the library from Dependency Walker just in case.
Reinstalling MT5 gave the following result. When launching the script, the following info appears in the log Cannot find function fnCalculateSpeed in 'MQL5DLLSamples.dll'.
I am attaching a screenshot of the library from Dependency Walker just in case.
What is the build number of the re-installed terminal?
Apparently old, clearly not the latest 240 build.
Yeah, definitely not the last one...
After upgrading to 240 bild the first run of the script worked fine. I got excited. But subsequent runs only resulted in a crash. MT 4 was running in parallel.
After rebooting, everything seems to be working! :-))
Commented out function fnCrashTest(int arr)
Thanks to all, who helped!
In general, I have not managed to increase calculation speed using dll by more than 2.5 times. This demonstrates the high speed of MQL5. For the majority of trading tasks there is no point in bothering with dll, except when it is necessary to protect the code and when "heavy" calculations are required.
Renat, thank you for the article. I think many people will need it more than once. I have a side question related to dll. (Terminal 249, Editor 248).
Example
We have a libra demo.dll with only one function.
We have an mql script demo.mq5.
The compiler doesn't show any errors or warnings.
Run it in the terminal and get the following
When checking in the visual debug, I also found out that the demo.dll function itself has its first character, not a string.
The question is
What's the problem? How to pass the string from MQL to dll in a human way?