KEMBAR78
Orc Trader Spreadsheet Link | PDF | Microsoft Excel | Visual Basic For Applications
0% found this document useful (0 votes)
17 views59 pages

Orc Trader Spreadsheet Link

The Orc Trader Spreadsheet Link provides a high-performance Real-Time Data connection between Orc Trader and Microsoft Excel, allowing users to build custom trading tools and submit orders directly from Excel. Installation requires Orc Trader+, Microsoft Excel 2007 or later, and administrative privileges. The document includes detailed instructions on setting up links, using VBA for order management, and adjusting Excel's update rates for optimal performance.

Uploaded by

asdafs;gd safd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views59 pages

Orc Trader Spreadsheet Link

The Orc Trader Spreadsheet Link provides a high-performance Real-Time Data connection between Orc Trader and Microsoft Excel, allowing users to build custom trading tools and submit orders directly from Excel. Installation requires Orc Trader+, Microsoft Excel 2007 or later, and administrative privileges. The document includes detailed instructions on setting up links, using VBA for order management, and adjusting Excel's update rates for optimal performance.

Uploaded by

asdafs;gd safd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

Orc Trader Spreadsheet Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1. Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Orc Trader Spreadsheet Link reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3. Orc Trader Spreadsheet Link VBA library reference . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Orc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
OrcContracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
OrcMarkets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
OrcOrders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
OrcPortfolios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
OrcRtd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
OrcStrategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Volatility surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
OrcUnderlyings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Class Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
OrcDefines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Copyright © 2014, Orc Group

Orc Trader Spreadsheet Link


Orc Trader Spreadsheet Link provides a high-performance Real-Time Data (RTD) connection between Orc Trader and
Microsoft Excel®.
Build custom desktop trading tools to visualize or analyze trading data and portfolio positions exactly the way you want it.
Create and submit orders.
Using the Real-Time Data (RTD) standard instead of the DDE protocol (Dynamic Data Exchange) improves stability of the
linking and allows sending orders from MS Excel.

Installing Orc Trader Spreadsheet Link


Setting up links between Orc Trader+ and Microsoft Excel® requires the Orc Trader Spreadsheet Link installer, Orc Trader+
and Microsoft Excel® 2007 or later.
Orc Trader Spreadsheet Link is provided as a compressed archive including the file OrcTraderSpreadsheetLink.msi. Run
the installer by double-clicking OrcTraderSpreadsheetLink.msi and follow the instructions. Note that the installation requires
administrative privileges.

3
Copyright © 2014, Orc Group

Getting started
Setting up an Orc-Excel link
To set up a link to an Excel sheet from a trading page, a Parameter Overview window, or a Portfolio window:
1. Open OrcTraderSpreadsheetLink.xlam.
The Excel add-in .xlam file can be found in the Start menu under \Orc\Orc Trader Spreadsheet Link\Orc Trader
Spreadsheet Link Excel Library or installed under \Program files\Orc\Orc Trader Spreadsheet Link\

2. In the Orc Trader+ window (Trading page/Parameter Overview window/Portfolio window), select a region of cells or
possibly the whole window pane.

3. Select Orc menu bar>Edit>Copy Spreadsheet Link

4. In Excel, select Excel menu bar>Edit>Paste to insert the selected columns from the active Orc window into your
Excel sheet.
The Excel column values are then updated in real time to always correspond with the values in the Orc window
columns.

5. When you save your Excel file, make sure you save it as a Excel Macro-Enabled Workbook (*.xslm).

Pasting a large number of links between Orc Trader+ and Excel might take some time to process. Note
that it is not recommended to open a workbook containing many links, or to paste many links to a
worksheet, while receiving updates to those cells in OT+.

Example linking data from Orc Trader+ to Excel manually


The following gives an example of how to link data from Orc Trader+ to Excel manually:
Start Orc Trader+

Open the Excel document named OrcTraderSpreadsheetLink.xlam found in \Program files\Orc\Orc Trader
Spreadsheet Link. This will load the Visual Basic for Applications (VBA) library that contains functions needed to
communicate with Orc Trader+.

When loading OrcTraderSpreadsheetLink.xlam, you will be prompted with a Microsoft Excel Security
Notice if you have not enabled macros. Click Enable Macros to continue and access the Orc Trader
Spreadsheet Link functionality.

Create a new workbook by selecting Blank workbook on the File menu (File>New>Blank workbook).

For example, to link the bid price of a contract with the Feedcode 10007 on the MGF Test SD market (Market ID =
471) in Orc Trader+ to Excel, enter the following code in the Excel spreadsheet cell:

=OtRtdContractFieldMfc(471, "10007", "TBIDCOLUMN")

The example is using "," as list separator. Depending on your regional settings, you may have to use ";"
as list separator instead.

For more contract field examples and other ways to identify contracts, see Orc Trader Spreadsheet Link reference.

Running multiple Orc Trader+ clients


Orc Trader Spreadsheet Link does not support linking from multiple OT+ clients simultaneously. If multiple OT+ clients are
running at the same time, Excel will be linked to the OT+ client started most recently.

4
Copyright © 2014, Orc Group

Getting started with VBA

Macro settings in Excel


To access the Macro/VBA (Visual Basic for Applications) section you need to enable the Developer tab in Excel. Macros
are usually disabled by default and can be enabled using the Trust Center Settings.
In Excel 2013:
Enable the Developer tab: File > Options > Customize Ribbon > Select Developer > click Add>>
Enable macro: File > Options > Trust Center > Trust Center Settings > Macro Settings > Enable all
macros
In Excel 2010:
Enable the Developer tab: File > Help > Options > Customize Ribbon > Select Developer
Enable macro: File > Help > Options > Trust Center > Trust Center Settings > Macro Settings > Enable
all macros
In Excel 2007:
Enable the Developer tab: Office button > Excel Options > Show the Developer tab in the ribbon
Enable macro: Office button > Excel Options > Trust Center > Trust Center Settings > Macro Settings >
Enable all macros

Enable Orc Trader Spreadsheet Link VBA library


To use the Orc VBA functionality, a reference to OrcTraderSpreadsheetLink.xlam needs to be added according to the
following:
Open the Visual Basic editor in Excel: Developer tab > click Visual Basic
Open the References dialog box: Tools > References
To add reference to the Orc Trader VBA library:
If you opened and are working in OrcTraderSpreadsheetLink.xlam: OrcTrader should be listed in the Available
References list. Select OrcTraderSpreadsheetLink and click OK
If you did not open OrcTraderSpreadsheetLink.xlam earlier but is working in another workbook: click Browse, select
Microsoft Excel Files in the Files of type list. Navigate to \Program files\Orc\Orc Trader Spreadsheet Link wher
e OrcTraderSpreadsheetLink.xlam is located, select OrcTraderSpreadsheetLink.xlam, click Open, and click OK

Sending orders from Excel


Orc Trader Spreadsheet Link enables sending orders from Excel. The following displays an example on adding an order
from Excel using VBA. For more information on adding orders, see OrcOrders in the Orc Trader Spreadsheet Link VBA
library reference.

5
Copyright © 2014, Orc Group

Add order example:

Sub AddOrder()

Dim order As OtDictionary


Set order = OtCreateDictionary

order.Add OtOrderContractTag, 10615


order.Add OtOrderIsActive, True
order.Add OtOrderIsOnExchange, True
order.Add OtOrderSide, OtOrderSideSell
order.Add OtOrderPrice, 10.5
order.Add OtOrderVolume, 25

On Error GoTo Error


Dim orderKey As OtOrderKey
Set orderKey = OtOrderAdd(order)

MsgBox "Order added, tag: " & orderKey.Tag


Exit Sub

Error:
MsgBox "Order could not be added: " & Err.Description

End Sub

Order types
Order type is specified as a string. Should equal the value in the Type list menu in the Orc Trader+ order panel.

If the order type is misspelled, Orc Trader+ will add the order as a standard Limit order.

Orc Trader Spreadsheet Link supports all order types that Orc Trader+ supports, provided that the required order type fields
are among the supported order fields specified in the OrcDefines section of the Orc Trader Spreadsheet Link VBA library
reference.
Slice orders are also supported, see the OrcOrders section in Orc Trader Spreadsheet Link VBA library reference for
information and usage example.

order.Add OtOrderType, "At Market"

Additional data
To add additional data to an order sent from Excel, add the additional data key to the order dictionary in the
previous example. For more information on additional data keys, refer to the Orc Protocol Specification. The
following shows an example using the additional data Valid until time (_VT) and Counterpart (_CP):

order.Add OtAdditionalDataPrefix & "_VT", 153000


order.Add OtAdditionalDataPrefix & "_CP", "Bank"

Setting contract parameters from Excel


Orc Trader Spreadsheet Link can set some contract parameters. To set a parameter, use the column name received when
clicking Orc menu bar>Edit>Copy Link in Orc Trader. For a list of supported parameters, see the OtSetContractValueTa
g/OtSetContractValueMfc contract fields section of OrcDefines.

OtSetContractValueMfc 471, "10007", "TPRICEMULTIPLIERCOLUMN", 2.0

6
Copyright © 2014, Orc Group

Get volatility surfaces in Excel


Information about volatility surfaces can be retrieved in Excel:

Dim surface As OrcDictionarySet surface = OtGetVolatilitySurfaceForName("MySurface")


Debug.Print "Surface name: " & surface.Item(OtVolatilitySurfaceName)
' Output: "Surface name: MySurface"

Hints

Adjust Excel update rate


Excel automatically limits the rate at which it checks for updates and the default update interval is 2000 milliseconds.
Follow the steps below to adjust the update interval by increasing the rate in Excel:
1. Open Visual Basic Editor (ALT+F11).
2. Open the Immediate window (CTRL+G).
3. Enter the following and press Enter:

Application.RTD.ThrottleInterval = 1000

4. To verify that throttling rate is set correctly, enter the following and press Enter:

? Application.RTD.ThrottleInterval

