Modify orders

 
I want to modify stop loss and take profit to zero in hegde any one explain please how it is possible
 
Ganesh Kumar: I want to modify stop loss and take profit to zero
Right click on the line.
 
whroeder1:
Right click on the line.

Thanks for your reply. I just need a code to modify previous order of similar symbol in ea.

I try this code too.

for(int i = 0 ; i<OrdersTotal();i++)

      {

         if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))

         {

            if(OrderSymbol() == Symbol() && OrderMagicNumber() == magicNumber)

            {

               tempcount++; 

               if(tempcount == count)

              {   

                      if(OrderType() == OP_BUY)

                      {

                                    modify = OrderModify(OrderTicket(),OrderOpenPrice(),0,0,0,clrRed);

                                    placeorder();

                                    break;

                              }

                           }

                       }

}

}


This code works. But it modify the previously opened order not similar symbol  which  it currently placed.

 
Ganesh Kumar: I just need a code to modify previous order of similar symbol in ea. But it modify the previously opened order not similar symbol  which  it currently placed.
  1. Please use
SRC
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. In the presence of multiple orders (one EA multiple charts, multiple EAs, manual trading)
  3. Drop your counting code. Either you want all open orders to have a SL or you don't. If you don't, then change orders that do.
  4. What you wrote above is unintelligible.
 
Ganesh Kumar:

Thanks for your reply. I just need a code to modify previous order of similar symbol in ea.

I try this code too.

for(int i = 0 ; i<OrdersTotal();i++)

      {

         if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))

         {

            if(OrderSymbol() == Symbol() && OrderMagicNumber() == magicNumber)

            {

               tempcount++; 

               if(tempcount == count)

              {   

                      if(OrderType() == OP_BUY)

                      {

                                    modify = OrderModify(OrderTicket(),OrderOpenPrice(),0,0,0,clrRed);

                                    placeorder();

                                    break;

                              }

                           }

                       }

}

}


This code works. But it modify the previously opened order not similar symbol  which  it currently placed.


whroeder1:
  1. Please edit your post.
    For large amounts of code, attach it.

  2. In the presence of multiple orders (one EA multiple charts, multiple EAs, manual trading)
  3. Drop your counting code. Either you want all open orders to have a SL or you don't. If you don't, then change orders that do.
  4. What you wrote above is unintelligible.


	          
 

Ganesh Kumar:

If you can't understand means, my question is not unintelligable. Thanks for your reply.

Reason: