Invalid trade volume

To add comments, please log in or register
Louis Stoltz
639
Louis Stoltz  

Hi


I get an error invalid trade volume when I try open lots like 11.23 but when I use 10 its fine.

I'm using double lot variable. Why would that give me this error?



Louis

Slava
Moderator
12655
Slava  

Trade volume must be in accordance with lot step parameter.

double lot_step=MarketInfo(Symbol(),MODE_LOTSTEP);

If lot step is equal to 0.1 then You cannot use volume 11.23, u can use 11.2 or 11.3

Louis Stoltz
639
Louis Stoltz  
thanks
Ismet Zulkarnaen
9
Ismet Zulkarnaen  

I get an error  invalid trade volume when I try to close take profit, any suggestion thank you.

Keith Watford
Moderator
20377
Keith Watford  
Ismet Zulkarnaen:

I get an error  invalid trade volume when I try to close take profit, any suggestion thank you.

Show your code and you may get some advice.

David Diez
1405
David Diez  
Slava:

Trade volume must be in accordance with lot step parameter.

double lot_step=MarketInfo(Symbol(),MODE_LOTSTEP);

If lot step is equal to 0.1 then You cannot use volume 11.23, u can use 11.2 or 11.3

It could be also the maxlot.
To add comments, please log in or register