Pass 1item array instead of reference. See https://docs.mql4.com/basis/variables/extfunctions

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
My exported function is this:
#import "HappyEADLL.dll"
int GetNewPosition(int,string,string,string& sym,string& op, double& price,double& tp,double& sl ,double& ts,double& cl);
but if I call the function I cannot have in each double the value setted by the dll function.
Can you give me and example on how to do this?
Something like this in the DLL crash my MT4:
MT4_EXPFUNC int __stdcall GetNewPosition (int pos_id,const char* user, const char* password, char* symbol,char* postype,double& price,double& tp, double& sl, double& ts, double& close)
{
price++;
return 0;
}
thanks
Mauro