Download MetaTrader 5

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

To add comments, please log in or register
Having a great idea? Share it on the traders' Forum!
Ant469
106
Ant469 2015.01.03 11:16 

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
30736
Alain Verleyen 2015.01.03 11:35  
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
9895
Rodrigo Malacarne 2015.01.03 11:38  
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 2015.01.03 11:42  

Ah I see. Great, thanks for your help. 

To add comments, please log in or register