Why am I limited to under 1 in the Lots input.

 

Hi There,

 I am testing an EA with Lots as an input. But it can only be between 0.1 and 0.9; Why is that? I am new to this just started yesterday. But I'm a coder so not completely retarded.

Thanks 

 
Shane Scott: Hi There, I am testing an EA with Lots as an input. But it can only be between 0.1 and 0.9; Why is that? I am new to this just started yesterday. But I'm a coder so not completely retarded. Thanks 

There could be a bug in your code, but you should also check the contract specifications of the symbol being traded.

// Variables for Symbol Volume Conditions
   double
      dblLotsMinimum = SymbolInfoDouble( _Symbol, SYMBOL_VOLUME_MIN  ),
      dblLotsMaximum = SymbolInfoDouble( _Symbol, SYMBOL_VOLUME_MAX  ),
      dblLotsStep    = SymbolInfoDouble( _Symbol, SYMBOL_VOLUME_STEP );
       
// Adjust Volume for allowable conditions
   double
      dblLotsAdjusted = fmin(  dblLotsMaximum,                             // Prevent too greater volume
                        fmax(  dblLotsMinimum,                             // Prevent too smaller volume
                        round( dblLots / dblLotsStep ) * dblLotsStep ) );  // Align to Step value
Reason: