/* * 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. */ namespace QuantConnect.Orders { /// /// Type of the order: market, limit or stop /// public enum OrderType { /// /// Market Order Type /// Market, /// /// Limit Order Type /// Limit, /// /// Stop Market Order Type - Fill at market price when break target price /// StopMarket, /// /// Stop limit order type - trigger fill once pass the stop price; but limit fill to limit price. /// StopLimit, /// /// Market on open type - executed on exchange open /// MarketOnOpen, /// /// Market on close type - executed on exchange close /// MarketOnClose, /// /// Option Exercise Order Type /// OptionExercise } /// /// Direction of the order /// public enum OrderDirection { /// /// Buy Order /// Buy, /// /// Sell Order /// Sell, /// /// Default Value - No Order Direction /// /// /// Unfortunately this does not have a value of zero because /// there are backtests saved that reference the values in this order /// Hold } /// /// Fill status of the order class. /// public enum OrderStatus { /// /// New order pre-submission to the order processor. /// New = 0, /// /// Order submitted to the market /// Submitted = 1, /// /// Partially filled, In Market Order. /// PartiallyFilled = 2, /// /// Completed, Filled, In Market Order. /// Filled = 3, /// /// Order cancelled before it was filled /// Canceled = 5, /// /// No Order State Yet /// None = 6, /// /// Order invalidated before it hit the market (e.g. insufficient capital).. /// Invalid = 7, /// /// Order waiting for confirmation of cancellation /// CancelPending = 8 } }