View Single Post
  #3 (permalink)  
Old 03-01-2006, 01:20 PM
Alex.Piech.FinGeR's Avatar
Alex.Piech.FinGeR Alex.Piech.FinGeR is offline
Senior Member
 
Join Date: Oct 2005
Location: Germany
Posts: 305
Alex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud of

proportionate money managment for Metatrader EA's


PHP Code:

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=2i<=LotsMaxi++)
    {
      
k=k+i*Lotsaccretion ;
      if (
k>AccountFreeMargin())
      {
        
Lots=(i-1)/10; break;
      }
    }

  
if (
Lots<0.1Lots=0.1;

return(
Lots);


--

Last edited by Alex.Piech.FinGeR; 03-01-2006 at 01:23 PM.
Reply With Quote