EA Martingale Continue Martingale but don't open fresh new trades

 

Can anyone help with coding  no TRADE ON FRIDAY"? I don't want it to open any new lot on Friday but I want Martingale to continue buying higher lots until it exits in profit.  

I'm using DaytoTrade() under order management   but it stops all trading. I want it to continue Martingale until the trade closes in profit. This is an EA I found online and I want to edit it to use stop Friday trading.

//+------------------------------------------------------------------+
//| order management                                                 |
//+------------------------------------------------------------------+
int ordermanagement()                   // we manage our orders here
{
   if(ordercount()==0 && DaytoTrade())                  // when there is no opened orders 
   {
      if(getsignal()=="buy")            // when buy signal is appeared
      {
        if(sendorder(OP_BUY,mylot(),    // we send our buy order into
           Ask,Ask-StopLoss*pt,         // broker's server then we out
           Ask+TakeProfit*pt,           // from this cycle to avoid
           Blue)>0) return(0);          // errors possibility
      }
      if(getsignal()=="sell")           // same procces as buy signal
      {
        if(sendorder(OP_SELL,mylot(),
           Bid,Bid+StopLoss*pt,
           Bid-TakeProfit*pt,
           Red)>0) return(0);
      }
   }
   if(TrailingStop>0) trailingstop(); // we calling trailing stop function
                                      // if TrailingStop value bigger than 0
   if(MoveToBreakEvent) breakevent(); // we calling breakevent function here
   return(0);
}



 
edtradernow: Can anyone help
Help you with what? You haven't stated a problem. Show us your attempt (using CODE button) and state the nature of your problem.
          No free help
          urgent help.
 
whroeder1:
Help you with what? You haven't stated a problem. Show us your attempt (using CODE button) and state the nature of your problem.
          No free help
          urgent help.
see the code above and what I did.
 
edtradernow:
see the code above and what I did.

What you did ? Don't lie to us, it's not your code.

 
Alain Verleyen:

What you did ? Don't lie to us, it's not your code.

it's a free Martingale EA and I want to edit it to stop trading on Friday.  
 

Your code:

//+------------------------------------------------------------------+
//| order management                                                 |
//+------------------------------------------------------------------+
int ordermanagement()                  
{
   if(ordercount()==0 && DaytoTrade())                
   {


Change it as follows:

//+------------------------------------------------------------------+
//| order management                                                 |
//+------------------------------------------------------------------+
int ordermanagement()                   
{
   bool MartingaleFriday = (DayOfWeek() == 5) && (mylot() > StartLot);

   if(ordercount()==0 && (DaytoTrade() || MartingaleFriday))          
   {
Reason: