{"id":8058,"date":"2025-09-04T23:22:21","date_gmt":"2025-09-05T04:22:21","guid":{"rendered":"https:\/\/librarytestdev.wpenginepowered.com\/?post_type=doc&#038;p=8058"},"modified":"2025-09-04T23:23:53","modified_gmt":"2025-09-05T04:23:53","slug":"introduction-to-strategy-creation","status":"publish","type":"doc","link":"https:\/\/library-staging.tradingtechnologies.com\/apis\/tt-net-sdk\/working-with-instruments-tt-net-sdk\/introduction-to-strategy-creation\/","title":{"rendered":"Introduction to Strategy Creation"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">TT .NET SDK provides the ability to construct exchange-tradable, user-defined strategies and then submit them to the exchange to be listed. The legs of these strategies can be options, futures, or spreads depending on the exchange.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For an overview of creating strategies in TT, refer to the&nbsp;<a href=\"\/trade\/sc-strategy-creation-overview.html\">Strategy Creation Overview<\/a>&nbsp;in the Trade help.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note: Currently, TT .NET SDK supports creating strategies on the same exhanges as the Strategy Creation widget except for LME and FEX.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following code snippet shows the creation of a simple two leg strategy. In this sample, we set the following parameters for the strategy:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"\/tt-net-sdk\/api\/tt_net_sdk.Instrument.html\">Instrument<\/a>\u00a0Each leg sets the value of the instrument to trade.<\/li>\n\n\n\n<li><a href=\"\/tt-net-sdk\/api\/tt_net_sdk.OrderSide.html\">OrderSide<\/a>\u00a0Sets the Buy\/Sell direction of the leg.<\/li>\n\n\n\n<li><a href=\"\/tt-net-sdk\/api\/tt_net_sdk.StrategyLegDefinition.html#tt_net_sdk_StrategyLegDefinition_RatioQuantity\">RatioQuantity<\/a>\u00a0Sets the ratio of the leg to the.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>List&lt;StrategyLegDefinition&gt; strategyLegDefinitions = new List&lt;StrategyLegDefinition&gt;();\nInstrument instr = \/\/Instrument1\nStrategyLegDefinition leg1 = new StrategyLegDefinition(instr.InstrumentDetails.Id);\nleg1.Side = OrderSide.Buy;\nleg1.RatioQuantity = 1;\nstrategyLegDefinitions.Add(leg1);\n\nInstrument instr2 = \/\/Instrument2\nStrategyLegDefinition leg2 = new StrategyLegDefinition(instr2.InstrumentDetails.Id);\nleg2.Side = OrderSide.Sell;\nleg2.RatioQuantity = 1;\nstrategyLegDefinitions.Add(leg2);\n\nInstrumentLookup lookup = new InstrumentLookup(this.dispatcher);\nlookup.OnData += new EventHandler&lt;InstrumentLookupEventArgs&gt;(StrategyCreationSubscription_StrategyCreationUpdate);\nlookup.CreateStrategy(strategyLegDefinitions, apiInstance.DefaultAccount, MarketId.CME);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p class=\"wp-block-paragraph\">TT .NET SDK provides the ability to construct exchange-tradable, user-defined strategies and then submit them to the exchange to be listed. The legs of these strategies can be options, futures, or spreads depending on the exchange.<\/p>\n<p class=\"wp-block-paragraph\">For an overview of creating strategies in TT, refer to the&nbsp;<a href=\"\/trade\/sc-strategy-creation-overview.html\">Strategy Creation Overview<\/a>&nbsp;in the Trade help.<\/p>\n<p class=\"wp-block-paragraph\">Note: Currently, TT .NET SDK supports creating strategies on the same exhanges as the Strategy Creation widget except for LME and FEX.<\/p>\n<p class=\"wp-block-paragraph\">The following code snippet shows the creation of a simple two leg strategy. In this sample, we set the following parameters for the strategy:<\/p>\n","protected":false},"author":2,"template":"wp-custom-template-single-doc-tt-net-sdk","meta":{"_acf_changed":true,"footnotes":""},"docs-category":[772],"class_list":["post-8058","doc","type-doc","status-publish","hentry","docs-category-working-with-instruments-tt-net-sdk"],"acf":[],"_links":{"self":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/doc\/8058","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\/8058\/revisions"}],"wp:attachment":[{"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/media?parent=8058"}],"wp:term":[{"taxonomy":"docs-category","embeddable":true,"href":"https:\/\/library-staging.tradingtechnologies.com\/ja\/wp-json\/wp\/v2\/docs-category?post=8058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}