code problem with lot size for mq4 to mq5 conversion

 

We have a strategy we made in 2009 and it's been running fine in MQL4 all this time.. well today we try to make it mq5 compliant with strict rules and so forth and have a strange integer / lot size problem - no idea how it's possible:

 if(subTotalTypeOrders(OP_SELL)>0)

        {

         double Lots=subTotalTypeOrders(OP_SELL)*Multiplier;

    

added "Double" or else it wouldn't compile, but it used to work without this.  Lots isn't defined anywhere else, or globally.

 

Now the EA opens orders with huge mistakes on lot size.  

Any ideas? 

 
Joe Gelet:

We have a strategy we made in 2009 and it's been running fine in MQL4 all this time.. well today we try to make it mq5 compliant with strict rules and so forth and have a strange integer / lot size problem - no idea how it's possible:

 if(subTotalTypeOrders(OP_SELL)>0)

        {

         double Lots=subTotalTypeOrders(OP_SELL)*Multiplier;

    

added "Double" or else it wouldn't compile, but it used to work without this.  Lots isn't defined anywhere else, or globally.

 

Now the EA opens orders with huge mistakes on lot size.  

Any ideas? 

Your question is not clear, and the code you posted should use the "SRC" tab
What is the purpose of subTotalTypeOrder(OP_SELL) functions, and what was meant by multiplier variable.
We can not help, because do not understand your function.
Reason: