How do I set Order Cancels Order (OCO) on MT5 with PC?

 
Please How do I set Order Cancels Order (OCO) on MT5 with PC?
 
Chinedum Jesse Mgbikeh: Please How do I set Order Cancels Order (OCO) on MT5 with PC?

MetaTrader does not support it natively. It has to be implemented via an EA.

Here is one such example described in an Article: MQL5 Cookbook: ОСО Orders

But there are other implementations in the CodeBase, so run a search there.

 
Chinedum Jesse Mgbikeh: Please How do I set Order Cancels Order (OCO) on MT5 with PC?

Stop using pending orders. There is no need to create pending orders in code.

  1. The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)
  2. Don't worry about it unless you're scalping M1 or trading news.
  3. Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.
 
Fernando Carreiro #:

MetaTrader does not support it natively. It has to be implemented via an EA.

Here is one such example described in an Article: MQL5 Cookbook: ОСО Orders

But there are other implementations in the CodeBase, so run a search there.

Wow, okay.

Thank you for your response. I appreciate.

 
William Roeder #:

Stop using pending orders. There is no need to create pending orders in code.

  1. The pending has the slight advantage, A) you are closer to the top of the queue (filled quicker), B) there's no round trip network delay (filled quicker.)
  2. Don't worry about it unless you're scalping M1 or trading news.
  3. Humans can't watch the screen 24/7, so they use pending orders; EAs can, so no need for pending orders, have it wait until the market reaches the trigger price and just open an order.

Exactly, you've said it!

I'm trading news that's why I was trying to find out how to use OCO. I prefer market execution to pending orders for my regular trading, but OCO would be beneficial to me for trading news.

Thank you for your response.