July 2011 Order2Go Update
The Order2Go official release is scheduled on July. With this release the update will be required. The new Order2Go version provides a lot of great features such as Stop/Limit orders for US-based accounts and many others (find the full list below). Also, in this release there are a few functions that must be used by all Order2Go users. Without this your Order2Go applications may work improperly (see Critical Changes).
Contents
- 1 Where To Get?
- 2 What's New?
- 2.1 Critical Changes
- 2.2 Trading
- 2.3 Asynchronous Execution
- 2.4 Event Processing
- 2.5 Trading Settings
- 2.6 Price History
- 3 May, 2011 RC1 Update
- 4 Order2Go Hotfix
- 5 Ask Question
- 6 This Article in Other Languages
Where To Get?
The latest development build (Jun, 03 2011) can be downloaded here:
Stand Alone Full Installation (FXOrder2Go.EXE)
Microsoft Installer Merge Module Full Installation (Order2GoMSM.msm)
Microsoft Installer Merge Module Redistributable Modules Only (Order2GoMSMComponents.msm)
C++ Interfaces (cpp.zip)
PDB files (pdb.zip)
What's New?
Critical Changes
In this release there are a few functions that must be used by all Order2Go users. Without this your Order2Go applications may work improperly. Please find a list of these functions below.
Trailing Order Properties per Order Type and Instrument
The following properties will be considered deprecated:
-
TradeDeskAut.GetSystemProperty("TRAILING_STOP_DYNAMIC")
-
TradeDeskAut.GetSystemProperty("TRAILING_STOP_MAX" )
-
TradeDeskAut.GetSystemProperty(“TRAILING_STOP_MIN" )
-
TradeDeskAut.GetSystemProperty("TRAILING_STOP_USED ")
Now these properties are defined per instrument and order type.
You should use the TradingSettingsProviderAut
and PermissionCheckerAut
interfaces to get the same properties but per instrument and order type.
- TradeDeskAut.GetSystemProperty("TRAILING_STOP_DYNAMIC")
- The property is now defined for entry stop, entry limit, stop and limit orders separately. To retrieve the properties, please use the methods of PermissionCheckerAut instead:
-
CanUseDynamicTrailingForEntryLimit
-
CanUseDynamicTrailingForEntryStop
-
CanUseDynamicTrailingForLimit
-
CanUseDynamicTrailingForStop
-
CanUseFluctuateTrailingForEntryLimit
-
CanUseFluctuateTrailingForEntryStop
-
CanUseFluctuateTrailingForLimit
-
CanUseFluctuateTrailingForStop
-
- The property is now defined for entry stop, entry limit, stop and limit orders separately. To retrieve the properties, please use the methods of PermissionCheckerAut instead:
- TradeDeskAut.GetSystemProperty("TRAILING_STOP_MAX" )
- The property is now defined for entry stop, entry limit, stop and limit separately. To retrieve the properties, please use methods of TradingSettingsProviderAut instead:
-
GetMaxTrailingStepForEntryLimit
-
GetMaxTrailingStepForEntryStop
-
GetMaxTrailingStepForLimit
-
GetMaxTrailingStepForStop
-
- The property is now defined for entry stop, entry limit, stop and limit separately. To retrieve the properties, please use methods of TradingSettingsProviderAut instead:
- TradeDeskAut.GetSystemProperty(“TRAILING_STOP_MIN" )
- The property is now defined for entry stop, entry limit, stop and limit separately. To retrieve the properties, please use methods of TradingSettingsProviderAut instead:
-
GetMinTrailingStepForEntryLimit
-
GetMinTrailingStepForEntryStop
-
GetMinTrailingStepForLimit
-
GetMinTrailingStepForStop
-
- The property is now defined for entry stop, entry limit, stop and limit separately. To retrieve the properties, please use methods of TradingSettingsProviderAut instead:
- TradeDeskAut.GetSystemProperty("TRAILING_STOP_USED ")
- The property is now defined for entry stop, entry limit, stop and limit orders separately. To retrieve the properties, please use methods of PermissionCheckerAut instead:
-
CanUseDynamicTrailingForEntryLimit
-
CanUseDynamicTrailingForEntryStop
-
CanUseDynamicTrailingForLimit
-
CanUseDynamicTrailingForStop
-
CanUseFluctuateTrailingForEntryLimit
-
CanUseFluctuateTrailingForEntryStop
-
CanUseFluctuateTrailingForLimit
-
CanUseFluctuateTrailingForStop
-
- The property is now defined for entry stop, entry limit, stop and limit orders separately. To retrieve the properties, please use methods of PermissionCheckerAut instead:
MMR and BaseUnitSize per Account and Instrument
In the new version, to retrieve BaseUnitSize and MMR values, you shouldn’t use the BaseUnitSize
column of the Accounts table and the MMR
column of the Offers table.
Unlike in the previous versions, the values must be obtained for a certain account/offer.
To retrieve the values, you should use methods TradingSettingsProviderAut.GetBaseUnitSize and TradingSettingsProviderAut.GetMMR correspondingly.
Example: Get MMR (O2GO, CS)
Monitoring Status of Connection with Price Server
GetPriceHistory, GetPriceHistoryUTC
and GetPeriods
methods could fail in case they are called before establishing a connection with the price server. For example, if they are called once after login.
In the new version, you should monitor the connection status to prevent failing of methods which work with the price server. They are such methods as: PriceHistoryHelperAut.GetPeriods
(which receives a list of available periods), TradeDeskAut.GetPriceHistory, GetPriceHistoryAsync
and TradeDeskAut.GetPriceHistoryUTC, GetPriceHistoryUTCAsync
(which receive historical prices).
To monitor the status, use events TradeDeskEventsSink.OnPriceSessionStatusChanged or pending events of the kind KIND_PRICESESSIONSTATUSCHANGE
.
Also, Order2Go provides a method TradeDeskAut.IsPriceServerConnected to define whether connection with the price server is established.
If the connection status is other than Connected
, the methods work with the price server shouldn’t be used.
Trading
Stop/Limit for US-Based Accounts (ELS Orders)
Since Close, Stop and Limit orders on individual trades for all United States based accounts are not functional (as they are not compliant with the National Futures Association (NFA)Compliance Rule 2-43 (b), the special approach is required to handle risk management on such accounts. For this purpose, Order2Go supports new order kind - ELS (Entry with Limit and Stop) orders.
ELS Order (Entry with Limit and Stop) is an order which contains two or three orders - a primary (opening) order and one or two secondary (closing) orders. A primary order can be a market or entry order. Secondary orders can be one limit entry and one stop entry whose trade operation is opposite to that of the primary order. All orders in ELS have the same amount. When the primary order is executed, the secondary orders become active and then work like OCO orders - that is when one of them is executed, the other is automatically cancelled. But unlike OCO orders, ELS orders cannot open new positions, just close the existing ones in accordance with the FIFO rules.
- To create an ELS order with a market order as a primary order, use the method TradeDeskAut.OpenTradeELS, OpenTradeELSAsync
- To create an ELS order with an entry order as a primary order, use the method TradeDeskAut.CreateEntryOrderELS, CreateEntryOrderELSAsync
- To change either a secondary stop or limit order associated with the entry order in ELS order group, use the method TradeDeskAut.ChangeEntryOrderStopLimitELS, ChangeEntryOrderStopLimitELSAsync
Example: Create ELS Order(O2GO, CS)
Order Time-In-Force
Order2Go provides the ability to specify the duration of entry orders and immediate open and close orders. The order Time-In-Force defines how long the order will remain active before it is executed or expires.
Immediate Order Time-in-Force
Order2Go provides the ability to specify the duration of an immediate open and close order:
- A GTC order (Good Until Cancelled) indicates that you want to take the full amount of your order. This order may be partially executed.
- An IOC order (Immediate Or Cancel) indicates that you want to take the maximum available amount of the order. This order can be partially executed, and its remaining part will be cancelled when there is no liquidity.
- A FOK order (Fill or Kill) indicates that you want the full amount of your order immediately or not at all.
At Best market orders have one of the three Time-In-Force options: GTC, IOC or FOK.
Market Range orders have one of the two Time-In-Force options: IOC or FOK.
To set the order Time-In-Force, use the following methods:
- TradeDeskAut.OpenTrade3, OpenTrade3Async
- TradeDeskAut.CreateFixOrder3, CreateFixOrder3Async
- [http://www.fxcodebase.com/documents/Order2Go/FXCore.TradeDeskAut.CloseTrade2,%20CloseTrade2Async.html
TradeDeskAut.CloseTrade2, CloseTrade2Async]
Example: Set Time In Force for At Best Market Order (O2GO, CS)
Entry Order Time-In-Force
Order2Go provides the ability to specify the duration of your entry order:
- A GTC order (Good Until Cancelled) indicates that you want the order to remain active until executed or cancelled by you.
- A DAY order indicates that you want the order to remain active until executed, cancelled by you or until the end of the trading day.
To set entry order Time-In-Force, use the following methods:
- TradeDeskAut.CreateEntryOrder4, CreateEntryOrder4Async
- TradeDeskAut.CreateFixOrder3, CreateFixOrder3Async
Choose Trailing Mode
As now the server supports both trailing modes (dynamic and fixed) simultaneously, Order2Go provides the ability to choose a trailing mode for Entry, Net Stop/Limit and regular Stop/Limit orders.
To support trailing orders, Order2Go provides the following data and methods:
- The Trades table contains a new column UntTrlMoveLimit. This column contains the distance (in pips) between the current market price and the price at which the price of the trailing Limit order will change.
- The columns related to a Trailing Stop order (UntTrlMove, TrlMinMove and TrlRate) in the Orders table now make sense not only for regular Trailing Stop, but also for other orders which can be trailing – Entry, Net Stop and Limit, and regular Limit orders.
- The following methods are added to TradeDeskAut:
- TradeDeskAut.OpenTrade3, OpenTrade3Async
- TradeDeskAut.CreateFixOrder3, CreateFixOrder3Async
- TradeDeskAut.CreateEntryOrder4, CreateEntryOrder4Async
- TradeDeskAut.ChangeOrderRate2, ChangeOrderRate2Async
- TradeDeskAut.ChangeEntryOrderStopLimit3, ChangeEntryOrderStopLimit3Async
- TradeDeskAut.ChangeNetStopLimit2, ChangeNetStopLimit2Async
- TradeDeskAut.ChangeTradeStopLimit3, ChangeTradeStopLimit3Async
These methods allow choosing which trailing mode (dynamic or fixed) must be used.
Example: Create Trailing Entry Order (O2G, CS)
Change Entry Order Rate and Amount at Once
With the new method TradeDeskAut.ChangeEntryOrder, ChangeEntryOrderAsync, you can change a rate and amount of an entry order at once.
Execution of Multiple Trading Operations at Once
Now it's possible to execute multiple trading operations ("create", "change" or "delete") at once. For example, you can send a batch with a request to open a position and with two requests to create entry orders. For this purpose, the Order2Go provides the interface OrdersBatchAut. Use the methods of the interface to add requests for creating/changing/deleting of orders to a batch. To execute the requests, call the method OrdersBatchAut.Execute, ExecuteAsync
Check Order Amount in Case of Partial Fills
New columns are added to the Orders table. They are intended to determine the filled and remaining quantities of orders in case of partial fills:
- The
OriginQTY
column shows the original amount of the order when it was placed.
For an opening order this value is always the same. For a closing order this value will change if the position to which this order is attached is partially closed.
- The
FilledQTY
column shows the amount of the last filled portion. Note that in the order deletion message this field has a zero value. - The
Lot
column shows the amount yet to be filled (the remaining amount).
The difference between OriginQTY
and Lot
is the filled amount.
Example: Monitor Order Execution Using Events Handling (O2GO, CS)
RequestOrderStatus
TradeDeskAut.RequestOrderStatus allows you to receive the Fix Status which corresponds to the FixStatus
column of the Orders table.
Asynchronous Execution
Asynchronous Login and Logout
Order2Go provides new asynchronous methods of login and logout:
To get the result of LoginAsync
execution, use events TradeDeskEventsSink.OnSessionStatusChanged or pending events of the kind KIND_SESSIONSTATUSCHANGE
. If an error occurs during login, the status Disconnected
is returned. In this case you can get the text of the error using the TradeDeskAut.LastError
property.
Asynchronous Methods to Get Price History
Order2Go provides new asynchronous methods for getting historical prices:
The methods return RequestID. To get a result of the methods execution, use events TradeDeskEventsSink.OnPriceHistoryCompleted or pending events of the kind KIND_PRICEHISTORYCOMPLETED
.
Event Processing
Events filter
Order2Go provides the ability to set a filter for events. You can set a filter for events to receive only trading events and not receive events caused by data recalculation. The following method and properties are added to TradeDeskAut
:
- Method FXCore.TradeDeskAut.SetTableEventsFilter
- Properties TradeDeskAut.EVENTSFILTER_ALL and TradeDeskAut.EVENTSFILTER_SERVER
Trading Settings
Get All Tiers of Margin
Order2Go allows you to get all three tiers of margin:
- Liquidation margin requirement (LMR, defines the amount of funds required to prevent the liquidation of a one lot position).
- Maintenance margin requirement (MMR, defines the amount of funds required to maintain a one lot position).
- Entry margin requirement (EMR, defines the amount of funds required to open a one lot position).
The new method GetMargins
is added to the TradingSettingsProviderAut class. The method returns true
if the margin policy is three level. In this case you can retrieve MMR/EMR/LMR values from the output parameters of the GetMargins
method. Otherwise, the method returns false
. In this case you can retrieve MMR value from the first output parameter of the method.
Retrieve Trading Sessions and Check Whether PIN is Required
There are users who have multiple accounts of different types and get access to them using the same login/password. These users must specify the identifier of the trading session to log in. There are also users who use PIN to log in. Order2Go provides the following methods and interfaces to retrieve identifiers of trading sessions and to check whether PIN is required:
These methods get a list of all available trading sessions.
The RetrieveTradeSessions
method returns an object of SessionDescriptorEnumAut
The RetrieveTradeSessionsAsync
method is implemented for asynchronous execution. To get a result of the method execution, use events of TradeDeskEventsSink.OnRetrieveSessionsCompleted and TradeDeskEventsSink.OnRetrieveSessionsFailed or pending events of the kinds KIND_SESSIONSLISTCOMPLETED
and KIND_SESSIONSLISTFAILED
.
- New interface SessionDescriptorEnumAut
It is a collection of SessionDescriptorAut
objects. The collection is returned by methods TradeDeskAut.RetrieveTradeSessions, RetrieveTradeSessionsAsync
.
- New interface SessionDescriptorAut
The interface keeps information about a trading session and contains the following properties:
- Description
- Name
- RequirePIN
- SubID
To retrieve the identifier of a trading session, use the property SubID
.
To check whether PIN is required for login, use the property RequirePIN
.
Example: Get Session List (O2GO, CS)
Price History
PriceHistoryHelperAut
The new helper class FXCore.PriceHistoryHelperAut is added for working with historical prices. The class contains the following methods and properties:
-
GetPeriods
(gets identifiers of all price history periods supported by the server). -
GetCandle
(gets the start and end dates of the candle to which a specified date belongs). -
GetTradingDayOffset
(gets the offset between a day's midnight and the date of the beginning of a trading day in the EST time zone). -
GetTradingDayOffsetUTC
(gets the offset between a day's midnight and the specified date in the UTC time zone). -
GetTradingWeekOffset
(gets the offset between a Sunday date and the date of the beginning of a trading week). -
VolumeSupport
(checks whether the server supports the volume).
Example: Create Custom Candle (O2GO, CS)
Support of All Available Time Frames for Price History
All time frames supported by the server are now available in Order2Go. You can get historical prices for any time frame supported by the server using the methods:
- TradeDeskAut.GetPriceHistory, GetPriceHistoryAsync
- TradeDeskAut.GetPriceHistoryUTC, GetPriceHistoryUTCAsync
To receive a list of available periods, use the method PriceHistoryHelperAut.GetPeriods
Example: Get List of Supported Time Frames (O2GO, CS)
Tick Volume
Price history now contains tick volume. The Volume
property is added to the MarketRateAut class. To define whether the server supports tick volume, use the property PriceHistoryHelperAut.VolumeSupport
Example: Get Tick Volume (O2GO, CS)
May, 2011 RC1 Update
May, 10 2011 the RC version has been updated:
1) The tables, orders, error message documentation has been updated to reflect the latest changes on the server side.
Problems fixed: 1) GetMargins returns an internal exception when calling the method for non-subscribed symbols.
2) Incorrect error message when login with empty/incorrect username.
3) GetMargins method returns zeros for some accounts.
4) No events after execution of the method ChangeEntryOrderAsync.
5) Impossible to create ELS order with a primary "market range" order.
Order2Go Hotfix
There are the following issues in the production release of Order2Go (01.07.070811):
- An issue with CFDs trading on UK accounts. Sometimes you get the error "The command is disabled" when trying to create an order for CFD. The problem occurs because the Order2Go gets incorrect trading hours for CFDs.
- An issue with frequent unnecessary updates of MMR. The problem causes over-usage of the CPU for users who have dozens of accounts with 3-level margin.
- An issue with zero PointSize after receiving instrument updates. The problem occurs on systems with a separate price channel.
- An issue with creating Stop and Limit orders for an existing entry order on US accounts.
- No price coming after 'Disconnected' and then reconnected again
- OCO orders error: Could not join into the OCO specified requests types
- Stop/Limit rates in pips is not updating when modifying an order
- Fail to place Open Range order
To get fixes for all these issues, download the Order2Go release here:
Stand Alone Full Installation (FXOrder2Go.EXE)
Microsoft Installer Merge Module Full Installation (Order2GoMSM.msm)
Microsoft Installer Merge Module Redistributable Modules Only (Order2GoMSMComponents.msm)
C++ Interfaces (cpp.zip)
PDB files (pdb.zip)
Ask Question
Please free to discuss this release at the following forums:
- To ask the question please visit:
- the Discussion/Support Forum|Order2Go COM Trading API Support at http://fxprogrammers.com site.
- the Order2Go API forum at fxcodebase.
This Article in Other Languages
Language: | English • español |
---|