The result should correspond to the set rate (1000).

Automatically set the Excel update rate when opening a workbook


In case the standard Excel update rate of 2000 milliseconds is not satisfactory and another update rate is always required
for a workbook, follow the steps below to automatically set the desired Excel update rate every time the workbook is
opened:
1. Open Visual Basic Editor (ALT+F11).
2. In the Project Explorer (CTRL+R), right-click the "ThisWorkbook" object (found under VBAProject/Microsoft Excel
Objects), and select View Code.
3. In the left list menu of the code window, select Workbook.
4. In the right list menu of the code window, select Open (if not already selected automatically).
5. In the Sub automatically generated by Excel in the code window, set the desired Excel update rate according to the
following example:

Private Sub Workbook_Open()


Application.RTD.ThrottleInterval = 500
End Sub

7
Copyright © 2014, Orc Group

Log messages from OT+ Orc.log


To print SpreadsheetLink logging to the OT+ log file (Orc.log), ensure that the following is included in OrcTraderPlu
s.exe.config. This will be configured automatically when an Orc Trader+ with Spreadsheet link is installed.

<system.diagnostics>
<sources>
<source name="Orc.SpreadsheetLink"
switchName="sourceSwitch"
switchType="System.Diagnostics.SourceSwitch">
<listeners>
<add name="otListenerShared" />
</listeners>
</source>
</sources>
<switches>
<!-- Change the following line to enable more logging on Spreadsheet link -->
<!--<add name="sourceSwitch" value="Verbose"/>-->
<add name="sourceSwitch" value="Warning"/>
</switches>
<sharedListeners>
<add name="otListenerShared" type="Orc.SharpBridge.OrcLibraries.Tracing.OrcTraceListener,
Orc.SharpBridge"/>
</sharedListeners>

To print more details to the log file, the sourceSwitch setting should be changed to Verbose according to the
comment in the above code snippet.

Log messages from Excel module


To enable more logging on the Excel side, execute the following in the Immediate window when the Orc Excel
library document is loaded:

OtEnableVerboseLog True

To disable more logging:

OtEnableVerboseLog False

The resulting log file will be located in %LOCALAPPDATA%\Orc\Orc.SpreadsheetLink and the path will expand to
something like C:\Users\MyUsername\AppData\Local\Orc\Orc.SpreadsheetLink.

8
Copyright © 2014, Orc Group

Error handling

Enable Break on All Errors in Excel


To receive better notifications of VBA errors it is recommended to select Break on All Errors in the VBA Options
panel (Microsoft Visual Basic for Application menu bar>Tools>Options>General>Error Trapping):

9
Copyright © 2014, Orc Group

Orc Trader Spreadsheet Link reference


This section provides examples of how to manually link data from Orc Trader+ to Excel worksheet cells.
Note that it is generally most straightforward to allow Orc Trader+ to automatically create the desired links by
selecting the cells to link and choose Orc menu bar>Edit>Copy Link and press Ctrl while selecting Copy Link.

Accessing contract fields


There are several ways to identify a contract in order to link a field of that contract to a cell in Excel through Orc
Trader Spreadsheet Link.
ECUI (Unique Identifier in contract inspector)
Tag
Market + Feedcode

ECUI
=OtRtdContractFieldEcui(ecui, contractField)
=OtRtdContractFieldEcui(ecui; contractField)

details:

Part Description Type

ecui Unique identifier of contract String

contractField Contract field String

Tag
=OtRtdContractFieldTag(tag, contractField)
=OtRtdContractFieldTag(tag; contractField)

details:

Part Description Type

tag Tag of contract Long

contractField Contract field String

Market + Feedcode
=OtRtdContractFieldMfc(marketId, feedcode, contractField)
=OtRtdContractFieldMfc(marketId; feedcode; contractField)

details:

Part Description Type

marketId Market ID Long

feedcode Feedcode of contract String

contractField Contract field name String

10
Copyright © 2014, Orc Group

Available contract fields


There are numerous contract fields available that can be linked to Excel. The following displays a short example of
field names:

Field name Description

TASKCOLUMN Ask price

TASKVOLCOLUMN Ask volume

TBIDCOLUMN Bid price

TBIDVOLCOLUMN Bid Volume

... ...

To get the name of a specific field, add the column to a Trading window in Orc Trader+ and select Copy Link (Orc
menu bar>Edit>Copy Link) to get a working Real Time Data (RTD) link in which the field name can be seen.

Set contract fields


Certain contract fields can be set using the following methods:

OtSetContractValueTag tag, contractField, value


OtSetContractValueMfc marketId, feedcode, contractField, value

Accessing Liquidator instrument fields


A Liquidator instrument field is identified through Market, Feedcode, and Field name.

=OtRtdLiqInstrumentFieldMfc(marketName, feedcode, liquidatorField)


=OtRtdLiqInstrumentFieldMfc(marketName; feedcode; liquidatorField)

details:

Part Description Type

marketName Market name String

feedcode Feedcode of contract String

liquidatorField Liquidator instrument field name String

11
Copyright © 2014, Orc Group

Available Liquidator instrument fields


There are numerous Liquidator instrument fields available that can be linked to Excel. The following displays a short
example of field names:

Field name Description

ITEMliquidatorAsk Ask price

ITEMliquidatorAskVolume Ask volume

ITEMliquidatorBid Bid price

ITEMliquidatorBidVolume Bid Volume


... ...

To get the name of a specific field, add that column to a Trading window in Orc Trader+ and select Copy Link (Orc
menu bar>Edit>Copy Link) to get a working Real Time Data (RTD) link in which the field name can be seen.

Accessing portfolio fields


Currently the special portfolio field position count can be retrieved. Position count returns the number of positions
(excluding cash positions) for the specified portfolio.
To access this field use the following method:

=OtRtdPortfolioPositionCount(portfolioName)

details:

Part Description Type

portfolioName Name of the portfolio String

Accessing position fields


A position field of a portfolio can be identified in the following ways:
Tag
Market + Feedcode

Tag
=OtRtdPositionFieldTag(portfolioName, currency, tag, field)
=OtRtdPositionFieldTag(portfolioName; currency; tag; field)

details:

Part Description Type

portfolioName Name of the portfolio String

currency Three letter currency code String

tag Tag of contract Long

field Field name String

12
Copyright © 2014, Orc Group

Market + Feedcode
=OtRtdPositionFieldMfc(portfolioName, currency, marketId, feedcode, field)
=OtRtdPositionFieldMfc(portfolioName; currency; marketId; feedcode; field)

details:

Part Description Type

portfolioName Name of the portfolio String

currency Three letter currency code String

marketId Market ID Long

feedcode Feedcode of contract String

field Field name String

Available position fields


There are numerous position fields available that can be linked to Excel. The following displays a short example of
field names:

Field name Description

CONTENTSCONTRACTCOLUMN Contract

CONTENTSPOSITIONCOLUMN Position

CONTENTSINVESTEDCOLUMN Invested

CONTENTSMVCOLUMN Market value (market)

... ...

To get the name of a specific field, add that column to a Trading window in Orc Trader+ and select Copy Link (Orc
menu bar>Edit>Copy Link) to get a working Real Time Data (RTD) link in which the field name can be seen.

Accessing strategy parameters


You can access strategy parameters or spreader strategy parameters through Orc Trader Spreadsheet Link. You
can identify the strategy in two ways, either by Link instance Id or by the name of the strategy.

Link Instance Id
=OtGetStrategyFieldForId(strategyId, parameterName)
=OtGetStrategyFieldForId(strategyId; parameterName)

details:

Part Description Type

strategyId Link Instance Id of strategy. Must be a string since instance ids can be too String
big to fit in a Long

parameterName Name of the parameter String

13
Copyright © 2014, Orc Group

Strategy Name
=OtGetStrategyFieldForName(strategyName, parameterName)
=OtGetStrategyFieldForName(strategyName; parameterName)

details:

Part Description Type

strategyName Name of strategy String

parameterName Name of the parameter String

For more information on available parameters for spreader strategies, refer to the Parameter summary section of
the Orc Spreader manual.

Accessing volatility surfaces


Information about volatility surfaces can be accessed in Excel. A surface can be identified by name or tag.

=OtGetVolatilitySurfaceForName(surfaceName)
=OtGetVolatilitySurfaceForTag(surfaceTag)

The surface can then be examined using VBA code:

Dim surface As OrcDictionary


Set surface = OtGetVolatilitySurfaceForName("MySurface")

Debug.Print "Surface name: " & surface.Item(OtVolatilitySurfaceName)


' Output: "Surface name: MySurface"

Debug.Print "Surface model: " & surface.Item(OtVolatilitySurfaceModel)


' Output: "Surface model: Wing"

To get a single parameter from a curve:

Debug.Print "Parameter 0: " &


surface.Item(OtVolatilitySurfaceCurves).Item("2014-10-06").Item(OtVolatilitySurfaceParameters).Item(
"0")
' Output: "Parameter 0: 0,0005"

For information on index of parameters for different volatility models, see Volatility parameter mappings in the Orc
Trader Spreadsheet Link VBA library reference - Volatility surfaces section.
To print all parameters and values:

Dim parameters As OtDictionary


Set parameters =
surface.Item(OtVolatilitySurfaceCurves).Item("2014-10-06").Item(OtVolatilitySurfaceParameters)

' Print all parameter indecies and values


Dim Key As Variant
For Each Key In parameters.Keys
Debug.Print Key & ": " & parameters.Item((Key))
Next

To set a single parameter value or a complete curve:

OtUpdateVolatilitySurfaceParameter "Surface2", "2014-11-29", "0", 0.0006

To get and set reference price:

14
Copyright © 2014, Orc Group

Dim refPrice As Double


refPrice = OtGetReferencePriceForName "Surface2", "ORC123", "2014-09-30"
OtSetReferencePriceForName "Surface2", "ORC123", "2014-09-30", 12.2

15
Copyright © 2014, Orc Group

Orc Trader Spreadsheet Link VBA library reference


