Quote:
Originally Posted by servaldsl
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,LotSize; int lotsdigit;
LotSize = MarketInfo(Symbol(), MODE_LOTSIZE);
MinLots = NormalizeDouble(MarketInfo(Symbol(),MODE_MINLOT),2);
maxlot = NormalizeDouble(MarketInfo(Symbol(),MODE_MAXLOT),2);
if (LotsOptimized==true) lots = NormalizeDouble(((AccountFreeMargin()*Risk)/LotSize)/MaxTrades,GetLotDecimal());
else lots=Lots;
if (lots < MinLots) {lots = MinLots;}
if (MaxLots>0 && 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.