{"id":7031,"date":"2025-08-28T22:12:00","date_gmt":"2025-08-29T03:12:00","guid":{"rendered":"https:\/\/librarytestdev.wpenginepowered.com\/?post_type=doc&#038;p=7031"},"modified":"2025-09-04T17:17:30","modified_gmt":"2025-09-04T22:17:30","slug":"creating-an-algo-definition","status":"publish","type":"doc","link":"https:\/\/library-staging.tradingtechnologies.com\/apis\/tt-core-sdk\/creating-a-tt-application-server\/creating-an-algo-definition\/","title":{"rendered":"Creating An Algo Definition"},"content":{"rendered":"\n<p>For each algo that you wish to implement, you must create a file named \u2018metadata.xml\u2019 which defines the algo\u2019s parameters and how they should be displayed in the TT user interface.  This definition file must then be deployed to the TT environment so the TT user interface can find it.<\/p>\n\n<section>\nThis file must describe the algorithm, its parameters and its graphical layout using FIXatdl. The following is an introduction to a subset of the FIXatdl functionality most commonly used in TT Algo SDK algos. For complete details, see the official <a href=\"http:\/\/www.fixtradingcommunity.org\/pg\/structure\/tech-specs\/fixatdl\">FIXatdl<\/a> web site.\n    <p>The <b>metadata.xml<\/b> file describes the algo with the following XML element hierarchy:<\/p>\n  \n    <figure class=\"highlight\"><pre><code class=\"language-xml\" data-lang=\"xml\"><span class=\"cp\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;<\/span>\n<span class=\"nt\">&lt;Strategy&gt;<\/span>\n  <span class=\"nt\">&lt;Parameter&gt;<\/span> . . . <span class=\"nt\">&lt;\/Parameter&gt;<\/span>\n  . . .\n  <span class=\"nt\">&lt;Parameter&gt;<\/span> . . . <span class=\"nt\">&lt;\/Parameter&gt;<\/span>\n  <span class=\"nt\">&lt;StrategyLayout&gt;<\/span>\n  . . .\n  <span class=\"nt\">&lt;\/StrategyLayout&gt;<\/span>\n<span class=\"nt\">&lt;\/Strategy&gt;<\/span><\/code><\/pre><\/figure>\n\n  \n    <p>The basic structure of this file includes the following sections:<\/p>\n    <ul>\n      <li><a href=\"#file-header\">File header<\/a><\/li>\n      <li><a href=\"#algo-name\">Algo name and description<\/a><\/li>\n      <li><a href=\"#param-descriptions\">Algo parameter definitions<\/a><\/li>\n      <li><a href=\"#param-layout\">Algo input parameters UI layout<\/a><\/li>\n    <\/ul>\n    <p>The TT Algo SDK software package includes the necessary FIXatdl schema files. They can be used to create a conforming FIXatdl document.  The portions of the specification that are not supported by TT Algo SDK algos have been commented out.<\/p>\n    <!--\n    File header section\n    -->\n    <h3 id=\"file-header\">Section: file header<\/h3>\n    <p>The file header consists of the following:<\/p>\n  \n    <div class=\"codeSample\">\n<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<\/p>\n<\/div>\n  \n    <!--\n    Algo name section\n    -->\n    <h3 id=\"algo-name\">Section: algo name and description<\/h3>\n    <p>The &lt;Strategy&gt; element&#8217;s <strong>xmlns<\/strong> attributes specify the basic information about the algo. In addition to the FixATDL namespaces and schema information, it includes algo-specific attributes.<\/p>\n  \n    <div class=\"codeSample\">\n\t<p>&lt;Strategy xmlns=&#8221;http:\/\/www.fixprotocol.org\/FIXatdl-1-1\/Core&#8221;<\/p>\n\t<p>\u00a0 xmlns:val=&#8221;http:\/\/www.fixprotocol.org\/FIXatdl-1-1\/Validation&#8221;<\/p>\n\t<p>\u00a0 xmlns:lay=&#8221;http:\/\/www.fixprotocol.org\/FIXatdl-1-1\/Layout&#8221;<\/p>\n\t<p>\u00a0 xmlns:flow=&#8221;http:\/\/www.fixprotocol.org\/FIXatdl-1-1\/Flow&#8221;<\/p>\n\t<p>\u00a0 xmlns:xsi=&#8221;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#8221;<\/p>\n\t<p>\u00a0 xsi:schemaLocation=&#8221;http:\/\/www.fixprotocol.org\/FIXatdl-1-1\/Core tt-fixatdl-core-1-1.xsd&#8221;<\/p>\n\t<p>\u00a0 <code>name=<\/code>&#8220;MyAlgo&#8221; <code>uiRep=<\/code>&#8220;My Algo&#8221; <code>version=<\/code>&#8220;1.0.0&#8221; <code>providerID=<\/code>&#8220;TBD&#8221; <code>entryFile=<\/code>&#8220;myAlgo.so&#8221;<\/p>\n\t<p>&gt;<\/p>\n<\/div>\n  \n    <p>The &lt;Strategy&gt; element must specify the following algo-specific attributes:<\/p>\n    <ul>\n      <li>\n        <p><span class=\"param\">name<\/span>: Short name of the algo as displayed in the list of algos that a user has permission to launch<\/p>\n        <p><img decoding=\"async\" class=\"img-responsive\" src=\"https:\/\/library-staging.tradingtechnologies.com\/wp-content\/uploads\/2025\/08\/atdl-algo-name-param.png\" alt=\"Add-PIC\"><\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">uiRep<\/b>: Full name of the algo as displayed in the algo\u2019s parameter pane<\/p>\n        <p><img decoding=\"async\" class=\"img-responsive\" src=\"https:\/\/library-staging.tradingtechnologies.com\/wp-content\/uploads\/2025\/08\/atdl-algo-uirep-param.png\" alt=\"Add-PIC\"><\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">version<\/b>: Developer-defined version of the algo<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">providerID<\/b>: ID of the firm providing the algorithm<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">entryFile<\/b>: Name of the algo\u2019s shared object (<b>.so<\/b>) file<\/p>\n      <\/li>\n    <\/ul>\n  \n    <!--\n    Parameters section\n    -->\n    <h3 id=\"param-descriptions\">Section: algo parameter descriptions<\/h3>\n    <p>Each input and output parameter must be defined with a separate &lt;Parameter&gt; element. The following code snippet shows several sample &lt;Parameter&gt; elements:<\/p>\n  \n    <div class=\"codeSample\">\n<p>&lt;Parameter <code>name<\/code>=&#8221;instr_id_1&#8243; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;false&#8221; <code>xsi:type<\/code>=&#8221;String_t&#8221;\/&gt;<\/p>\n<p>&lt;Parameter <code>name<\/code>=&#8221;instr_acct_1&#8243; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;false&#8221; <code>xsi:type<\/code>=&#8221;String_t&#8221;\/&gt;<\/p>\n<p>&lt;Parameter <code>name<\/code>=&#8221;order_price_1&#8243; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;true&#8221; <code>xsi:type<\/code>=&#8221;Price_t&#8221;\/&gt;<\/p>\n<p>&lt;Parameter <code>name<\/code>=&#8221;order_qty_1&#8243; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;true&#8221; <code>xsi:type<\/code>=&#8221;Qty_t&#8221;\/&gt; \u00a0 \u00a0<\/p>\n<\/div>\n  \n  \n    <p>The &lt;Parameter&gt; element requires the following attributes:<\/p>\n    <ul>\n      <li>\n        <p><b class=\"param\">name<\/b>: Name of the parameter<\/p>\n        <p>No two parameters of any strategy may have the same name. Names are case-sensitive and must begin with an alpha character followed only by alpha-numeric characters that must not contain whitespace characters. The value is not case-sensitive.<\/p>\n        <p>TT supports several special names which, when used, allow the user to launch the algo more quickly from MD Trader. These fields will be automatically populated with the corresponding values based on where the user clicks.<\/p>\n        <table class=\"table table-striped table-bordered\" border=\"1\">\n    <tbody>\n        <tr>\n            <td><p><b>Parameter Name<\/b><\/p><\/td>\n            <td><p><b>Description<\/b><\/p><\/td>\n            <td> <p><b>Values<\/b><\/p><\/td>\n        <\/tr>\n        <tr>\n            <td>\n                <p>__instr_id<\/p>\n            <\/td>\n            <td>\n                <p>Instrument ID<\/p>\n            <\/td>\n            <td>\n                <p><\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td>\n                <p>__order_quantity<\/p>\n            <\/td>\n            <td>\n                <p>Order Quantity<\/p>\n            <\/td>\n            <td>\n                <p><\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td>\n                <p>__account<\/p>\n            <\/td>\n            <td>\n                <p>Account<\/p>\n            <\/td>\n            <td>\n                <p><\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td>\n                <p>__side<\/p>\n            <\/td>\n            <td>\n                <p>Order Side<\/p>\n            <\/td>\n            <td>\n                <p>SIDE_BUY = 1<\/p>\n                <p>SIDE_SELL = 2<\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td>\n                <p>__price<\/p>\n            <\/td>\n            <td>\n                <p>Order price in decimal format<\/p>\n            <\/td>\n            <td>\n                <p><\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td>\n                <p>__tif<\/p>\n            <\/td>\n            <td>\n                <p>\n                <\/p><p>Time-In-Force<\/p>\n            <\/td>\n            <td>\n                <p>TIME_IN_FORCE_DAY = 1<\/p>\n                <p>TIME_IN_FORCE_GOOD_TILL_CANCEL = 2<\/p>\n                <p>TIME_IN_FORCE_AT_THE_OPENING = 3<\/p>\n                <p>TIME_IN_FORCE_IMMEDIATE_OR_CANCEL = 4<\/p>\n                <p>TIME_IN_FORCE_FILL_OR_KILL = 5<\/p>\n                <p>TIME_IN_FORCE_GOOD_TILL_CROSSING = 6<\/p>\n                <p>TIME_IN_FORCE_GOOD_TILL_DATE = 7<\/p>\n                <p>TIME_IN_FORCE_AT_THE_CLOSE = 8<\/p>\n                <p>TIME_IN_FORCE_GOOD_THROUGH_CROSSING = 9<\/p>\n                <p>TIME_IN_FORCE_AT_CROSSING = 10<\/p>\n                <p>TIME_IN_FORCE_AUCTION = 13<\/p>\n                <p>TIME_IN_FORCE_GOOD_IN_SESSION = 14<\/p>\n                <p>TIME_IN_FORCE_DAY_PLUS = 15<\/p>\n                <p>TIME_IN_FORCE_GOOD_TILL_CANCEL_PLUS = 16<\/p>\n                <p>TIME_IN_FORCE_GOOD_TILL_DATE_PLUS = 17<\/p>\n                <p>TIME_IN_FORCE_GOOD_TILL_TIME = 18<\/p>\n                <p>TIME_IN_FORCE_CLOSING_PRICE_CROSS = 19<\/p>\n                <p>TIME_IN_FORCE_IMMEDIATE_OR_CANCEL_PLUS = 20<\/p>\n                <p>TIME_IN_FORCE_FILL_OR_KILL_PLUS = 21<\/p>\n                <p>TIME_IN_FORCE_MORNING_AT_THE_CLOSE = 22<\/p>\n                <p>TIME_IN_FORCE_AFTERNOON_AT_THE_CLOSE = 23<\/p>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td>\n                <p>__type<\/p>\n            <\/td>\n            <td>\n                <p>Order Type<\/p>\n            <\/td>\n            <td>\n                <p>ORDER_TYPE_MKT = 1<\/p>\n                <p>ORDER_TYPE_LIM = 2<\/p>\n                <p>ORDER_TYPE_SM = 3<\/p>\n                <p>ORDER_TYPE_SL = 4<\/p>\n                <p>ORDER_TYPE_ICE = 5<\/p>\n                <p>ORDER_TYPE_Block = 6<\/p>\n                <p>ORDER_TYPE_Cross = 7<\/p>\n                <p>ORDER_TYPE_BOC = 8<\/p>\n                <p>ORDER_TYPE_OCO = 9<\/p>\n                <p>ORDER_TYPE_MV = 10<\/p>\n                <p>ORDER_TYPE_MOO = 11<\/p>\n                <p>ORDER_TYPE_EFP_I = 12<\/p>\n                <p>ORDER_TYPE_EFP = 13<\/p>\n                <p>ORDER_TYPE_VOLA = 14<\/p>\n                <p>ORDER_TYPE_EFP_FI = 15<\/p>\n                <p>ORDER_TYPE_BL = 16<\/p>\n                <p>ORDER_TYPE_SBL = 17<\/p>\n                <p>ORDER_TYPE_IFBL = 18<\/p>\n                <p>ORDER_TYPE_SL_OSE = 19<\/p>\n                <p>ORDER_TYPE_MTL = 20<\/p>\n                <p>ORDER_TYPE_MLM = 21<\/p>\n                <p>ORDER_TYPE_COMMITTED = 22<\/p>\n                <p>ORDER_TYPE_BASIS = 23<\/p>\n                <p>ORDER_TYPE_GCROSS = 24<\/p>\n                <p>ORDER_TYPE_ASSETALLOC = 25<\/p>\n                <p>ORDER_TYPE_PROF = 26<\/p>\n                <p>ORDER_TYPE_ONESIDED = 27<\/p>\n                <p>ORDER_TYPE_COMBINATION = 28<\/p>\n                <p>ORDER_TYPE_AGAINSTACTUAL = 29<\/p>\n                <p>ORDER_TYPE_SMTL = 30<\/p>\n                <p>ORDER_TYPE_MIT = 31<\/p>\n                <p>ORDER_TYPE_LIT = 32<\/p>\n                <p>ORDER_TYPE_ITMTL = 33<\/p>\n                <p>ORDER_TYPE_EFS = 34<\/p>\n                <p>ORDER_TYPE_FLEXFUT = 35<\/p>\n                <p>ORDER_TYPE_FLEXOPT = 36<\/p>\n                <p>ORDER_TYPE_LPO = 37<\/p>\n                <p>ORDER_TYPE_MARKET_CLOSE_TODAY = 38<\/p>\n                <p>ORDER_TYPE_LIMIT_CLOSE_TODAY = 39<\/p>\n                <p>ORDER_TYPE_LIMIT_REDUCE_ONLY = 40<\/p>\n                <p>ORDER_TYPE_MARKET_REDUCE_ONLY = 41<\/p>\n                <p>ORDER_TYPE_DISCRETION = 42<\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n        <p>For example:<\/p>\n        <div class=\"codeSample\">\n\n\n    <p>&lt;Parameter <code>name<\/code>=&#8221;__instr_id&#8221; <code>xsi:type<\/code>=&#8221;String_t&#8221; <code>refValue<\/code>=&#8221;OrderInstrumentID&#8221; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;false&#8221;\/&gt;<\/p>\n\n    <p>&lt;Parameter <code>name<\/code>=&#8221;__order_quantity&#8221; <code>xsi:type<\/code>=&#8221;Qty_t&#8221; <code>refValue<\/code>=&#8221;OrderQty&#8221; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;true&#8221;\/&gt;<\/p>\n\n    <p>&lt;Parameter <code>name<\/code>=&#8221;__account&#8221; <code>xsi:type<\/code>=&#8221;String_t&#8221; <code>refValue<\/code>=&#8221;OrderAccount&#8221; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;false&#8221;\/&gt;<\/p>\n\n    <p>&lt;Parameter <code>name<\/code>=&#8221;__side&#8221; <code>xsi:type<\/code>=&#8221;Int_t&#8221; <code>refValue<\/code>=&#8221;OrderSide&#8221; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;false&#8221;\/&gt;<\/p>\n\n    <p>&lt;Parameter <code>name<\/code>=&#8221;__price&#8221; <code>xsi:type<\/code>=&#8221;Price_t&#8221; <code>refValue<\/code>=&#8221;OrderPrice&#8221; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;true&#8221;\/&gt;<\/p>\n\n    <p>&lt;Parameter <code>name<\/code>=&#8221;__tif&#8221; <code>xsi:type<\/code>=&#8221;Int_t&#8221; <code>refValue<\/code>=&#8221;OrderTIF&#8221; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;false&#8221;\/&gt;<\/p>\n\n    <p>&lt;Parameter <code>name<\/code>=&#8221;__type&#8221; <code>xsi:type<\/code>=&#8221;Int_t&#8221; <code>refValue<\/code>=&#8221;OrderType&#8221; <code>required<\/code>=&#8221;true&#8221; <code>dir<\/code>=&#8221;In&#8221; <code>updateable<\/code>=&#8221;false&#8221;\/&gt;<\/p>\n\n<\/div>\n\n      <\/li>\n      <li>\n        <p><b class=\"param\">required<\/b>: Whether the parameter is required. Valid values are &#8220;true&#8221; or &#8220;false&#8221;. The value is not case-sensitive.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">initValue<\/b>: Initial value for the parameter.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">dir<\/b>: Whether a parameter is an input (&#8220;In&#8221;), an output (&#8220;Out&#8221;), or both (&#8220;Both&#8221;). The value is not case-sensitive.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">updateable<\/b>: Whether the parameter can be updated after the algo is launched. Valid values are &#8220;true&#8221; or &#8220;false&#8221;.  The value is not case-sensitive.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">xsi:type<\/b>: Data type corresponding to the parameter value:<\/p>\n        <ul>\n          <li><b>Int_t<\/b>: Integer value.<\/li>\n          <li><b>Float_t<\/b>: Decimal value.<\/li>\n          <li><b>Qty_t<\/b>: Value representing an instrument, fill or order quantity.<\/li>\n          <li><b>Price_t<\/b>: Value representing an instrument, fill or order price.<\/li>\n          <li><b>PriceOffset_t<\/b>: Value representing the number of ticks to offset a price.\n            <br><b>Note:<\/b> All of the above types support the following attributes:\n            <ul>\n              <li><b>minValue<\/b>: Minimum value of the parameter accepted by the algorithm provider.<\/li>\n              <li><b>maxValue<\/b>: Maximum value of the parameter accepted by the algorithm provider.<\/li>\n              <li><b>constValue<\/b>: Value of a parameter that is constant and is not presented in the UI. This value must be sent on the wire by the order generating application.<\/li>\n            <\/ul>\n          <\/li>\n          <li><b>String_t<\/b>: String value. This type supports the following attributes:\n            <ul>\n              <li><b>minLength<\/b>: Minimum allowable length of the string.<\/li>\n              <li><b>maxLength<\/b>: Maximum allowable length of the string.<\/li>\n              <li><b>constValue<\/b>: String value that is constant and is not presented in the UI. This value must be sent on the wire by the order-generating application.<\/li>\n            <\/ul>\n          <\/li>\n          <li><b>Boolean_t<\/b>: Boolean value. Valid values are &#8220;true&#8221; or &#8220;false&#8221;. The value is not case-sensitive.<\/li>\n          <li><b>UTCTimestamp_t<\/b>: UTC timestamp.<\/li>\n        <\/ul>\n      <\/li>\n    <\/ul>\n  \n    <p>In TT, instruments and accounts are uniquely identified by 64-bit integers. As FIXatdl does not define this data type, you must use the <b>String_t<\/b> type to pass 64-bit integers.<\/p>\n    <p>Each &lt;Parameter&gt; element can include optional &lt;EnumPair&gt; sub-elements to enumerate a list of valid values.<\/p>\n  \n    <div class=\"codeSample\">\n<p>&lt;Parameter name=&#8221;order_side_1&#8243; required=&#8221;true&#8221; dir\n<\/p><p>\u00a0 &lt;EnumPair <code>enumID<\/code>=&#8221;eBid&#8221; <code>wireValue<\/code>=&#8221;1&#8243;\/&gt;<\/p>\n<p>\u00a0 &lt;EnumPair <code>enumID<\/code>=&#8221;eAsk&#8221; <code>wireValue<\/code>=&#8221;2&#8243;\/&gt;<\/p>\n<p>&lt;\/Parameter&gt;<\/p>\t\n<\/div>\n  \n    <p>The &lt;EnumPair&gt; element supports the following attributes:<\/p>\n    <ul>\n      <li>\n        <p><b class=\"param\">enumID<\/b>: List item identifier. No two list items may have the same name.<\/p>\n        <p>Names must begin with an alpha character followed only by alpha-numeric characters and must not contain whitespace characters.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">wireValue<\/b>: Corresponding index sent on the wire.<\/p>\n      <\/li>\n    <\/ul>\n    <p>The following code snippet shows a sample &lt;Parameter&gt; element with some &lt;EnumPair&gt; elements:<\/p>\n  \n  \n    <!--\n    Layout section\n    -->\n    <h3 id=\"param-layout\">Section: algo input parameters UI layout<\/h3>\n    <p>You need to specify how each input parameter will be displayed. The most basic structure of the XML for specifying the layout of parameters uses the &lt;lay:StrategyLayout&gt; as follows:<\/p>\n  \n    <div class=\"codeSample\">\n<p>&lt;lay:StrategyLayout&gt;<\/p>\n<p>\u00a0 &lt;lay:StrategyPanel orientation=&#8221;VERTICAL&#8221;&gt;<\/p>\n<p>\u00a0 \u00a0 &lt;!&#8211;\u00a0<\/p>\n<p>\u00a0 \u00a0 \u00a0 Specify layout of input parameters here with &lt;lay:Control&gt; elements\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0 \u00a0 \u00a0 . . .<\/p>\n<p>\u00a0 \u00a0 &#8211;&gt;<\/p>\n<p>\u00a0 &lt;\/lay:StrategyPanel&gt;<\/p>\n<p>&lt;\/lay:StrategyLayout&gt;<\/p>\n<\/div>\n  \n    <p>The layout of each input parameter must be defined with a separate &lt;lay:Control&gt; element.<\/p>\n  \n    <div class=\"codeSample\">\n<p>&lt;lay:StrategyLayout&gt;<\/p>\n<p>\u00a0 &lt;lay:StrategyPanel orientation=&#8221;VERTICAL&#8221;&gt;<\/p>\n<p>\u00a0 \u00a0 \u00a0 &lt;lay:Control <code>ID<\/code>=&#8221;instr_id_ctrl_1&#8243; <code>parameterRef<\/code>=&#8221;instr_id_1&#8243; <code>xsi:type<\/code>=&#8221;lay:MarketExplorer_t&#8221;\u00a0<\/p>\n  <p>\u00a0 \u00a0 \u00a0 \u00a0 <code>label<\/code>=&#8221;Instrument&#8221;\/&gt;<\/p>\n  <p>\u00a0 \u00a0 \u00a0 &lt;lay:Control <code>ID<\/code>=&#8221;instr_acct_ctrl_1&#8243; <code>parameterRef<\/code>=&#8221;instr_acct_1&#8243; <code>xsi:type<\/code>=&#8221;lay:TTAccounts_t&#8221;\u00a0<\/p>\n  <p>\u00a0 \u00a0 \u00a0 \u00a0 <code>label<\/code>=&#8221;Account&#8221; dependentParam=&#8221;instr_id_1&#8243;\/&gt;<\/p>\n  <p>\u00a0 \u00a0 \u00a0 &lt;lay:Control <code>ID<\/code>=&#8221;order_price_ctrl_1&#8243; <code>parameterRef<\/code>=&#8221;order_price_1&#8243; <code>xsi:type<\/code>=&#8221;lay:SingleSpinner_t&#8221;\u00a0<\/p>\n  <p>\u00a0 \u00a0 \u00a0 \u00a0 <code>label<\/code>=&#8221;Order Price&#8221; dependentParam=&#8221;instr_id_1&#8243;\/&gt;<\/p>\n  <p>\u00a0 \u00a0 \u00a0 &lt;lay:Control <code>ID<\/code>=&#8221;order_qty_ctrl_1&#8243; <code>parameterRef<\/code>=&#8221;order_qty_1&#8243; <code>xsi:type<\/code>=&#8221;lay:SingleSpinner_t&#8221;\u00a0<\/p>\n  <p>\u00a0 \u00a0 \u00a0 \u00a0 <code>label<\/code>=&#8221;Order Qty&#8221;\/&gt;<\/p>\n<p>\u00a0 &lt;\/lay:StrategyPanel&gt;<\/p>\n<p>&lt;\/lay:StrategyLayout&gt;<\/p>\n<\/div>\n  \n    <p>The &lt;lay:Control&gt; element supports the following attributes:<\/p>\n    <ul>\n      <li>\n        <p><b class=\"param\">ID<\/b>: Unique ID for the control.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">parameterRef<\/b>: The <em>name<\/em> attribute of the &lt;Parameter&gt; element that corresponds to the control.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">dependentParam<\/b>: The <em>name<\/em> attribute of the &lt;Parameter&gt; element on which this control depends.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">tooltip<\/b>: Tooltip text for the parameter.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">label<\/b>: String to display next to the control.<\/p>\n      <\/li>\n      <li>\n        <p><b class=\"param\">xsi:type<\/b>: Type of UI control:<\/p>\n        <ul>\n          <li><b>lay:MarketExplorer_t<\/b><\/li>\n          <li><b>lay:TTAccounts_t<\/b><\/li>\n          <li><b>lay:TextField_t<\/b><\/li>\n          <li><b>lay:Slider_t<\/b><\/li>\n          <li><b>lay:CheckBox_t<\/b><\/li>\n          <li><b>lay:SingleSpinner_t<\/b><\/li>\n          <li><b>lay:Clock_t<\/b><\/li>\n          <li><b>lay:DropDownList_t<\/b><\/li>\n          <li><b>lay:RadioButton_t<\/b><\/li>\n        <\/ul>\n      <\/li>\n    <\/ul>\n    <p>Each &lt;lay:Control&gt; element can use optional &lt;lay:ListItem&gt; sub-elements to enumerate a list of valid values. <\/p>\n  \n    <div class=\"codeSample\">\n\t<p>&lt;lay:StrategyLayout&gt;<\/p>\n\t<p>\u00a0 &lt;lay:StrategyPanel orientation=&#8221;VERTICAL&#8221;&gt;<\/p>\n\t<p>\u00a0 \u00a0 \u00a0 &lt;lay:Control ID=&#8221;order_side_ctrl_1&#8243; parameterRef=&#8221;order_side_1&#8243; xsi:type=&#8221;lay:DropDownList_t&#8221;\u00a0<\/p>\n\t<p>\u00a0 \u00a0 \u00a0 \u00a0 label=&#8221;Order Side&#8221;&gt;<\/p>\n\t<p>\u00a0 \u00a0 \u00a0 \u00a0 &lt;lay:ListItem <code>enumID<\/code>=&#8221;eBid&#8221; <code>uiRep<\/code>=&#8221;Bid&#8221; \/&gt;<\/p>\n\t<p>\u00a0 \u00a0 \u00a0 \u00a0 &lt;lay:ListItem <code>enumID<\/code>=&#8221;eAsk&#8221; <code>uiRep<\/code>=&#8221;Ask&#8221; \/&gt;<\/p>\n\t<p>\u00a0 \u00a0 \u00a0 &lt;\/lay:Control&gt;<\/p>\n\t<p>\u00a0 &lt;\/lay:StrategyPanel&gt;<\/p>\n\t<p>&lt;\/lay:StrategyLayout&gt;<\/p>\n<\/div>\n  \n    <p>The  &lt;lay:ListItem&gt;element supports the following attributes:<\/p>\n    <ul>\n      <li>\n        <b class=\"param\">enumID<\/b>: The <em>enumID<\/em> of the corresponding &lt;EnumPair&gt; element.\n      <\/li>\n      <li>\n        <b class=\"param\">uiRep<\/b>: String to display for the control.\n      <\/li>\n    <\/ul>\n    <p>The following code snippet shows a completed sample &lt;lay:StrategyLayout&gt; element based on all of the &lt;Parameter&gt; elements defined above.<\/p>\n  \n    <div class=\"codeSample\">\n<p>&lt;lay:StrategyLayout&gt;<\/p>\n<p>\u00a0 &lt;lay:StrategyPanel orientation=&#8221;VERTICAL&#8221;&gt;<\/p>\n<p>\u00a0 \u00a0 \u00a0 &lt;lay:Control <code>ID<\/code>=&#8221;instr_id_ctrl_1&#8243; <code>parameterRef<\/code>=&#8221;instr_id_1&#8243; <code>xsi:type<\/code>=&#8221;lay:MarketExplorer_t&#8221;\u00a0<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 <code>label<\/code>=&#8221;Instrument&#8221;\/&gt;<\/p>\n<p>\u00a0 \u00a0 \u00a0 &lt;lay:Control <code>ID<\/code>=&#8221;instr_acct_ctrl_1&#8243; <code>parameterRef<\/code>=&#8221;instr_acct_1&#8243; <code>xsi:type<\/code>=&#8221;lay:TTAccounts_t&#8221;\u00a0<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 <code>label<\/code>=&#8221;Account&#8221; dependentParam=&#8221;instr_id_1&#8243;\/&gt;<\/p>\n<p>\u00a0 \u00a0 \u00a0 &lt;lay:Control <code>ID<\/code>=&#8221;order_price_ctrl_1&#8243; <code>parameterRef<\/code>=&#8221;order_price_1&#8243; <code>xsi:type<\/code>=&#8221;lay:SingleSpinner_t&#8221;\u00a0<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 <code>label<\/code>=&#8221;Order Price&#8221; dependentParam=&#8221;instr_id_1&#8243;\/&gt;<\/p>\n<p>\u00a0 \u00a0 \u00a0 &lt;lay:Control <code>ID<\/code>=&#8221;order_qty_ctrl_1&#8243; <code>parameterRef<\/code>=&#8221;order_qty_1&#8243; <code>xsi:type<\/code>=&#8221;lay:SingleSpinner_t&#8221;\u00a0<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 <code>label<\/code>=&#8221;Order Qty&#8221;\/&gt;<\/p>\n<p>\u00a0 \u00a0 \u00a0 &lt;lay:Control <code>ID<\/code>=&#8221;order_side_ctrl_1&#8243; <code>parameterRef<\/code>=&#8221;order_side_1&#8243; <code>xsi:type<\/code>=&#8221;lay:DropDownList_t&#8221;\u00a0<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 <code>label<\/code>=&#8221;Order Side&#8221;&gt;<\/p>\n\t<p>\u00a0 \u00a0 \u00a0 \u00a0 &lt;lay:ListItem <code>enumID<\/code>=&#8221;eBid&#8221; <code>uiRep<\/code>=&#8221;Bid&#8221; \/&gt;<\/p>\n\t<p>\u00a0 \u00a0 \u00a0 \u00a0 &lt;lay:ListItem <code>enumID<\/code>=&#8221;eAsk&#8221; <code>uiRep<\/code>=&#8221;Ask&#8221; \/&gt;<\/p>\n<p>\u00a0 \u00a0 \u00a0 &lt;\/lay:Control&gt;<\/p>\n<p>\u00a0 &lt;\/lay:StrategyPanel&gt;<\/p>\n<p>&lt;\/lay:StrategyLayout&gt;<\/p>\n<\/div>\n  \n    <p hidden>Note that the <b>instr_acct_ctrl_1<\/b> and <b>order_price_ctrl_1<\/b> controls have their <b>dependentParam<\/b> attribute set to &#8220;instr_id_1&#8221;.  As a result, the list of accounts displayed in the <b>Account<\/b> drop-down list will be filtered to show only those accounts that have permissions to trade this instrument. And when the user clicks the left or right mouse buttons while focus is on the <b>Order Price<\/b> single-spinner control, the price displayed will be decremented or incremented by one tick.<\/p>\n    <p>Notice the following about the sample:<\/p>\n    <ul>\n      <li>The <b>instr_acct_ctrl_1<\/b> and <b>order_price_ctrl_1<\/b> controls have their <b>dependentParam<\/b> attribute set to &#8220;instr_id_1&#8221;.  As a result, the list of accounts displayed in the <b>Account<\/b> drop-down list will be filtered to show only those accounts that have permissions to trade this instrument.<\/li>\n      <li>When the user clicks the left or right mouse buttons while focus is on the <b>Order Price<\/b> single-spinner control, the price displayed will be decremented or incremented by one tick.<\/li>\n      <li>The <b>order_side_ctrl_1<\/b> element populates a drop-down list that ensures the user can choose only valid values (Bid or Ask).<\/li>\n    <\/ul>\n    <p>As noted, this example shows basic functionality.  See the FIXatdl schema files included in the TT Algo SDK package as well as the official <a href=\"http:\/\/www.fixtradingcommunity.org\/pg\/structure\/tech-specs\/fixatdl\">FIXatdl<\/a> web site for complete details.<\/p>\n  <\/section>\n","protected":false},"excerpt":{"rendered":"<p>For each algo that you wish to implement, you must create a file named \u2018metadata.xml\u2019 which defines the algo\u2019s [&hellip;]<\/p>\n","protected":false},"author":2,"template":"wp-custom-template-single-doc-tt-core-sdk","meta":{"_acf_changed":false,"footnotes":""},"docs-category":[449],"class_list":["post-7031","doc","type-doc","status-publish","hentry","docs-category-creating-a-tt-application-server"],"acf":[],"_links":{"self":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/7031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc"}],"about":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/types\/doc"}],"author":[{"embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":0,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/7031\/revisions"}],"wp:attachment":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/media?parent=7031"}],"wp:term":[{"taxonomy":"docs-category","embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/docs-category?post=7031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}