The Visual Basic for Applications (VBA) library contains functions needed to communicate with Orc Trader+.
This Orc Trader Spreadsheet Link VBA library reference contains the following sections:
Modules
Orc
OrcContracts
OrcMarkets
OrcOrders
OrcPortfolios
OrcRtd
OrcStrategies
Volatility surfaces
OrcUnderlyings
Class Modules
OrcDefines

16
Copyright © 2014, Orc Group

Modules
This section contains information on the following modules:
Orc
OrcContracts
OrcMarkets
OrcOrders
OrcPortfolios
OrcRtd
OrcStrategies
Volatility surfaces
OrcUnderlyings

17
Copyright © 2014, Orc Group

Orc
OtArrayLength(TheArray As Variant) As Long
Returns the length of an array, taking the lower and upper bounds of the array into account.

OtArrayLength() Example:

Sub CheckArrayLength()

Dim myArray(99) As Variant


MsgBox (OtArrayLength(myArray))

End Sub

OtCreateDictionary() As OtDictionary
Creates a new OtDictionary that can be used for order data and order updates.

OtCreateDictionary() Example:

Sub CreateOrderDictionary()

Dim order As OtDictionary


Set order = OtCreateDictionary

End Sub

OtEnableVerboseLog(VerboseLog As Boolean)
Enable (True) or disable (False) detailed logging in a file. This file is saved in folder
"%LocalAppData%\Orc\Orc.SpreadsheetLink".

OtEnableVerboseLog() Example:

Sub EnableVerboseLogging()

OtEnableVerboseLog True

End Sub

18
Copyright © 2014, Orc Group

OrcContracts
OtCreateContractKey(Market As Long, Feedcode As String) As OtContractKey
Creates OtContractKey for specified Market and Feedcode. This key can be used in other functions to identify a
contract.

OtCreateContractKey() Example:

Sub CreateContractKey()

Dim contractKey As OtContractKey


Set contractKey = OtCreateContractKey(471, "ORC")

Cells(1, 1).Value = contractKey.Market


Cells(1, 2).Value = contractKey.Feedcode

End Sub

OtGetContracts(Underlying As String) As OtContractKey()

Experimental feature! Currently returning contracts that Orc Trader+ has a


subscription for.

Returns an array of contract keys as OtContractKey for all contracts for specified underlying. The keys can be used
in other functions to identify a contract. Specify an empty string to get all contracts for all markets.

OtGetContracts() Example:

Sub DisplayContracts()

On Error GoTo Error


Dim contracts() As OtContractKey
contracts = OtGetContracts("BMW")

If OtArrayLength(contracts) <> 0 Then


Dim i As Long
For i = 0 To UBound(contracts)
Cells(i + 1, 1).Value = contracts(i).Item("Description")
Next i
Else
MsgBox ("No contracts found for underlying.")
End If

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtGetContractsForUnderlyingKey(Underlying As OtUnderlyingKey) As OtContractKey()

Experimental feature! Currently returning contracts that Orc Trader+ has a subscription for.

Returns an array of contract keys as OtContractKey for all contracts for specified underlying identified by OtUnderlyi
ngKey.

19
Copyright © 2014, Orc Group

OtGetContracts() Example:

Sub DisplayContracts()

On Error GoTo Error


'Get underlying keys
Dim underlyings() As OtUnderlyingKey
underlyings = OtGetUnderlyings(471)

'Get contracts for the first underlying returned


If OtArrayLength(underlyings) <> 0 Then

Dim contracts() As OtContractKey


contracts = OtGetContractsForUnderlyingKey(underlyings(0))

If OtArrayLength(contracts) <> 0 Then


Dim i As Long
For i = 0 To UBound(contracts)
Cells(i + 1, 1).Value = contracts(i).Item("Description")
Next i
Else
MsgBox ("No contracts found for underlying.")
End If

Else
MsgBox ("No underlyings found.")

End If

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

20
Copyright © 2014, Orc Group

OrcMarkets
OtGetMarkets() As OtMarketKey()

Experimental feature! Currently returning all markets that have a contract in the Client Data
Server (CDS).

Returns an array of OtMarketKeys for all markets.

OtGetMarkets() Example:

Sub DisplayMarkets()

On Error GoTo Error:


Dim markets() As OtMarketKey
markets = OtGetMarkets()

If OtArrayLength(markets) <> 0 Then


Dim i As Long
For i = 0 To UBound(markets)
Cells(i + 1, 1).Value = markets(i).Item("Name")
Cells(i + 1, 2).Value = markets(i).Market
Next i
Else
MsgBox ("No markets found")
End If

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

21
Copyright © 2014, Orc Group

OrcOrders
Order Types
Order type is specified as a string. Should equal the value in the Type list menu in the Orc Trader+ order panel.

If the order type is misspelled, Orc Trader+ will add the order as a standard Limit order.

OtCreateOrderKey(Tag As Long) As OtOrderKey


Creates an OtOrderKey for the specified Tag. This key can be used in other functions to identify an order.

OtCreateOrderKey() Example:

Sub AddAndRemoveOrder()

On Error GoTo Error


Dim result As OtOrderKey
Set result = OtOrderAddStandardTag(10095, OtOrderSideSell, 100, 20)

Dim tag As Long


tag = result.tag

Dim key As OtOrderKey


Set key = OtCreateOrderKey(tag)

OtOrderRemoveKey key
Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtGetOrderField(Tag As Long, Field As String) As Variant


Gets the value for the specified Field for the order identified by Tag.

OtGetOrderField() Example:

Sub ViewOrderComment()

On Error GoTo Error


Dim orderComment As String
orderComment = OtGetOrderField(10120, OtOrderComment)

MsgBox (orderComment)
Exit Sub

Error:
MsgBox ("Could not get order field: " & Err.Description)

End Sub

OtGetOrderFieldKey(Key As OtOrderKey, Field As String) As Variant


Gets the value for the specified Field for the order identified by OtOrderKey.

22
Copyright © 2014, Orc Group

OtGetOrderFieldKey() Example:

Sub ViewOrderComment()

On Error GoTo Error


Dim key As OtOrderKey
Set key = OtCreateOrderKey(10120)

Dim orderComment As String


orderComment = OtGetOrderFieldKey(key, OtOrderComment)

MsgBox (orderComment)
Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtGetOrders() As OtOrderKey()

Experimental feature! Currently returning all orders that Orc Trader+ has loaded, regardless of
status.

Returns an array of OtOrderKeys for all orders. The keys can be used in other functions to identify orders.

OtGetOrders() Example:

Sub DisplayOrderTags()

On Error GoTo Error


Dim orderKeys() As OtOrderKey
orderKeys = OtGetOrders()

If OtArrayLength(orderKeys) <> 0 Then


Dim i As Long
For i = 0 To UBound(orderKeys)
Cells(i + 1, 1).Value = orderKeys(i).tag
Next i
Else
MsgBox ("No orders found.")
End If
Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtOrderAdd(Order As OtDictionary) As OtOrderKey


Adds an order to Orc Trader+. Returns an OtOrderKey if successful and throws an exception if it fails.

23
Copyright © 2014, Orc Group

OtOrderAdd() Example:

Sub AddOrder()

Dim order As OtDictionary


Set order = OtCreateDictionary

order.Add OtOrderContractTag, 10615


order.Add OtOrderIsActive, True
order.Add OtOrderIsOnExchange, True
order.Add OtOrderSide, OtOrderSideSell
order.Add OtOrderPrice, 10.5
order.Add OtOrderVolume, 25

On Error GoTo Error


Dim orderKey As OtOrderKey
Set orderKey = OtOrderAdd(order)

MsgBox "Order added, tag: " & orderKey.Tag


Exit Sub

Error:
MsgBox "Order could not be added: " & Err.Description

End Sub

OtOrderAddSliceOrderMfc(ContractMarket As Long, ContractFeedcode As String, Side As String, Volume


As Long, Price As Double, Optional SliceVolume As Long = 0, Optional NumberOfSlices As Long = 0,
Optional IsActive As Boolean = False, Optional Portfolio As String = "", Optional OrderTemplate As String =
"") As OtOrderKey
Function to help create a slice order, using market and feedcode to identify the contract. SliceVolume and
NumberOfSlices are calculated automatically if either is omitted. A slice order is inactive by default, meaning no
slices will be created until it is activated. Specify IsActive:=True to activate and create slices directly.

OtOrderAddSliceOrderMfc() Example:

Sub AddSliceOrder()

Dim order As OtOrderKey

On Error GoTo Error:

' Add slice order with slice volume 25. Not specifying number of slices will automatically
divide
' the order into 100 / 25 = 4 slices
Set order = OtOrderAddSliceOrderMfc(471, "C14100", OtOrderSideSell, 100, 75, 25, IsActive:=True,
Portfolio:="Portfolio2")

MsgBox "Slice order added, tag of parent order: " & order.Tag

' Add slice order with 2 slices. Not specifying slice volume will automatically calculate the
' slice volume, in this case slice volume will be 200 / 2 = 100
Set order = OtOrderAddSliceOrderMfc(471, "C14100", OtOrderSideBuy, 200, 70, NumberOfSlices:=2,
IsActive:=True, Portfolio:="Portfolio2")
MsgBox "Slice order added, tag of parent order: " & order.Tag
Exit Sub

Error:
MsgBox "Slice order could not be added: " & Err.Description

End Sub

24
Copyright © 2014, Orc Group

OtOrderAddSliceOrderTag(ContractTag As Long, Side As String, Volume As Long, Price As Double,


Optional SliceVolume As Long = 0, Optional NumberOfSlices As Long = 0, Optional IsActive As Boolean =
False, Optional Portfolio As String = "", Optional OrderTemplate As String = "") As OtOrderKey
Function to help create a slice order, using a tag to identify the contract. SliceVolume and NumberOfSlices are
calculated automatically if either is omitted. A slice order is inactive by default, meaning no slices will be created until
it is activated. Specify IsActive:=True to activate and create slices directly.

