Contingent Orders

From FxCodeBaseWiki
Jump to: navigation, search

What are contingent orders

Contingent orders are combinations of two or more entry orders linked by certain conditions of their execution.

The contingent orders help automating the trading process that allows placing orders faster and make use of favorable market situation more efficiently.

FXCM offers the following types of contingent orders:

  • OCO (One Cancels the Other)
  • OTO (One Triggers the Other)
    • If-Then
  • OTOCO (One Triggers One Cancels the Other)
    • If-Then OCO

OCO (One Cancels the Other)

The order consists of two or more entry orders of any instrument, amount, or trading direction. When an OCO order is placed, all its orders become active. Then, when the market price hits either of the orders, it gets executed, a position in accordance with the order settings opens, and the remaining orders are canceled. The picture below provides an example of how an OCO order is presented in the Orders window of the Trading Station.

OCO.png

OTO (One Triggers the Other)

The order consists of two or more entry orders of any instrument, amount, or trading direction: one primary order and one or more secondary orders. When the primary order gets executed, it opens a position and triggers (activates) the secondary order or orders of the first level. Please note that any secondary order of the first level can be a primary order of a secondary order of the second level. The picture below provides an example of how an OTO order is presented in the Orders window of the Trading Station.

OTO.png

If-Then

If-Then is a variation of the OTO order. It consists of two or more entry orders of any instrument, amount, or trading direction and works as OTO does with the only difference that its primary order has no amount value (it is always 0) and specified trading direction. Thus, the order is not executed (no position is opened) when the market price hits it. Instead it gives a signal for (triggers) an activation of the secondary order of the first level. In this case, the primary order just sets a condition for the secondary order activation. The picture below provides an example of how an If-Then order is presented in the Orders window of the Trading Station. Please note that it is listed under the OTO heading.

IfThen.png

OTOCO (One Triggers One Cancels the Other)

The order consists of three or more entry orders of any instrument, amount, or trading direction: one primary order and two or more secondary orders. The secondary orders form a regular OCO order. When the primary order gets executed, it opens a position and triggers (activates) all the secondary (OCO) orders. Later on, when the market price hits ether of the secondary (OCO) orders, it gets executed and cancels the other secondary (OCO) order or orders. The picture below provides an example of how an If-Then order is presented in the Orders window of the Trading Station.

OTOCO.png

If-Then OCO

If-Then OCO is a variation of the OTOCO order. It consists of three or more entry orders of any instrument, amount, or trading direction and works as OTOCO with the only difference that its primary order has no amount value (it is always 0) and specified trading direction. Thus, the order is not executed (no position is opened) when the market price hits it. Instead it gives a signal for (triggers) an OCO order placement. In this case, the primary order just sets a condition for the secondary (OCO) order activation. The picture below provides an example of how an If-Then order is presented in the Orders window of the Trading Station. Please note that it is listed under the OTOCO heading.

IfThenOCO.png

When to use contingent orders

In some way, the contingent orders are similar to strategies: both set algorithms of operation procedures, thus, automating the trading process. One can write a strategy that can be used instead of a contingent order, but writing a strategy requires additional skills, efforts, and time. Besides, when it is written, a strategy is kept on the computer and, before being applied, needs receiving the market rates from the server, evaluating them, and sending a request for placing orders back to the server again. The contingent orders are standard trading tools incorporated into the FXCM trading system and, when used, eliminate the need for writing strategies and executing additional operational contacts between the computer and the server.

Scenario 1

A trader spots a presence of a ranging market with the prices moving up and down within imaginary horizontal boundaries. It is quite natural that a trader may want to make profit on as many trend reversals as possible. To accomplish this, use an OTO order.

On a FIFO account, place the primary order at the expected reversal point in the direction of the new trend, set the rate of the secondary order of the first level at another anticipated point of reversal and in the direction of the new trend (opposite to the direction of the primary order). Note that the size of the secondary order amount can cause various developments (see earlier in the article), so set its amount in accordance with your strategy: a secondary order with the amount greater than the amount of the primary order will not only close the primary order position with profit but will open a new position in the direction of the new trend. To close the position opened by the secondary order of the first level, place a secondary order of the second level at the next anticipated point of trend reversal in the direction of the new trend. If you want just to close the previously opened position with some profit, match the amount of the position. To place one more order, set the amount greater than the one of the previous position. Set the other parameters in accordance with you plans.

On a NON-FIFO account, it is allowed opening positions in different trading direction for one and the same instrument. Thus, when you place an OTO order, the secondary order execution does not close the position opened by the primary order but simply opens a new position in accordance with the order settings. Therefore, to carry out the strategy described for FIFO accounts, place Stop and Limit orders to close the positions opened by the previous orders. It can be done directly from the Create Contingent Order dialog box.

Scenario 2

Contingent orders can be placed for different instruments: the primary order is placed for one instrument and the secondary order - for another one. The best results are achieved on correlated instruments. Instruments are correlated when one instrument mimics or follows the price movements of another instrument (for example, EUR/USA and EUR/GBR) or moves in the opposite direction (for example, EUR/USA and EUR/JPY). Working with such instruments, a trader can foresee the price movement of one instrument on the basis of the behavior of its correlated instrument. You can place an OTO, or If-Then order in the expected direction with the primary order of the first instrument and the secondary order of the second instrument.

Scenario 3

When a trader expects a price movement of one instrument and assumes that it will cause a movement of another instrument but is not sure in what direction, he can place an OTOCO, or If-Then OCO order with the primary order of the first instrument and the secondary order of the second instrument.

Scenario 4

Please see article http://fxcodebase.com/wiki/index.php/OCO_Order for more scenarios for using OCO orders.

How to work with contingent orders

For information on how to create the contingent orders, go to Trading Station Help [1].

Please note:

  1. If a trader has more than one trading account, the contingent orders must be placed using one and the same account.
  2. Depending on the type of the account (FIFO/NON-FIFO), the OTO order works in two different ways when a trader places orders in opposite trading directions on one and the same instrument.
    On a FIFO account: The execution of the secondary order either closes the open position in full (if its amount is equal to the primary order amount) or partially (if its amount is smaller than the primary order amount) or closes the open position in full and opens a new position in accordance with the order settings (if its amount is greater than the primary order amount).
    On a NON-FIFO account: The execution of the secondary order opens a new position in accordance with the order settings.