i posting here
proportionate Money Managment for EA's
--I used an idea of yours:
double LotSize()
{
double lotMM = MathCeil(AccountFreeMargin() * Risk / 10000) / 10;
if (lotMM < 0.1) lotMM = Lots;
if (lotMM > 1.0) lotMM = MathCeil(lotMM);
if (lotMM > 100) lotMM = 100;
return (lotMM);
}[/PHP]
Then:
[PHP]if(MM==true) Lots = LotSize(); //Adjust the lot size
It' not bad at all !
proportionate money managment for Metatrader EA's
double LotSize()
{
int Lotsaccretion = 250; // account accretion
int LotsMarginForOne = 100; // margin for one trade
int LotsMax = 1000; // max. number of lots
int k=LotsMarginForOne;
for (double i=2; i<=LotsMax; i++)
{
k=k+i*Lotsaccretion ;
if (k>AccountFreeMargin())
{
Lots=(i-1)/10; break;
}
}
if (Lots<0.1) Lots=0.1;
return(Lots);
}
--

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
i posting here
Fractionally-proportional Money Managment for EA's
--