OCO orders (OCO, One-Cancels-the-Other, one order cancels the other) are a pair of orders, the execution of one of which automatically leads to the cancellation of the other.
Thanks to Verdure OCO EA, this functionality is now available in MT4.
The Expert Advisor is an effective implementation of the popular principle of OCO orders with additional advantages, functions and parameters. The Expert Advisor simplifies the work of managing trades and can be especially useful for traders who use stops and reversals (stop and reverse), pivot points (pivots), Fibonacci levels, support and resistance, as well as pending orders in their trading systems. In addition, it is an indispensable tool for traders who trade on the news.
Stop and reverse trading)
When using the stop-flip principle (especially in volatile markets, when there is often no time to quickly close the previous order before opening a new one in the opposite direction), the Verdure OCO Expert Advisor simplifies the task by automatically closing the opposite order when the other one is activated. You do not need to close a sell order before placing a buy order. Verdure OCO will automatically close your sell order as soon as the buy order becomes a market order.
[spoiler title=”Read More…”]
Trading on pivot points( pivots), Fibonacci levels, as well as support and resistance using pending orders
If you are trading on a breakout level using pivots, Fibonacci levels, or support and resistance levels, etc., you now have an effective tool that allows you to significantly save time when observing and working with positions. For example, you can place two pending orders-buy stop, in case the price breaks the resistance level, and sell stop, if the price falls below the support level.
Usually, after one of the orders is triggered, the second one must be deleted. The Verdure OCO Expert Advisor will allow you not to sit in front of the price chart waiting for the order to be triggered. Just set up your two orders and go about your business. You can also disable the ‘managependingorders’ option. In this case, the opposite order will not be deleted. In this case, it is recommended that the orders have stop loss and/or take profit levels. In any case, Verdure OCO will do the job.
If you use pending orders to calculate the time to enter the market, OCO orders will help you control the opening of trades and reduce the time spent on monitoring the charts.
Pending orders are very useful when you want to take advantage of a correction to make a profit, that is, when you buy at the low of the trend or sell at the peak. In any case, Verdure OCO can help you.
Trading by News
Let’s assume that an important news for the USD is expected to be released at 9 am. Based on your analysis, you believe that this news will lead to a fall in the USD. In this case, you can place a BUY STOP order on EURUSD immediately before the news release, in the expectation that your analysis will be confirmed. However, given the unpredictability of the market at the time of the release of important news, you can also set a SELL STOP order in case your forecast turns out to be incorrect.
If your analysis is justified and the USD goes down, this will lead to an increase in the EURUSD pair and trigger your BUY STOP order. The Verdure OCO Expert Advisor will delete your SELL STOP order as soon as the BUY STOP order becomes a market order. If your forecast turns out to be wrong and the USD starts to grow, this will cause the pair to fall and trigger a SELL STOP order. In this case, Verdure OCO will delete your BUY STOP order as soon as the SELL STOP order becomes a market order.
- Save time when tracking and managing pending orders.
- Detection and notification of orders for the same instrument in the same direction.
- An obvious benefit for traders who trade on the news.
- GLOBAL and LOCAL modes. In the first case, the Expert Advisor manages all orders on the account, and in the second-only orders for the symbol on which the Expert Advisor is installed. For more information, see the “Modes” section.
- All the actions of the Expert Advisor are recorded on the “Experts” tab for analysis (maximum transparency).
- You can configure sending push notifications about all actions to the mobile terminal.
- You can set up sending emails about all actions.
- You can configure the generation of alerts about all actions.
- exclude_magic – a comma-separated list of magic numbers that should be excluded from processing by the Verdure OCO Expert Advisor. This is especially useful if you don’t want the Verdure OCO Expert Advisor to not manage orders placed by other Expert Advisors.
- mode – the mode of operation of the Expert Advisor (LOCAL or GLOBAL-see the section “Modes”).
- managependingorders – managing pending orders (TRUE or FALSE-see the section “Managing pending orders”).
- checkduplicateorders – whether the EA should check for the presence of identical orders on the same symbol in the same direction, for example, two positions to buy EURUSD (TRUE or FALSE-see the section “Checking for the presence of identical orders”).
- sendemail-sending emails to the address specified in the settings of MetaTrader 4.
- pushnotification-sending push notifications to the mobile terminal.
- alert-play an audio signal.
Local-in LOCAL mode, the Expert Advisor only manages positions on the symbol on which it is set, that is, if you run the Expert Advisor on the EURUSD pair, it will only manage positions on EURUSD. When placing the Expert Advisor on several symbols, you will need to set a different value for the ‘magicnumber’ parameter for each of them.
Global-in GLOBAL mode, the Expert Advisor manages all positions on the account, regardless of the chart on which it is launched. When placing the Expert Advisor on several charts, you will need to set a different value for the ‘magicnumber’ parameter for each of them. I strongly recommend that you do not run the Expert Advisor on multiple charts in GLOBAL mode.
The default mode is LOCAL.
Managing pending orders (the ‘managependingorders’ parameter can be True or False. By default, True).
- Development of events when False: If you set a Buy order when there is a pending Sell Stop or Sell Limit order, this pending order is not deleted, since the Expert Advisor does not check pending orders if the managependingorders parameter is False.
- Development of events when True: If you place a Buy order when there is a pending Sell Stop or Sell Limit order, this pending order will be deleted, since the buy order cancels the pending orders (they are directed in opposite directions).
Checking for the presence of identical orders (the ‘checkduplicateorders’ parameter can be True or False. By default, False).
- False scenario: If you already have a Sell order for EURUSD and you place another such order on the same pair, the EA ignores this fact (alerts, emails, and / or notifications are not sent).
- Development of events when True: If you already have a Sell order for EURUSD and you place another such order on the same pair, the Expert Advisor pays attention to it (an alert is shown to the trader, an email and / or a notification is sent). This allows the trader to decide whether to close one of the orders or leave both open.
Note: If your trading system allows multiple orders to be opened in the same direction, simply set the checkduplicateorders parameter to False. On the “Discussion” tab, you will find additional information and resources on OCO orders.