I'm having a hard time with MAXLOTSIZE..

AR DI
19

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 .
waxwell
73
waxwell  
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. 

AR DI
19
AR DI  
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 .
AR DI
19
AR DI  
thankyou so much can you please explain what is "lotsNew"?
William Roeder
28260
William Roeder  
AR DI: what is "lotsNew"?

Wanted lot size.

AR DI
19
AR DI  
William Roeder:

Wanted lot size.

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