I'm having a hard time with MAXLOTSIZE..

 

Hi guys!

I'm having a hard time with MAXLOTSIZE..

My broker does not allow Lots greater than 200.00. So, when my MM calculates a greater lot than 200 would give me error 131.

What i Really would appreciate a help is to split the order about to be sent in as many as my margin and risk factor allows. Ex. 7 orders of 200 .


Thanks a lot to you guys .
 
AR DI:

Hi guys!

I'm having a hard time with MAXLOTSIZE..

My broker does not allow Lots greater than 200.00. So, when my MM calculates a greater lot than 200 would give me error 131.

What i Really would appreciate a help is to split the order about to be sent in as many as my margin and risk factor allows. Ex. 7 orders of 200 .


Thanks a lot to you guys .

Hi, 

you need to get the min/max volume with something like that:

   double VolMin=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);
   double VolMax=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);

Than you add in your MM calculations something like:

            if(lotsize>VolMax)
               {
                  lotsize = VolMax;
               }

That is step one anyway. 

 
waxwell:

Hi, 

you need to get the min/max volume with something like that:

Than you add in your MM calculations something like:

That is step one anyway. 

thank you .
 
thankyou so much can you please explain what is "lotsNew"?
 
AR DI: what is "lotsNew"?

Wanted lot size.

 
William Roeder:

Wanted lot size.

thank you for your help i appreciate it very much :) .