View Single Post
  #696 (permalink)  
Old 12-30-2008, 03:06 PM
_rdb_ _rdb_ is offline
Senior Member
 
Join Date: Aug 2008
Location: INDONESIA
Posts: 294
_rdb_ is on a distinguished road
Quote:
Originally Posted by servaldsl View Post
Just one question for RDB:

Why with maxtrade=1 results are far better than maxtrade=2/3/4/5 ?
The DDown increase too, but results are amazing...
is because money management I use in my script :
PHP Code:
double GetLots() 
{
   
double lots,MD,MinLots,maxlot,maximlot,LotSizeint lotsdigit;
   
LotSize  MarketInfo(Symbol(), MODE_LOTSIZE);
   
MinLots  NormalizeDouble(MarketInfo(Symbol(),MODE_MINLOT),2);    
   
maxlot   NormalizeDouble(MarketInfo(Symbol(),MODE_MAXLOT),2);    
  
   if (
LotsOptimized==truelots NormalizeDouble(((AccountFreeMargin()*Risk)/LotSize)/MaxTrades,GetLotDecimal());
   else 
lots=Lots;

   if (
lots MinLots) {lots MinLots;}  
   
   if (
MaxLots>&& MaxLots<maxlot) {maximlot MaxLots;}  else {maximlot=maxlot;}   
   if (
lots maximlot) {lots maximlot;}
   return (
lots);      

MaxLots parameters have an important role in determining the number of Lots that will open by EA.
the greater MaxLots the small number of lots that will be opened, as well as vice versa.
Reply With Quote