Thread: Martingale EA
View Single Post
  #287 (permalink)  
Old 01-29-2008, 10:57 PM
wolfe's Avatar
wolfe wolfe is offline
Senior Member
 
Join Date: Jan 2006
Posts: 820
wolfe is on a distinguished road
Quote:
Originally Posted by matrixebiz View Post
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
Thanks matrixebiz,

Shouldn't be too hard to figure out.

Everyone realizes that MM will only effect the first order of a cycle right?
Reply With Quote