View Single Post
  #2 (permalink)  
Old 02-28-2006, 05:40 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Thumbs up Money Management!

Quote:
Originally Posted by Alex.Piech.FinGeR
i posting here

proportionate Money Managment for EA's


--
I used an idea of yours:

PHP Code:
//--- Bassed on Alex idea! More ideas are coming
double LotSize()
{
     
double lotMM MathCeil(AccountFreeMargin() * Risk 10000) / 10;
      if (
lotMM 0.1lotMM Lots;
      if (
lotMM 1.0lotMM MathCeil(lotMM);
      if  (
lotMM 100lotMM 100;
      return (
lotMM);

Then:

PHP Code:
if(MM==trueLots LotSize(); //Adjust the lot size 
It' not bad at all !
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Reply With Quote