OtOrderAddSliceOrderTag() Example:

Sub AddSliceOrder()

Dim order As OtOrderKey

On Error GoTo Error:


Set order = OtOrderAddSliceOrderTag(10095, OtOrderSideBuy, 200, 125, NumberOfSlices:=4)

MsgBox "Slice order added, tag of parent order: " & order.Tag
Exit Sub

Error:
MsgBox "Slice order could not be added: " & Err.Description

End Sub

OtOrderAddStandardMfc(ContractMarket As Long, ContractFeedcode As String, Side As String, Volume As


Long, Price As Double, Optional IsExchangeOrder As Boolean = False, Optional Portfolio As String = "",
Optional OrderTemplate As String = "") As OtOrderKey
Function to help create a basic order, using market and feedcode to identify the contract.

OtOrderAddStandardMfc() Example:

Sub AddOrder()

Dim orderResult As OtOrderKey

On Error GoTo Error


Set orderKey = OtOrderAddStandardMfc(471, "C14100", OtOrderSideBuy, 200, 115,
IsExchangeOrder:=True)

MsgBox "Order added, tag: " & orderKey.Tag


Exit Sub

Error:
MsgBox "Order could not be added: " & Err.Description

End Sub

OtOrderAddStandardTag(ContractTag As Long, Side As String, Volume As Long, Price As Double, Optional


IsExchangeOrder As Boolean = False, Optional Portfolio As String = "", Optional OrderTemplate As String =
"") As OtOrderKey
Function to help create a basic order, using a tag to identify the contract.

25
Copyright © 2014, Orc Group

OtOrderAddStandardTag() Example:

Sub AddOrder()

Dim orderResult As OtOrderKey

On Error GoTo Error


Set orderKey = OtOrderAddStandardTag(10095, OtOrderSideSell, 100, 75, IsExchangeOrder:=True)
MsgBox "Order added, tag: " & orderKey.Tag
Exit Sub

Error:
MsgBox "Order could not be added: " & Err.Description

End Sub

OtOrderGroupAdd(GroupData As OtDictionary, Orders() As OtDictionary) As OtOrderEntryResult()


Adds multiple orders to Orc Trader+. Returns OtOrderGroupEntryResult.

GroupData does not need to contain anything since it is possible to call on OtOrderGroupAdd
with GroupData as an empty OtDictionary or as Nothing.

26
Copyright © 2014, Orc Group

OtOrderGroupAdd() Example:

Sub AddGroupedOrders()

Dim groupData As OtDictionary


Dim groupedOrders(1) As OtDictionary

Set groupData = OtCreateDictionary


Set groupedOrders(0) = OtCreateDictionary
Set groupedOrders(1) = OtCreateDictionary

groupData.Add OtOrderComment, "Grouped spreadsheet orders"

groupedOrders(0).Add OtOrderContractTag, 10615


groupedOrders(0).Add OtOrderIsActive, True
groupedOrders(0).Add OtOrderIsOnExchange, True
groupedOrders(0).Add OtOrderSide, OtOrderSideBuy
groupedOrders(0).Add OtOrderPrice, 100
groupedOrders(0).Add OtOrderVolume, 25

groupedOrders(1).Add OtOrderContractTag, 10615


groupedOrders(1).Add OtOrderIsActive, True
groupedOrders(1).Add OtOrderIsOnExchange, True
groupedOrders(1).Add OtOrderSide, OtOrderSideSell
groupedOrders(1).Add OtOrderPrice, 101
groupedOrders(1).Add OtOrderVolume, 25

On Error GoTo Error


Dim groupResult As OtOrderGroupEntryResult
Set groupResult = OtOrderGroupAdd(groupData, groupedOrders)

If groupResult.Parent.Success Then
Cells(1, 1).Value = "Group order tag: " & groupResult.Parent.OrderKey.Tag
Else
Cells(1, 1).Value = "Group order could not be added: " & groupResult.Parent.ErrorMessage
End If

Dim orderResults() As OtOrderEntryResult


orderResults = groupResult.Items
Dim i As Long
For i = 0 To UBound(orderResults)
If orderResults(i).Success Then
Cells(i + 2, 1).Value = "Order tag: " & orderResults(i).OrderKey.Tag
Else
Cells(i + 2, 1).Value = "Order could not be added: " & orderResults(i).ErrorMessage
End If
Next i
Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtOrderPrepareSliceOrder(Side As String, Volume As Long, Price As Double, Optional SliceVolume As


Long = 0, Optional NumberOfSlices As Long = 0, Optional IsActive As Boolean = False, Optional Portfolio
As String = "", Optional OrderTemplate As String = "") As OtDictionary
Function used to create a basic slice order dictionary to add other properties to.

27
Copyright © 2014, Orc Group

OtOrderPrepareSliceOrder() Example:

Sub PrepareAndCompleteSliceOrder()

On Error GoTo Error


Dim order As OtDictionary
Set order = OtOrderPrepareSliceOrder(OtOrderSideBuy, 1250, 150, SliceVolume:=250,
IsActive:=True)

order.Add OtOrderContractTag, 10095

Dim orderKey As OtOrderKey


Set orderKey = OtOrderAdd(order)

MsgBox ("Order added, parent order tag: " & orderKey.Tag)


Exit Sub

Error:
MsgBox ("Could not add order: " & Err.Description)

End Sub

OtOrderPrepareStandard(Side As String, Volume As Long, Price As Double, Optional IsExchangeOrder As


Boolean = False, Optional Portfolio As String = "", Optional OrderTemplate As String = "") As OtDictionary
Function used to create a basic order dictionary to add additional properties to.

OtOrderPrepareStandard() Example:

Sub PrepareAndCompleteOrder()

On Error GoTo Error


Dim order As OtDictionary
Set order = OtOrderPrepareStandard(OtOrderSideBuy, 1250, 150, IsExchangeOrder:=True,
Portfolio:="My Portfolio")

order.Add OtOrderContractTag, 10095

Dim orderKey As OtOrderKey


Set orderKey = OtOrderAdd(order)

MsgBox ("Order added, tag: " & orderKey.Tag)


Exit Sub

Error:
MsgBox ("Could not add order: " & Err.Description)

End Sub

OtOrderRemove(Tag As Long) As Boolean


Removes an order from Orc Trader+ using order tag to identify the order. Throws exception if it fails.

28
Copyright © 2014, Orc Group

OtOrderRemove() Example:

Sub RemoveOrder()

Dim orderTag As Long


On Error GoTo Error
orderTag = Cells(1, 1).Value
OtOrderRemove (orderTag)

MsgBox "Order with tag " & orderTag & " has been removed."
Exit Sub

Error:
MsgBox "Order with tag " & orderTag & " could not be removed: " & Err.Description

End Sub

OtOrderRemoveKey(Key As OtOrderKey)
Removes an order from Orc Trader+ using an OtOrderKey to identify the order. Throws exception if it fails.

OtOrderRemoveKey() Example:

Sub RemoveOrder()

'Place order
Dim order As OtDictionary
Set order = OtCreateDictionary

order.Add OtOrderContractTag, 10095


order.Add OtOrderPrice, 10.5
order.Add OtOrderVolume, 25
order.Add OtOrderIsActive, True
order.Add OtOrderIsOnExchange, True
order.Add OtOrderSide, OtOrderSideSell

On Error GoTo Error


Dim orderKey As OtOrderKey
Set orderKey = OtOrderAdd(order)

'Remove order
OtOrderRemoveKey orderKey
MsgBox "Removed order with tag: " & orderKey.Tag
Exit Sub

Error:
MsgBox "Error: " & Err.Description

End Sub

OtOrderUpdate(Tag As Long, Order As OtDictionary)


Updates an existing order in Orc Trader+ using order tag to identify the order. Should be used when updating
multiple order fields. If updating a single field, use OtSetOrderField/OtSetOrderFieldKey instead. Order parameters
to be changed must be specified in an OtDictionary in the same way as an order. For available order fields, see Orc
Defines.

29
Copyright © 2014, Orc Group

OtOrderUpdate() Example:

Sub UpdateOrder()

'Add inactive internal order


Dim order As OtDictionary
Set order = OtCreateDictionary

order.Add OtOrderContractTag, 10095


order.Add OtOrderSide, OtOrderSideSell
order.Add OtOrderPrice, 10.5
order.Add OtOrderVolume, 25

On Error GoTo Error


Dim orderKey As OtOrderKey
Set orderKey = OtOrderAdd(order)

'Update order to activate and send it to the exchange


Dim orderUpdate As OtDictionary
Set orderUpdate = OtCreateDictionary

orderUpdate.Add OtOrderIsActive, True


orderUpdate.Add OtOrderIsOnExchange, True
orderUpdate.Add OtOrderComment, "Order updated, activated and sent to exchange."

OtOrderUpdate orderKey.Tag, orderUpdate


MsgBox ("Order with tag " & orderKey.Tag & " updated.")
Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtOrderUpdateKey(Key As OtOrderKey, Order As OtDictionary)


Updates an existing order in Orc Trader+ using an OtOrderKey to identify the order. Should be used when updating
multiple order fields. If updating a single field, use OtSetOrderField/OtSetOrderFieldKey instead. Order parameters
to be changed must be specified in an OtDictionary in the same way as an order. For available order fields, see Orc
Defines.

30
Copyright © 2014, Orc Group

OtOrderUpdateKey() Example:

Sub UpdateOrder()

'Add inactive internal order


Dim order As OtDictionary
Set order = OtCreateDictionary

order.Add OtOrderContractTag, 10095


order.Add OtOrderSide, OtOrderSideSell
order.Add OtOrderPrice, 10.5
order.Add OtOrderVolume, 25

On Error GoTo Error


Dim orderKey As OtOrderKey
Set orderKey = OtOrderAdd(order)

'Update order to activate and send it to the exchange


Dim orderUpdate As OtDictionary
Set orderUpdate = OtCreateDictionary

