Download MetaTrader 5

Calculating Lots Problem

To add comments, please log in or register
All activity at MQL5.community is clearly visible. Have a look at the Wall!
Franco
374
Franco 2010.10.26 15:15 

Hello all,

 I have been experiencing a problem since the release of metatrader 5.  I cannot do any calculations, and send that double as the lot size.  It never works.  For example:

double lot = NormalizeDouble(2/0.1568,2); 

 

 This is just an example.  If I run the expert in the strategy tester I get the "invalid volume" every time.

Any idea what may cause this?

I'm using the CTrade library to execute my trades.

Regards 

Valerii Mazurenko
3485
Valerii Mazurenko 2010.10.26 15:55  
Saidar:

Hello all,

 I have been experiencing a problem since the release of metatrader 5.  I cannot do any calculations, and send that double as the lot size.  It never works.  For example:

 

 This is just an example.  If I run the expert in the strategy tester I get the "invalid volume" every time.

Any idea what may cause this?

I'm using the CTrade library to execute my trades.

Regards 

MetaQuotes Demo-Sever: MinLot=0.1, LotStep = 0.1 -> LotSize = x.xx - incorrect.

2/0.1568= 12.75.... Your balance must be more $20K

   

double lot = NormalizeDouble(2/0.1568, 1); 

 

To add comments, please log in or register