Thread: Martingale EA
View Single Post
  #284 (permalink)  
Old 01-29-2008, 09:45 PM
matrixebiz's Avatar
matrixebiz matrixebiz is offline
Senior Member
 
Join Date: Oct 2006
Posts: 1,212
matrixebiz is on a distinguished road
I have two identical EA's, except one has Money Management added.
This is the only the code that was added when compared the two;
Code:
extern bool    UseMM  = true;  // 1 = true & 0 = false
extern double  Risk    = 5;    // percent of account equity to risk per trade
and

Code:
   //         ====== Money Management of Lot Size routine ======  

if(UseMM) 
      {
         Lots=AccountEquity()* Risk/100/1000;
         if( Lots>0.1 )
            {
               Lots=NormalizeDouble(Lots,1); 
            }
               else 
               Lots=NormalizeDouble(Lots,2);
      }
Hope it helps

Last edited by matrixebiz; 01-29-2008 at 09:47 PM.
Reply With Quote