orderUpdate.Add OtOrderIsActive, True


orderUpdate.Add OtOrderIsOnExchange, True
orderUpdate.Add OtOrderComment, "Order updated, activated and sent to exchange."

OtOrderUpdateKey orderKey, orderUpdate


MsgBox ("Order with tag " & orderKey.Tag & " updated.")
Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtSetOrderField(Tag As Long, Field As String, Value As Variant)


Sets the value for the specified Field to the specified Value for the order identified by order tag. Should be used
when updating a single order field. If updating multiple order fields, use OtOrderUpdate/OtOrderUpdateKey
instead. For available order fields, see OrcDefines.

It is not recommended to use this function repeatedly to update multiple order fields since Orc
Trader+ will be busy with previous updates and might not be able to perform the update
successfully. When updating multiple order fields, use OtOrderUpdate or OtOrderUpdateKey ins
tead.

31
Copyright © 2014, Orc Group

OtSetOrderField() Example:

Sub SetOrderField()

'Add internal order


Dim order As OtDictionary
Set order = OtCreateDictionary

order.Add OtOrderContractTag, 10095


order.Add OtOrderIsActive, True
order.Add OtOrderSide, OtOrderSideBuy
order.Add OtOrderPrice, 10.5
order.Add OtOrderVolume, 25

On Error GoTo Error


Dim orderKey As OtOrderKey
Set orderKey = OtOrderAdd(order)

'Update order to send it to exchange


OtSetOrderField orderKey.Tag, OtOrderIsOnExchange, True
Exit Sub

Error:
MsgBox ("Error : " & Err.Description)

End Sub

OtSetOrderFieldKey(Key As OtOrderKey, Field As String, Value As Variant)


Sets the value for the specified Field to the specified Value for the order identified by OtOrderKey. Should be used
when updating a single order field. If updating multiple order fields, use OtOrderUpdate/OtOrderUpdateKey
instead. For available order fields, see OrcDefines.

It is not recommended to use this function repeatedly to update multiple order fields since Orc
Trader+ will be busy with previous updates and might not be able to perform the update
successfully. When updating multiple order fields, use OtOrderUpdate or OtOrderUpdateKey ins
tead.

OtSetOrderFieldKey() Example:

Sub SetOrderField()

'Add internal order


Dim order As OtDictionary
Set order = OtCreateDictionary

order.Add OtOrderContractTag, 10095


order.Add OtOrderIsActive, True
order.Add OtOrderSide, OtOrderSideBuy
order.Add OtOrderPrice, 10.5
order.Add OtOrderVolume, 25

On Error GoTo Error


Dim orderKey As OtOrderKey
Set orderKey = OtOrderAdd(order)

'Update order to send it to exchange


OtSetOrderFieldKey orderKey, OtOrderIsOnExchange, True
Exit Sub

Error:
MsgBox ("Error : " & Err.Description)

End Sub

32
Copyright © 2014, Orc Group

OrcPortfolios
OtCreatePortfolioKey(Name As String)
Returns an OtPortfolioKey for the specified portfolio name.

OtCreatePortfolioKey() Example:

Sub PortfolioKey()

On Error GoTo Error

Dim key As OtPortfolioKey


Set key = OtCreatePortfolioKey("portfolio")

Debug.Print "Portfolio = " & key.Name

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtCreatePositionKey(PortfolioName As String, CurrencyName As String, ContractTag As Long,


ContractMarket As Long, ContractFeedcode As String)
Returns an OtPositionKey for the specified values.

OtCreatePositionKey() Example:

Sub PositionKey()

On Error GoTo Error

Dim key As OtPositionKey


Set key = OtCreatePositionKey("portfolio", "USD", 54321, 123, "ABC0654")

Debug.Print "Portfolio = " & key.Portfolio


Debug.Print "Currency = " & key.CurrencyName
Debug.Print "Tag = " & key.ContractTag
Debug.Print "Market = " & key.ContractMarket
Debug.Print "Feedcode = " & key.ContractFeedcode

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtGetPortfolios()
Returns array of portfolio keys as OtPortfolioKey for all portfolios.

33
Copyright © 2014, Orc Group

OtCreatePositionKey() Example:

Sub PrintAllPortfolios()

On Error GoTo Error

Dim portfolios() As OtPortfolioKey


portfolios = OtGetPortfolios()

For Each portfolio In portfolios


Debug.Print portfolio.Name
Next

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtGetPositions(PortfolioName As String)
Returns array of position keys as OtPositionKey for all positions for the specified portfolio.

OtCreatePositionKey() Example:

Sub PrintAllPositionsForPortfolio(portfolio As String)

On Error GoTo Error

Dim positions() As OtPositionKey


positions = OtGetPositions(portfolio)

For Each position In positions


Debug.Print "-----------"
Debug.Print "Portfolio = " & position.Portfolio
Debug.Print "Currency = " & position.CurrencyName
Debug.Print "Tag = " & position.ContractTag
Debug.Print "Market = " & position.ContractMarket
Debug.Print "Feedcode = " & position.ContractFeedcode
Next

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtRtdPortfolioPositionCount(PortfolioName As String)
Setup cell for RTD for the number of positions for the specified portfolio that will update if the number of positions
changes. Can be used to detect when positions are added or removed from the portfolio.

34
Copyright © 2014, Orc Group

OrcRtd
The following functions are used to set up an Excel cell for RTD and should be used directly in Excel worksheet
cells. For more information, see Orc Trader Spreadsheet Link reference.
To access strategy fields in VBA, use OtGetstrategyField function documented in OrcStrategies.

OtRtdContractFieldEcui(Ecui As String, Field As String)


Setup cell for RTD for a contract Field using the contract's Ecui field (Unique Identifier field) to identify the contract.

OtRtdContractFieldMfc(Market As Long, Feedcode As String, Field As String)


Setup cell for RTD for a contract Field using the contracts Market and Feedcode fields to identify the contract.

OtRtdContractFieldTag(Tag As Long, Field As String)


Setup cell for RTD for a contract Field using the contract's Tag field to identify the contract.

OtRtdLiqInstrumentFieldMfc(Market As String, Feedcode As String, Field As String)


Setup cell for RTD for a liquidator instrument Field using the contract's Market name and Feedcode fields to identify
the contract.

OtRtdPositionFieldMfc(Name As String, Cur As String, Market As Long, Feedcode As String, Field As


String)
Setup cell for RTD for a position Field using the contract's Market and Feedcode fields to identify the contract.

Note that while Orc Trader+ allows square brackets ']' in portfolio names, this
character is not handled when subscribing to a position in Orc SpreadSheet Link.

OtRtdPositionFieldTag(Name As String, Cur As String, Tag As Long, Field As String)


Setup cell for RTD for a position Field using the contract's Tag field to identify the contract.

OtRtdStrategyField(Name As String, Field As String)


Setup cell for RTD for a strategy Field using the strategy's Name to identify the strategy.

35
Copyright © 2014, Orc Group

OrcStrategies
Orc Trader Spreadsheet Link can identify strategies by their name. If you are using multiple
strategies with the same name, any cell with a link to these strategies will display the error
message: Strategy not unique.
Identifying a strategy by link instance Id requires link instance Id to be used as string since they
can be too big to fit in a Long.

OtCreateStrategyIdKey(Id As String) As OtStrategyKey

OtStrategyKey is currently not used by other strategy functions.

Returns an OtStrategyKey for the specified strategy link instance Id.

OtCreateStrategyKey() Example:

Sub StrategyIdKey()

On Error GoTo Error

Dim strategyKey As OtStrategyKey


Set strategyKey = OtCreateStrategyNameKey("1023954732")

Debug.Print "Strategy id = " & strategyKey.Id

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtCreateStrategyNameKey(Name As String) As OtStrategyKey

OtStrategyKey is currently not used by other strategy functions.

Returns an OtStrategyKey for the specified strategy name.

OtCreateStrategyKey() Example:

Sub StrategyNameKey()

On Error GoTo Error

Dim strategyKey As OtStrategyKey


Set strategyKey = OtCreateStrategyNameKey("Spreader Combo 1")

Debug.Print "Strategy name = " & strategyKey.Name

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

OtGetStrategyFieldForId(Id As String, Field As String)


Returns value as variant for the specified field for the strategy identified by strategy link instance Id.

36
Copyright © 2014, Orc Group

OtGetStrategyField() Example:

Sub GetStrategyField()

On Error GoTo Error

Dim strategyFieldValue As Variant


strategyFieldValue = OtGetStrategyFieldForId("1023954732", "parameters.bidEdge")
Cells(1, 1).Value = strategyFieldValue

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

For more information on available parameters for spreader strategies, refer to the Parameter summary section of
the Orc Spreader manual.

OtGetStrategyFieldForName(Name As String, Field As String)


Returns value as variant for the specified field for the strategy identified by strategy name.

OtGetStrategyField() Example:

Sub GetStrategyField()

On Error GoTo Error

Dim strategyFieldValue As Variant


strategyFieldValue = OtGetStrategyFieldForName("Spreader Combo 1", "parameters.bidEdge")
Cells(1, 1).Value = strategyFieldValue

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

For more information on available parameters for spreader strategies, refer to the Parameter summary section of
the Orc Spreader manual.

OtSetStrategyFieldForId(Id As String, Field As String, Value As Variant)


Sets the value for specified strategy field where strategy is identified by link instance Id.

OtSetStrategyField() Example:

Sub DoubleVolume()

Dim currentVolume, newVolume As Long

On Error GoTo Error


currentVolume = OtGetStrategyFieldForId("1023954732", "parameters.volume")
newVolume = currentVolume * 2

OtSetStrategyFieldForId "1023954732", "parameters.volume", newVolume


Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

37
Copyright © 2014, Orc Group

For more information on available parameters for spreader strategies, refer to the Parameter summary section of
the Orc Spreader manual.

OtSetStrategyFieldForName(Name As String, Field As String, Value As Variant)


Sets the value for specified strategy field where strategy is identified by Name.

