I really hope someone can help me with that problem, I’ve
been trying to find a solution for this in the internet but I’m sure I’m not
getting something. Thank you for any help!
I am trying to build a DLL to which I can send rates from
MetaTrader, then modify this array and return the modified array.
My DLL is setup like this:
CPP:
void MYCALC(double*
MyyMatrix)
{
*(MyMatrix+(3*6)+3)
= 5; //to modify the Matrix at position[3][3]
The print call will only return the value which was copied
in there by the ArrayCopyRates function and will not return the value that I have
given it in my DLL. Is it even possible to do this in MQL4?
Dear all,
I really hope someone can help me with that problem, I’ve been trying to find a solution for this in the internet but I’m sure I’m not getting something. Thank you for any help!
I am trying to build a DLL to which I can send rates from MetaTrader, then modify this array and return the modified array.
My DLL is setup like this:
CPP:
void MYCALC(double* MyyMatrix)
{
*(MyMatrix+(3*6)+3) = 5; //to modify the Matrix at position[3][3]
}
MQL4:
#property strict
#import "MYDLL.dll"
void MYCALC(double& MyMatrix[][6);
#import
int start()
{
double MyRates[][6];
int NoOfMyRates;
NoOfMyRates = ArrayCopyRates(MyRates,"EURUSD",PERIOD_MN1);
MYCALC(MyRates);
Print(„MyRates[3][3]: „,MyRates[3][3]);
return(0);
}
The print call will only return the value which was copied in there by the ArrayCopyRates function and will not return the value that I have given it in my DLL. Is it even possible to do this in MQL4?
Thank you and best regards,
Michael