you can try several solutions to find the possible loss conversion.
take=NormalizeDouble(MarketInfo(pairmajeur,MODE_ASK)+Take*MarketInfo(pairmajeur,MODE_POINT),(int)MarketInfo(pairmajeur,MODE_DIGITS));
G'day stanislass
You're not getting an error, you're getting a compiler warning that something "could" go wrong, but always best to fix it.
- Know your return types. As Marco pointed out, you're returning a double for the last parameter but NormalizeDouble expects an int there
- Casting using (int), (double), (uchar) etc is quick & will get around compiler warnings but may eventually bite you in the bum (try dividing a double by an int). For numbers, try using the various Math functions first to explicitly convert values
- Using the same variable name with different capitalization will bite you in the bum VERY soon. If you must do it, try using variable names such as dblTake and intTake
Hope that helps :)

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
Hello
Why in a multi-pair EA this:
Gives me an error ""possible loss of data due to type conversion Malibu.mq4 426 111". (111= MarketInfo(pairmajeur,MODE_DIGITS));)
with:
double take
int Take
string pairmajeur
This error did not appear in previous versions of the EA and appeared on the occasion of modifications which have nothing to do with the section of passage of the orders!
Thank you for your lights