OtSetStrategyField() Example:

Sub DoubleVolume()

Dim currentVolume, newVolume As Long

On Error GoTo Error


currentVolume = OtGetStrategyFieldForName("SpreadTest Combo 1", "parameters.volume")
newVolume = currentVolume * 2

OtSetStrategyFieldForName "SpreadTest Combo 1", "parameters.volume", newVolume


Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

For more information on available parameters for spreader strategies, refer to the Parameter summary section of
the Orc Spreader manual.

OtStartStrategyForId(Id As String)
Attempts to start the strategy identified by the link instance Id. Read parameter "OtStrategyStatus" to see if the
strategy is started.

OtSetStrategyField() Example:

Sub StartStrategy()
OtStartStrategyForId "1023954732"
End Sub

OtStartStrategyForName(Name As String)
Attempts to start the strategy identified by name. Read parameter "OtStrategyStatus" to see if the strategy is started.

OtSetStrategyField() Example:

Sub StartStrategy()
OtStartStrategyForName "SpreadTest Combo 1"
End Sub

OtStopStrategyForId(Id As String)
Stops the strategy identified by link instance Id. Read parameter "OtStrategyStatus" to see if the strategy is stopped.

OtSetStrategyField() Example:

Sub StopStrategy()
OtStopStrategyForId "1023954732"
End Sub

OtStopStrategyForName(Name As String)
Stops the strategy identified by name. Read parameter "OtStrategyStatus" to see if the strategy is stopped.

38
Copyright © 2014, Orc Group

OtSetStrategyField() Example:

Sub StopStrategy()
OtStopStrategyForName "SpreadTest Combo 1"
End Sub

39
Copyright © 2014, Orc Group

Volatility surfaces
OtGetVolatilitySurfaceForName(Name As String) As OtDictionary
OtGetVolatilitySurfaceForTag(SurfaceTag As Long) As OtDictionary
Get volatility surface for a surface name or tag.

Dim surface As OtDictionary


Set surface = OtGetVolatilitySurfaceForName("MySurface")
Debug.Print "Name: " & surface.item("name")
Debug.Print "Tag : " & surface.item("tag")
Debug.Print "Model : " & surface.item("model")
Debug.Print "Nof curves: " & surface.item("curves").Count()

OtGetRiskSurfaceForContractTag(Tag As Long)
OtGetRiskSurfaceForContractMfc(Market As Long, Feedcode As String)
OtGetQuoteSurfaceForContractTag(Tag As Long)
OtGetQuoteSurfaceForContractMfc(Market As Long, Feedcode As String)
Get risk or quote surface for contract specified by contract tag or market/feedcode.

Dim surfaceKey As OtDictionary


Set surfaceKey = OtGetRiskSurfaceForContractMfc(471, "ORC01234")
Debug.Print "Surface name: " & surfaceKey.item("name")

This method returns the effectively used surface. If a contract is set to use risk surface from underlying, the surface
set on the underlying will be returned.
Notes:
If no surface is specified this method will return the constant OtVolatilityNoSurface in the name field.

The separate Orc Trader+ global setting Volatility for quoting specifies if quote surface is set separately or
not (Orc menu bar>Orc>Preferences>Volatility>Volatility for quoting). If Volatility for quoting is set to
Risk surface, OtGetQuoteSurface query will return OtVolatilityNoSurface for a contract although the risk
surface is set correctly.

OtSetVolatilityCurveForName(Name As String, Curve As OtDictionary)


Add/update volatility curve for existing surface.

Dim parameters As OtDictionary


Set Parameters = OtCreateDictionary
Parameters.Add "0", 0.0005
Parameters.Add "1", 0.0
Parameters.Add "2", 0.0
Parameters.Add "3", 0.0
Parameters.Add "4", -0.0001
Parameters.Add "5", 0.0001
Parameters.Add "7", 0.27
Parameters.Add "8", 0.0
Parameters.Add "9", 0.0
Parameters.Add "10", 0.5
Parameters.Add "11", 0.5

Dim curve As OtDictionary


Set curve = OtCreateDictionary
curve.AddDictionary "parameters", Parameters

Dim curveContainer As OtDictionary


Set curveContainer = OtCreateDictionary
curveContainer.AddDictionary "2014-12-31", curve

OtSetVolatilityCurveForName "Surface2", curveContainer

Notes:

40
Copyright © 2014, Orc Group

For a parameter model, for example the Wing model, all parameters must be set when the curve is created. If
an invalid set of parameters is supplied the surface will be invalid. That is, the curve cannot be opened in Orc
Trader+ and the surface cannot be modified using the SpreadSheet link.
Specify a new expiry to create a new curve (an expiry for which there is no curve present in the surface).
Specifying an existing expiry for a parameter curve will update all supplied parameters (not specified
parameters will not be overwritten).
If a point curve is supplied, all existing points will be deleted and replaced with the new points.

Note that the AddDictionary method is used to add a new dictionary into an existing dictionary in VBA code.

OtUpdateVolatilitySurfaceParameter(SurfaceName As String, Expiry As String, Parameter As String, Value


As Double)
Convenience function to update a single parameter.

OtUpdateVolatilitySurfaceParameter "Surface3", "2014-11-30", "0", 0.0006

For available parameters, see Volatility parameter mappings below.


Note that the index should be used in the Excel link. For example, to set the Call curv for the Wing model, use inde
x=3 according to the following example:

' Index "3" is the "Call curv" parameter


OtUpdateVolatilitySurfaceParameter "MyWingSurface", "2014-12-31", "3", 0.005

Volatility parameter mappings


The following sections display available parameters for different models and the index value to be used in the Excel
link.
SABR parameter mapping

OT parameter OP index

Beta index=0

Alpha index=1

Vol of vol with no time-to-expiry adjustment index=2

correlation index=3

SSR index=4

use as guess index=5

Wing models parameter mapping

41
Copyright © 2014, Orc Group

OT OP index
parameter

Vol.ref index=0

Slope.ref index=1

Put curv index=2

Call curv index=3

Down index=4
cutoff

Up cutoff index=5

Ref price Ref price is not available for the Wing model. For more information, see Volatility messages sectio
n of the Orc Protocol Specification.

VCR index=7

SCR index=8

SSR index=9

Down Sm index=10

Up Sm index=11

Cubic spline parameter mapping


The following displays the parameter mapping for the models Cubic spline (dynamic), Cubic spline (static), and
Cubic spline (stddev).

42
Copyright © 2014, Orc Group

OT OP OP OP index
parameter index index stddev
Dynamic
Static
Rigidity index=0

Curr. Vol index=1

Curr. index=2
Slope

VCR index=3 index=5

SCR index=4 index=6

SSR index=5 index=4

Nbr points index=6 index=0 index=3

Alpha index=7

Up smooth index=8

Down index=9
smooth

Up slope index=10 index=1

Down Index=11 index=2


slope

ATM vol. index=0

Ref price Ref price is not available. For more information, see Volatility messages s
ection of the Orc Protocol Specification.

OtCreateVolatilitySurface(Surface As OtDictionary)
Create new volatility surface using the Wing model.

43
Copyright © 2014, Orc Group

Dim surface As OtDictionary


Set surface = OtCreateDictionary

Dim curve As OtDictionary


Set curve = OtCreateDictionary

Dim parameters As OtDictionary


Set parameters = OtCreateDictionary
Parameters.Add "0", 0.0005
Parameters.Add "1", 0.0
Parameters.Add "2", 0.0
Parameters.Add "3", 0.0
Parameters.Add "4", -0.0001
Parameters.Add "5", 0.0001
Parameters.Add "7", 0.27
Parameters.Add "8", 0.0
Parameters.Add "9", 0.0
Parameters.Add "10", 0.5
Parameters.Add "11", 0.5
curve.AddDictionary "parameters", parameters

Dim curveContainer As OtDictionary


Set curveContainer = OtCreateDictionary
curveContainer.AddDictionary "2014-11-30", curve

surface.Add "name", "Surface2"


surface.Add "model", "Wing"
surface.AddDictionary "curves", curveContainer

Dim result As OtDictionary


Set result = OtCreateVolatilitySurface(surface)

Create a surface using the Cubic spline (dynamic) model.

44
Copyright © 2014, Orc Group

Dim surface As OtDictionary


Set surface = OtCreateDictionary

Dim curve As OtDictionary


Set curve = OtCreateDictionary

Dim parameters As OtDictionary


Set parameters = OtCreateDictionary
parameters.Add "0", 0.0005
parameters.Add "1", 0.795696966782
parameters.Add "2", 0#
parameters.Add "3", 0#
parameters.Add "4", 0#
parameters.Add "5", 1#
parameters.Add "6", 0#
parameters.Add "7", 0.5
parameters.Add "8", 0.5
parameters.Add "9", 0.5
parameters.Add "10", 0#
parameters.Add "11", 0#
curve.AddDictionary "parameters", parameters

Dim points As OtDictionary


Set points = OtCreateDictionary
points.Add "1", 20#
points.Add "2", 21#
points.Add "3", 22#
points.Add "4", 23#
points.Add "5", 24#
curve.AddDictionary OtVolatilitySurfacePoints, points

Dim curveContainer As OtDictionary


Set curveContainer = OtCreateDictionary
curveContainer.AddDictionary "2014-11-25", curve

surface.Add "name", "Surface2"


surface.Add "model", "Cubic spline (dynamic)"
surface.AddDictionary "curves", curveContainer

Dim result As OtDictionary


Set result = OtCreateVolatilitySurface(surface)

OtDeleteVolatilitySurfaceForName(SurfaceName As String)
OtDeleteVolatilitySurfaceForTag(SurfaceTag As Long)
Delete volatility surface.

OtDeleteVolatilitySurfaceForName "Surface3"
OtDeleteVolatilitySurfaceForTag 11

OtDeleteVolatilityCurveForName(SurfaceName As String, Expiry As String)


