Blog

Setting up OCO orders in Metatrader4 via VTC ver. 2.x

Back to Table of Contents

What are OCO orders?

OCOs are a pair of orders (or more) which are logically tied together in a sense that, if one order is executed, the other(s) are automatically canceled. This order type is applicable to pending orders only.

How to setup OCO orders in Metatrader using VTC?

Once you have at least 2 pending orders already setup in Metatrader, you can tie them up as OCOs.

This is done in the following manner (depending on the product you are using):

  • Visual Trading Console

    You need to select individual orders by holding down the CTRL key and left-clicking on the left margin, next to the pending order ticket numbers. This will highlight the margin next to the order numbers indicating that they have been selected. (At least two orders need to be selected in order to form an OCO group)

    Now you need to click the “OCO selected” button located on the bottom of the VTC application widow.

  • Visual Trading Console (Multi Terminal version)

    You need to select individual orders by clicking on the check boxes in the check box column, next to the pending order account & ticket numbers. A checked box will indicate that the order has been selected.
    (At least two orders need to be selected in order to form an OCO group)

    Now you need to click the “OCO selected” button located on the bottom of the VTC application widow.

    Notice, you can also OCO orders across multiple accounts.

    TIP: You can also use the “OCO Selected” split button (arrow point on the right side of the button) to quickly select or unselect all visible tickets:

When this is done, you’ll notice that the labels on the selected OCO buttons in the “Clear [OCO]” column will have a ticket number of the first order in the OCO group.

Once any one of the OCO orders is triggered the remaining orders (from the OCO group) will automatically get deleted.

How to add OCO orders to an existing OCO group?

This can be done by following the steps described above – generally, you should setup the group form the start, but this time you need to additionally include the new orders as well.

How to remove OCO orders from the OCO group?

You can remove an OCO order from the group by clicking the OCO button in the “Clear [OCO]” column. This action will remove the selected order from the OCO group and will also remove the group in there are only 2 orders on the group.

Top
8

Comments

  1. Jim  March 4, 2015

    Is it possible to have OCO orders on more than one currency pair? For example, I can set up an OCO on GBPUSD with a pending buy stop and a pending sell stop, but can I also add another OCO on EURUSD with two similar pending orders? Thanks.

    reply
    • admin  March 5, 2015

      Yes. This way as soon as one of the OCO orders belonging to the same group is triggered, all remaining orders from the same OCO group will be deleted.

      reply
      • Jim  March 5, 2015

        What I meant was: can I have two GROUPS, one for each currency pair, so that when the GBPUSD buy triggers it only deletes the GBPUSD pending sell, and leaves the two EURUSD pending orders in place as they would be in a separate group? Thanks.

        reply
        • admin  March 5, 2015

          You can have many OCO groups, but a single ticket (pending order) can only belong to a single OCO group. Hope this answers your question.

          reply
  2. Marco  March 16, 2021

    Hi, i’m interested about the OCO function of VTC.
    My question is: what is happen when the pc, on that is is installed VTC, is shout down? if i restart the program, all the previous OCO are memorized?
    i have 3 pc, can i use VTC in each of them? and what i input in one pc, is automatically copied in the others pc?
    Tanks, Marco (sorry for my english)

    reply
    • admin  May 19, 2021

      Hi,

      VTC is designed to function on a single computer. It is not recommended to run it with the same account on 2 or more computers as it was not designed for this.
      Regarding OCO orders – The trade management logic is automatically retained when you shut down VTC. The softer will continue managing trades as soon as you restart it.

      reply

Add a Comment