Download MetaTrader 5

Stop entry orders with OCO (One cancels the other)?

To add comments, please log in or register
Ant469
106
Ant469  

Hello

Please could somebody tell me if it is possible to program an EA with Stop entry orders with OCO (One cancels the other)? 

For example, when trading Donchian channels, the EA would place Stop entry orders slightly beyond the upper and lower part of the channel and when one order is placed, the other is cancelled. 

Thanks 

Alain Verleyen
Moderator
32753
Alain Verleyen  
Ant469:

Hello

Please could somebody tell me if it is possible to program an EA with Stop entry orders with OCO (One cancels the other)? 

For example, when trading Donchian channels, the EA would place Stop entry orders slightly beyond the upper and lower part of the channel and when one order is placed, the other is cancelled. 

Thanks 

There is not OCO orders with MT4/MT5. You can mimic them with an EA on Terminal side, but you won't have the same security level.
Rodrigo Malacarne
Moderator
10250
Rodrigo Malacarne  
Ant469:

Please could somebody tell me if it is possible to program an EA with Stop entry orders with OCO (One cancels the other)? 

For example, when trading Donchian channels, the EA would place Stop entry orders slightly beyond the upper and lower part of the channel and when one order is placed, the other is cancelled. 

Hello Ant469,

OCO orders are not natively present in MT5. However, you can easily do that programmatically.

Basically you have to send 2 stop entry orders. After identifying the execution of one order, you need to delete the other pending order.

As said, all that programmatically. But it's perfectly possible to be done.

Regards,
Malacarne 

Ant469
106
Ant469  

Ah I see. Great, thanks for your help. 

To add comments, please log in or register