OtDeleteVolatilityCurveForTag(SurfaceTag As Long, Expiry As String)
Delete volatility curve.

OtDeleteVolatilityCurveForName "Surface2", "2014-09-30"


OtDeleteVolatilityCurveForName "Surface3", "123"
OtDeleteVolatilityCurveForTag 12, "2014-09-30"
OtDeleteVolatilityCurveForTag 13, "123"

45
Copyright © 2014, Orc Group

OtGetReferencePriceForName(SurfaceName As String, UnderlyingName As String, Expiry As String) As


Double
OtGetReferencePriceForTag(SurfaceTag As Long, UnderlyingName As String, Expiry As String) As Double
Get reference price for a surface, an underlying and an expiry.

Dim refPrice As Double


refPrice = OtGetReferencePriceForName("Surface2", "ORC123", "2014-09-30")
Debug.Print "Ref price: " & refPrice
refPrice = OtGetReferencePriceForName("Surface3", "ORC123", "234")
Debug.Print "Ref price: " & refPrice
refPrice = OtGetReferencePriceForTag(12, "ORC123", "2014-09-30")
Debug.Print "Ref price: " & refPrice
refPrice = OtGetReferencePriceForTag(13, "ORC123", "321")
Debug.Print "Ref price: " & refPrice

The reference price is returned for a combination of surface, underlying and expiry.
Error messages:
a. If the surface does not exist an exception is thrown.
b. If no referenceprice can be found for the supplied combination of underlying and expiry a constant value is
returned: INF# (positive infinity).

OtSetReferencePriceForName(SurfaceName As String, UnderlyingName As String, Expiry As String,


ReferencePrice As Double)
OtSetReferencePriceForTag(SurfaceTag As Long, UnderlyingName As String, Expiry As String,
ReferencePrice As Double)
Set reference price for a surface, an underlying and an expiry.
Note: It is required that the volatility surface SurfaceName (or SurfaceTag) has a volatility curve with expiry date
equal to Expiry, otherwise no reference price will be stored.

OtSetReferencePriceForName "Surface2", "ORC123", "2014-09-30", 12.2


OtSetReferencePriceForName "Surface3", "ORC123", "234", 13.3
OtSetReferencePriceForTag 12, "ORC123", "2014-09-30", 14.4
OtSetReferencePriceForTag 13, "ORC123", "321", 15.5

OtSetReferencePriceForName "Surface2", "ORC123", "2014-09-30", 12.2


Dim refPrice As Double
refPrice = OtGetReferencePriceForName("Surface2", "ORC123", "2014-09-30")
Debug.Print "Ref price: " & refPrice
' Will print "Ref price: 12.2"

46
Copyright © 2014, Orc Group

OrcUnderlyings
OtGetUnderlyings(Market As Long) As OtUnderlyingKey()

Experimental feature!

Returns an array of underlyings as OtUnderlyingtKey for specified market. The market is specified using Market Id.
See OtUnderlyingtKey in Class Modules section.

OtGetUnderlyings() Example:

Sub GetUnderlyings()

On Error GoTo Error


Dim underlyings() As OtUnderlyingKey
underlyings = OtGetUnderlyings(10)

Dim i As Long
If OtArrayLength(underlyings) <> 0 Then
For i = 0 To UBound(underlyings)
Cells(i + 1, 1).Value = underlyings(i).Name
Next i
End If

Exit Sub

Error:
MsgBox ("Error: " & Err.Description)

End Sub

47
Copyright © 2014, Orc Group

Class Modules

OtContractKey
Details:

Part Description Type

Market Market ID. Long

Feedcode Feedcode String


Item A collection of properties of the contract. Currently "Description", "Tag" and "Underlyi OtCollection
ng".

OtMarketKey
Details:

Part Description Type

Market Market ID. Long

Item A collection of properties of the market, currently only "Name" OtCollection

OtOrderEntryResult
Success in OtOrderEntryResult only indicates if the order was successfully added to Orc
Trader+ and does not show if the order was successfully added to the market or not.
Note that the boolean field Success is only used for grouped order entry. For order operations
on a single order, an exception will be thrown if it fails.

Details:

Part Description Type

Success True if order was added in Orc Trader+. False if not added in Orc Trader+. See Boolean
ErrorMessage for information. Note that OrderKey Is Nothing in this case.
For grouped orders: Also False when the order could be added but not linked
to the grouped order. In this case OrderKey contains the added order.

OrderKey An OtOrderKey object for the added order, if the order was added successfully. OtOrderKey

ErrorMessage The error message set when Success == False. String

OtOrderGroupEntryResult
Details:

Part Description Type

Parent Result of adding the group order. OtOrderEntryResult

Items Array with results of adding of all child orders. OtOrderEntryResult()

48
Copyright © 2014, Orc Group

OtOrderKey
Details:

Part Description Type

Tag Order tag. Long


Item A collection of properties of the Order. OtCollection

OtPortfolioKey
Details:

Part Description Type

Name Name of the portfolio. String

OtPositionKey
Details:

Part Description Type

Portfolio Name of the portfolio of the position. String

CurrencyName Currency of the position (three letters). String

ContractTag Tag of the contract of the position. Long

ContractMarket Market of the contract of the position. Long

ContractFeedcode Feedcode of the contract of the position. String

OtStrategyKey
OtStrategyKey is currently not used by other strategy functions.

Use either Id or Name to identify the strategy, not both.


Details:

Part Description Type

Id Strategy link instance id. Must be a string since instance ids can be too big to fit String
in a Long

Name Strategy name. String


Item A collection of properties of the strategy. OtCollection

OtUnderlyingKey
Details:

49
Copyright © 2014, Orc Group

Part Description Type

Name Underlying name. String

Item A collection of properties of the underlying. OtCollection

50
Copyright © 2014, Orc Group

OrcDefines

Columns

OtAdditionalDataPrefix
Prefix used for additional data. Type: String

Order columns

OtOrderComment
Comment to be added to order. Type: String

OtOrderContractFeedcode
Feedcode for the contract that the order should be placed on. Type: String

OtOrderContractMarket
Market (market id) that the order should be placed on. Type: Long

OtOrderContractTag
Tag of the contract that the order should be placed on. Type: Long

OtOrderCustomer
Customer for the order. Type: String

OtOrderIcebergVolume
Volume for an iceberg order. Type: Long

OtOrderIsActive
Defines if an order is active or not. Type: Boolean

OtOrderIsDeleted
True if order is deleted, False otherwise. Type: Boolean

OtOrderIsOnExchange
Defines if the order is on the exchange or not. Type: Boolean

OtOrderKind
Kind of order. Type: Not specified means standard order. Possible values: OtOrderKindStandard, OtOrderKindSlice.

OtOrderMarketError
Error description coming from the market if order is invalid. Type: String

OtOrderNumberOfSlices
The amount of slices to create for a slice order. It not specified, but OtOrderSliceVolume is, the number of slices will
be calculated automatically. Type: Long

OtOrderPortfolio
Portfolio that the order belongs to. Type: String

51
Copyright © 2014, Orc Group

OtOrderPrice
Price for the order. Type: Double

OtOrderReference
Reference for the order. Type: String

OtOrderSide
Side of the order. Type: OtOrderSideBuy, OtOrderSideSell

OtOrderSliceInterval
Slice interval in seconds. Type: Long

OtOrderSliceManualStart
Instant (False) or manual (True) start of slice order. Type: Boolean

OtOrderSlicePriceModificationTick
Tick adjustment when modifying price of a slice order. Type: Long

OtOrderSlicePriceModificationType
When modifying price of a slice order, the type of modification. Type: OtOrderSlicePriceModificationTypeBid,
OtOrderSlicePriceModificationTypeAsk, OtOrderSlicePriceModificationTypeLast.

OtOrderSliceVolume
Volume for each slice of a slice order. If not specified, but OtOrderNumberOfSlices is, the slice volume will be
calculated automatically. Type: Long

OtOrderSliceWithPriceModification
Enable (True) or disable (False) price modifications of a slice order. Type: Boolean

OrderStatus
Status of the order in Orc Trader+. Type: OtOrderStatusOK, OtOrderStatusMarketError,
OtOrderStatusNoMarketAccess, OtOrderStatusInternalError, OtOrderStatusSafetyLimitsExceeded,
OtOrderStatusValidationFailed, OtOrderStatusInternalDelete, OtOrderStatusExternalDelete,
OtOrderStatusNotSupported, OtOrderStatusInternalAdd.

OtOrderStopPrice
Stop price for order. Type: Double

OtOrderTag
Tag that identifies the order.Type: Long

OtOrderTemplate
Order template that the order should use. Type: String

OtOrderType
Order type. Type: String

OtOrderValidity
Order validity. Type: OtOrderValidityImmediate, OtOrderValidityToday, OtOrderValidityUntilCancelled

52
Copyright © 2014, Orc Group

OtOrderVolume
Volume for the order. Type: Long

Other Order constants

OtOrderKindSlice
Slice order. OtOrderSliceVolume, OtOrderNumberOfSlices, or both must be specified for this kind of order.

OtOrderKindStandard
Standard/normal order.

OtOrderSideBuy
Defines a buy side order.

OtOrderSideSell
Defines a sell side order.

OtOrderSlicePriceModificationTypeAsk
Base the price modification on the Ask price.

OtOrderSlicePriceModificationTypeBid
Base the price modification on the Bid price.

OtOrderSlicePriceModificationTypeLast
Base the price modification on Last market price.

OtOrderStatusExternalDelete
Order is being delete.

OtOrderStatusInternalAdd
Order is being added. An order cannot be modified/deleted in this state.

OtOrderStatusInternalDelete
Order is being deleted.

OtOrderStatusInternalError
Internal order error.

OtOrderStatusMarketError
Rejected by market.

OtOrderStatusNoMarketAccess
Market not accessible.

OtOrderStatusNotSupported
Order not supported.

53
Copyright © 2014, Orc Group

OtOrderStatusOK
Order OK.

