View Single Post
  #3 (permalink)  
Old 05-24-2007, 09:56 PM
Michel Michel is offline
Senior Member
 
Join Date: Feb 2006
Posts: 587
Michel is on a distinguished road
This is what I use (account normal, leverage = 100, lots precision = 0.1):
PHP Code:
double GetLots()
{
   
double LotsPipValue;
   if(
UseMM)
   {
      
PipValue MarketInfo(Symbol(),MODE_TICKVALUE);
      
Lots AccountEquity() * Risk / (StopLoss PipValue 100);
      
Lots MathMin(Lots100);
      return(
NormalizeDouble(Lots,1));
   }
   else return(
1.0);

Reply With Quote