Invalid trade volume

 

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

 

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

 
thanks
 

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

 
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.

 
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.
Reason: