
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
Wow ! It seems that the problem can be solved without writing a library - just by renaming the imported function... It's too late today, but tomorrow - let's try and try...
Yeah. I was too early. GetValue for arrays other than double returns something quite different from what I would like... Alas, I can't do without MSVC... Eh, I haven't taken checkers in my hands for a long time...
Masters!
I don't understand why MQL needs pointers? If you want to do something with pointers, do it in C++.
There are no problems in passing pointers to another data type and arrays of another type! For example, here is a declaration: void setvar(int& var[]); to pass a pointer to an array of integers (guess what you need to change for other types?).
The overheads of calling dll-functions have not disappeared (build 646), say, an empty mql-function works faster than an empty dll-function, but if you add there at least an operation of selecting from an array, like s[i], then c++ will win here, nevertheless the number of calls should be minimised.
The biggest performance leak is when working with global variables - they are VERY SLOW!!!! It is much easier, if we have made a dll, to store global variables there. For all copies of Expert Advisors and indicators within one metatrader, one copy of the dll is linked, so all its global variables are global for all windows of the metatrader (this truth forces personal data of one window to be stored either in an instance of the class or in an array with access by window identifier).
How can modify this code so that it can be capable to exchange array having struct type element not only double?
Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий
Библиотеки: TradeTransactions
fxsaber, 2018.09.20 16:23
Thank you for your help, but
- I don't understand this code. Where the struct in it?
- I need MQL4 solution