It seems that it doesn't matter if I'm trying to return an array or not. I get the error if I even try to return just a single struct, but it compiles if I change the return type to an int or a float.
I know this is 5 years later, but thank you very much! I was having same problem.
You can't return an array. Pass the array by reference and populate it.
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
I have a DLL that will return a pointer to an array of structs:
However, I do not know how to import this function in mql5. I have tried doing
However when I compile my code I get two errors:
'[' - name expected
'double' - name expected
I assume the 'double' error is just residue from the return type not being correct. Does anyone know how to properly import a function from a DLL that returns a pointer to an array?