Hmmm, believe I had the same problem... returned an array instead.
check: 'MySQL wrapper'
I guess the solution is in there.
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
For some reason, my indicator crashed when I try to return several values through a DLL. Currently in my DLL I have something like this
MT4_EXPFUNC void __stdcall myDLL(const double x, const double y, double& sum, double& product)
{
sum=x+y;
product=x*y;
}
In my mq4 code, I have
#import "myDLL.dll"
void myDLL(double x, double y, double& sum, double& product);
#import
int start()
{
double x=2.0;
double y=3.0;
double sum,product;
myDLL(x,y,sum,product);
}
The terminal crashes when I try to run this. It also crashes if I change the mq4 code to
#import "myDLL.dll"
void myDLL(double x, double y, double sum, double product);
#import
int start()
{
double x=2.0;
double y=3.0;
double sum,product;
myDLL(x,y,sum,product);
}
Where is my mistake?