Download MetaTrader 5

Pure_Martingale - change entry condition

To add comments, please log in or register
bizonul85
7
bizonul85  

Hi all,

 I like EA Pure_Martingale but have entry random. Can we change that, to have entry one-by-one (like: buy-sell-buy-sell-etc)?

Should be something like: a new entry to depends of previous one or if we have BUY order, next should be SELL and so on.... 

 Can somebody help me? Thank you.

//////////////////////////////////////////////////////////////////////////////////////////////////
// calculate random number
int Random()
{   
    MathSrand(TimeLocal()+Bid);
    return(MathRand());
}   
//////////////////////////////////////////////////////////////////////////////////////////////////  
bool EnterBuyCondition()
{ 
   if(MathMod(Random(),2)==0)
      return(true);
      
   return (false);   
}

//////////////////////////////////////////////////////////////////////////////////////////////////
bool EnterSellCondition()
{ 
   if(MathMod(Random(),2)==1)
      return(true);
      
   return (false);   
}

//////////////////////////////////////////////////////////////////////////////////////////////////
To add comments, please log in or register