/* * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System.Collections.Generic; namespace QuantConnect.Orders { /// /// The terminal link order properties /// public class TerminalLinkOrderProperties : OrderProperties { /// /// The EMSX Instructions is the free form instructions that may be sent to the broker /// public string Notes { get; set; } /// /// The EMSX Handling Instruction is the instructions for handling the order or route.The values can be /// preconfigured or a value customized by the broker. /// public string HandlingInstruction { get; set; } /// /// The execution instruction field /// public string ExecutionInstruction { get; set; } /// /// Custom user order notes 1 /// public string CustomNotes1 { get; set; } /// /// Custom user order notes 2 /// public string CustomNotes2 { get; set; } /// /// Custom user order notes 3 /// public string CustomNotes3 { get; set; } /// /// Custom user order notes 4 /// public string CustomNotes4 { get; set; } /// /// Custom user order notes 5 /// public string CustomNotes5 { get; set; } /// /// The EMSX account /// public string Account { get; set; } /// /// The EMSX broker code /// public string Broker { get; set; } /// /// The EMSX order strategy details. /// Strategy parameters must be appended in the correct order as expected by EMSX. /// public StrategyParameters Strategy { get; set; } /// /// Whether to automatically include the position side in the order direction (buy-to-open, sell-to-close, etc.) instead of the default (buy, sell) /// public bool AutomaticPositionSides { get; set; } /// /// Can optionally specify the position side in the order direction (buy-to-open, sell-to-close, etc.) instead of the default (buy, sell) /// /// Has precedence over public OrderPosition? PositionSide { get; set; } /// /// Models an EMSX order strategy parameter /// public class StrategyParameters { /// /// The strategy name /// public string Name { get; set; } /// /// The strategy fields /// public List Fields { get; set; } /// /// Creates a new TerminalLink order strategy instance /// /// The strategy name /// The strategy fields public StrategyParameters(string name, List fields) { Name = name; Fields = fields; } } /// /// Models an EMSX order strategy field /// public class StrategyField { /// /// The strategy field value /// public string Value { get; set; } /// /// Whether the strategy field carries a value /// public bool HasValue { get; set; } /// /// Creates a new TerminalLink order strategy field carrying a value. /// /// The strategy field value public StrategyField(string value) { Value = value; HasValue = true; } /// /// Creates a new TerminalLink order strategy field without a value. /// public StrategyField() { HasValue = false; } } } }