OtOrderStatusSafetyLimitsExceeded
Order outside safety limits.

OtOrderStatusValidationFailed
Order validation failed.

OtOrderValidityImmediate
Order only valid at time of entry.

OtOrderValidityToday
Order valid today.

OtOrderValidityUntilCancelled
Order valid until cancelled.

Volatility surfaces

OtVolatilitySurfaceName
Volatility surface name

OtVolatilitySurfaceTag
Volatility surface tag

OtVolatilitySurfaceModel
Volatility surface model. The name must equal the model name visible in OT+ volatility surfaces manager, for
example "Wing", "SABR model", "Cybic spline (dynamic)".

OtVolatilitySurfaceCurves
Dictionary containing curves belonging to a volatility surface

OtVolatilitySurfaceParameters
Parameters for a volatility curve

OtVolatilitySurfacePoints
Points for a volatility curve

Strategy columns

OtStrategyStatus
Running state of the strategy. Type: OtStrategyStatusStarted, OtStrategyStatusStopped, OtStrategyStatusFailed.

Strategy constants

OtStrategyStatusStarted
Strategy is running.

54
Copyright © 2014, Orc Group

OtStrategyStatusStopped
Strategy is not running.

OtStrategyStatusFailed
Strategy could not be started or stopped running due to an error condition.

Portfolios

OtPortfolioName
Name of the portfolio.

OtPortfolioPositionCount
Field name of the field to use when getting the number of positions for a portfolio.

Positions

OtPositionPortfolio
Name of the portfolio of the position.

OtPositionCurrency
Currency (three letters) of the position.

OtPositionContractTag
Tag of the contract of the position.

OtPositionContractMarket
Market of the contract of the position.

OtPositionContractFeedcode
Feedcode of the contract of the position.

OtSetContractValueTag/OtSetContractValueMfc contract fields


The following lists contract fields that can be set using the OtSetContractValueTag and OtSetContractValueMfc
methods. However, note that the absence of a field in the list below does not necessarily mean that the field cannot
be used.

Column Description Short name Type

TAUTOTRADEDVOLUMEBIDCOLUMN Auto traded volume AT#(bid) Double


(bid)

TAUTOTRADEDVOLUMEASKCOLUMN Auto traded volume AT#(ask) Double


(ask)

TQUOTETRADEDVOLUMEBIDCOLUMN Quote traded volume QT#(bid) Double


(bid)

TQUOTETRADEDVOLUMEASKCOLUMN Quote traded volume QT#(ask) Double


(ask)

55
Copyright © 2014, Orc Group

TAUTOTRADEDALLOWEDVOLUME Allowed auto traded AT#(max) Double


volume

TQUOTETRADEDALLOWEDVOLUME Allowed quote traded QT#(max) Double


volume

TBIDRATEOFFSETCOLUMN Rate offset (bid) r.o.Bid Double

TASKRATEOFFSETCOLUMN ate offset (ask) r.o.Ask Double

TBIDVOLATILITYCOLUMN Volatility offset (bid) v.o.Bid Double

TASKVOLATILITYCOLUMN Volatility offset (ask) v.o.Ask Double

TAUTOQUOTINGCOLUMN Automated trading a Bool


on/off

TAUTOMASSQUOTINGBIDCOLUMN Auto mass quoting m Bool


on/off (bid)

TAUTOMASSQUOTINGASKCOLUMN Auto mass quoting m Bool


on/off (ask)

TAUTORESPONDINGBIDCOLUMN Auto responding on/off r Bool


(bid)

TAUTORESPONDINGASKCOLUMN Auto responding on/off r Bool


(ask)

TAUTODIMINGBIDCOLUMN Auto diming on/off (bid) d Bool

TAUTODIMINGASKCOLUMN Auto diming on/off (ask) d Bool

TAUTOTRADINGBIDCOLUMN Auto trading on/off (bid) t Bool

TAUTOTRADINGASKCOLUMN Auto trading on/off (ask) t Bool

TAUTOHEDGINGBIDCOLUMN Auto hedging on/off h Bool


(bid)

TAUTOHEDGINGASKCOLUMN Auto hedging on/off h Bool


(ask)

TQUOTEHOLDBIDCOLUMN Quote hold on/off (bid) p Bool

TQUOTEHOLDASKCOLUMN Quote hold on/off (ask) p Bool

TQUOTEHOLDBIDVOLUMECOLUMN Quote hold volume v Bool


on/off (bid)

TQUOTEHOLDASKVOLUMECOLUMN Quote hold volume v Bool


on/off (ask)

TMODELCOLUMN Theoretical model Model String

TVOLATILITYQUOTEOFFSETBIDCOLUMN Quote Volatility Offset oQVBid Double


(bid)

56
Copyright © 2014, Orc Group

TVOLATILITYQUOTEOFFSETASKCOLUMN Quote Volatility Offset oQVAsk Double


(ask)

TYIELDOFFSETCOLUMN Yield curve offset Y-offs Double

POVOLATILITYCOLUMN Risk volatility RVol Double

POQUOTEVOLATILITYCOLUMN Quote volatility QVol Double

POBIDVOLATILITYOFFSETCOLUMN Volatility offset (bid) bVo Double

POASKVOLATILITYOFFSETCOLUMN Volatility offset (ask) aVo Double

POBIDVOLATILITYQUOTEOFFSETCOLUMN Quote Volatility Offset bQVo Double


(bid)

POASKVOLATILITYQUOTEOFFSETCOLUMN Quote Volatility Offset aQVo Double


(ask)

POBIDRATEOFFSETCOLUMN Rate offset (bid) bRo Double

POASKRATEOFFSETCOLUMN Rate offset (ask) aRo Double

POUNDERLYINGRATECOLUMN Underlying rate UR Double

POYIELDOFFSETCOLUMN Yield offset Yield ofs Double

POBIDOFFSETCOLUMN Offset (bid) b.o Double

POASKOFFSETCOLUMN Offset (ask) b.o Double

POBIDQUOTEOFFSETCOLUMN Quote offset [bid] bQo Double

POASKQUOTEOFFSETCOLUMN Quote offset [ask] aQo Double

POBASEOFFSETCOLUMN Base offset Base ofs Double

POQUOTELOTMULTIPLIERCOLUMN Quote lot multiplier Q.lot Double

POQUOTESPREADCOLUMN Quote spread Q.s Double

POQUOTESPREADBIASCOLUMN Quote spread bias Q.s.b Double

TVOLATILITYCOLUMN Risk volatility RVol Double

TQUOTEVOLATILITYCOLUMN Quote volatility QVol Double

TMULTIPLIERCOLUMN Multiplier Mult. Double

TPRICEMULTIPLIERCOLUMN Price multiplier P.Mult. Double

TQUOTELOTMULTIPLIERCOLUMN Quote lot multiplier Q.lot Double

TRATEBIDCOLUMN Yield to maturity (bid) Bid(ytm) Double

TRATEASKCOLUMN Yield to maturity (ask) Ask(ytm) Double

TVALUATIONPRICEBIDCOLUMN Valuation price (bid) Val.bid Double

TVALUATIONPRICEASKCOLUMN Valuation price (ask) Val.ask Double

57
Copyright © 2014, Orc Group

TVEGAEXPOSURECOLUMN Vega exposure Vega Double


exposure

TBIDCOLUMN Price (bid) Bid Double

TASKCOLUMN Price (bid) Ask Double

TBIDVOLCOLUMN Volume (bid) b# Double

TASKVOLCOLUMN Volume (ask) a# Double

TOWNBIDORDERSVOLCOLUMN Volume of own orders Ob# Double


(bid)

TOWNASKORDERSVOLCOLUMN Volume of own orders Oa# Double


(ask)

TOWNBIDCOLUMN Quote (bid) Bid q Double

TOWNASKCOLUMN Quote (ask) Ask q Double

TOWNBIDVOLCOLUMN Quote volume (bid) Qb# Double

TOWNASKVOLCOLUMN Quote volume (ask) Qa# Double

TLASTCOLUMN Last paid Last Double

TCLOSINGCOLUMN Closing price Close Double

TSETTLEMENTPRICECOLUMN Settlement price Settl. Double

TVOLATILITYMARKUPCOLUMN Volatility markup v.mark Double

TVOLATILITYOFFSETSPREADCOLUMN Volatility offset spread v.spread Double

TBIDOFFSETCOLUMN Offset (bid) oBid Double

TASKOFFSETCOLUMN Offset (ask) oAsk Double

TBIDOFFSETINTICKSCOLUMN Offset expressed in otBid Double


ticks (bid)

TASKOFFSETINTICKSCOLUMN Offset expressed in otAsk Double


ticks (ask)

TQUOTEOFFSETBIDCOLUMN Quote Offset (bid) oQBid Double

TQUOTEOFFSETASKCOLUMN Quote Offset (ask) oQAsk Double

TPRICEMARKUPCOLUMN Price markup p.mark Double

TPRICEOFFSETSPREADCOLUMN Price offset spread p.spread Double

TQUOTEOFFSETMARKUPCOLUMN Quote offset markup oQ.mark Double

TQUOTEOFFSETSPREADCOLUMN Quote offset spread oQ.spread Double

TVOLATILITYQUOTEOFFSETMARKUPCOLUMN Quote Volatility offset oQV.mark Double


markup

58
Copyright © 2014, Orc Group

TVOLATILITYQUOTEOFFSETSPREADCOLUMN Quote Volatility offset oQV.spread Double


spread

TEEPCOLUMN Early exercise premium E.E.P. Double

TBASEOFFSETCOLUMN Base price offset Offset Double

TREFERENCEBIDCOLUMN Reference (bid) Ref b Double

TREFERENCEASKCOLUMN Reference (ask) Ref a Double

TFIXEDBASEPRICECOLUMN Fixed base price Fixed Double

TQUOTESPREADCOLUMN Quote spread Q.spread Double

TQUOTESPREADBIASCOLUMN Quote spread bias Q.s.bias Double

59

You might also like