Lean
$LEAN_TAG$
|
Order struct for placing new trade More...
Public Member Functions | |
virtual IEnumerable< IPosition > | CreatePositions (SecurityManager securities) |
Creates an enumerable containing each position resulting from executing this order. More... | |
decimal | GetValue (Security security) |
Gets the value of this order at the given market price in units of the account currency NOTE: Some order types derive value from other parameters, such as limit prices More... | |
virtual string | GetDefaultTag () |
Gets the default tag for this order More... | |
virtual void | ApplyUpdateOrderRequest (UpdateOrderRequest request) |
Modifies the state of this order to match the update request More... | |
override string | ToString () |
Returns a string that represents the current object. More... | |
abstract Order | Clone () |
Creates a deep-copy clone of this order More... | |
Static Public Member Functions | |
static Order | CreateOrder (SubmitOrderRequest request) |
Creates an Order to match the specified request More... | |
Public Attributes | |
DateTime | CreatedTime => Time |
Gets the utc time this order was created. Alias for Time More... | |
TimeInForce | TimeInForce => Properties.TimeInForce |
Order Time In Force More... | |
SecurityType | SecurityType => Symbol.ID.SecurityType |
The symbol's security type More... | |
decimal | AbsoluteQuantity => Math.Abs(Quantity) |
Get the absolute quantity for this order More... | |
decimal | Value => Quantity * Price |
Deprecated More... | |
Protected Member Functions | |
Order () | |
Added a default constructor for JSON Deserialization: More... | |
Order (Symbol symbol, decimal quantity, DateTime time, GroupOrderManager groupOrderManager, string tag="", IOrderProperties properties=null) | |
New order constructor More... | |
Order (Symbol symbol, decimal quantity, DateTime time, string tag="", IOrderProperties properties=null) | |
New order constructor More... | |
abstract decimal | GetValueImpl (Security security) |
Gets the order value in units of the security's quote currency for a single unit. A single unit here is a single share of stock, or a single barrel of oil, or the cost of a single share in an option contract. More... | |
void | CopyTo (Order order) |
Copies base Order properties to the specified order More... | |
Properties | |
int | Id [get, set] |
Order ID. More... | |
int | ContingentId [get, set] |
Order id to process before processing this order. More... | |
List< string > | BrokerId [get, set] |
Brokerage Id for this order for when the brokerage splits orders into multiple pieces More... | |
Symbol | Symbol [get, set] |
Symbol of the Asset More... | |
decimal | Price [get, set] |
Price of the Order. More... | |
string | PriceCurrency [get, set] |
Currency for the order price More... | |
DateTime | Time [get, set] |
Gets the utc time the order was created. More... | |
DateTime? | LastFillTime [get, set] |
Gets the utc time the last fill was received, or null if no fills have been received More... | |
DateTime? | LastUpdateTime [get, set] |
Gets the utc time this order was last updated, or null if the order has not been updated. More... | |
DateTime? | CanceledTime [get, set] |
Gets the utc time this order was canceled, or null if the order was not canceled. More... | |
virtual decimal | Quantity [get, set] |
Number of shares to execute. More... | |
abstract OrderType | Type [get] |
Order Type More... | |
OrderStatus | Status [get, set] |
Status of the Order More... | |
string | Tag [get, set] |
Tag the order with some custom data More... | |
IOrderProperties | Properties [get] |
Additional properties of the order More... | |
OrderDirection | Direction [get] |
Order Direction Property based off Quantity. More... | |
OrderSubmissionData | OrderSubmissionData [get, set] |
Gets the price data at the time the order was submitted More... | |
bool | IsMarketable [get] |
Returns true if the order is a marketable order. More... | |
GroupOrderManager | GroupOrderManager [get, set] |
Manager for the orders in the group if this is a combo order More... | |
DataNormalizationMode | PriceAdjustmentMode [get, set] |
The adjustment mode used on the order fill price More... | |
|
protected |
|
protected |
New order constructor
symbol | Symbol asset we're seeking to trade |
quantity | Quantity of the asset we're seeking to trade |
time | Time the order was placed |
groupOrderManager | Manager for the orders in the group if this is a combo order |
tag | User defined data tag for this order |
properties | The order properties for this order |
|
protected |
|
virtual |
Creates an enumerable containing each position resulting from executing this order.
This is provided in anticipation of a new combo order type that will need to override this method, returning a position for each 'leg' of the order.
decimal QuantConnect.Orders.Order.GetValue | ( | Security | security | ) |
Gets the value of this order at the given market price in units of the account currency NOTE: Some order types derive value from other parameters, such as limit prices
security | The security matching this order's symbol |
TODO: we should remove this. Only used in tests
Definition at line 311 of file Order.cs.
|
protectedpure virtual |
Gets the order value in units of the security's quote currency for a single unit. A single unit here is a single share of stock, or a single barrel of oil, or the cost of a single share in an option contract.
security | The security matching this order's symbol |
Implemented in QuantConnect.Orders.LimitIfTouchedOrder, QuantConnect.Orders.StopLimitOrder, QuantConnect.Orders.LimitOrder, QuantConnect.Orders.StopMarketOrder, QuantConnect.Orders.MarketOnCloseOrder, QuantConnect.Orders.MarketOrder, QuantConnect.Orders.ComboLegLimitOrder, QuantConnect.Orders.ComboLimitOrder, QuantConnect.Orders.OptionExerciseOrder, QuantConnect.Orders.MarketOnOpenOrder, and QuantConnect.Orders.ComboMarketOrder.
|
virtual |
Gets the default tag for this order
Reimplemented in QuantConnect.Orders.TrailingStopOrder, QuantConnect.Orders.LimitIfTouchedOrder, QuantConnect.Orders.StopLimitOrder, QuantConnect.Orders.LimitOrder, and QuantConnect.Orders.StopMarketOrder.
|
virtual |
Modifies the state of this order to match the update request
request | The request to update this order object |
Reimplemented in QuantConnect.Orders.StopLimitOrder, QuantConnect.Orders.TrailingStopOrder, QuantConnect.Orders.LimitIfTouchedOrder, QuantConnect.Orders.StopMarketOrder, QuantConnect.Orders.LimitOrder, QuantConnect.Orders.ComboLegLimitOrder, QuantConnect.Orders.ComboOrder, and QuantConnect.Orders.ComboLimitOrder.
override string QuantConnect.Orders.Order.ToString | ( | ) |
|
pure virtual |
Creates a deep-copy clone of this order
Implemented in QuantConnect.Orders.StopLimitOrder, QuantConnect.Orders.TrailingStopOrder, QuantConnect.Orders.StopMarketOrder, QuantConnect.Orders.LimitIfTouchedOrder, QuantConnect.Orders.LimitOrder, QuantConnect.Orders.ComboLegLimitOrder, QuantConnect.Orders.MarketOnCloseOrder, QuantConnect.Orders.ComboLimitOrder, QuantConnect.Orders.MarketOrder, QuantConnect.Orders.OptionExerciseOrder, QuantConnect.Orders.MarketOnOpenOrder, and QuantConnect.Orders.ComboMarketOrder.
|
protected |
|
static |
Creates an Order to match the specified request
request | The SubmitOrderRequest to create an order for |
Definition at line 413 of file Order.cs.
DateTime QuantConnect.Orders.Order.CreatedTime => Time |
TimeInForce QuantConnect.Orders.Order.TimeInForce => Properties.TimeInForce |
SecurityType QuantConnect.Orders.Order.SecurityType => Symbol.ID.SecurityType |
decimal QuantConnect.Orders.Order.AbsoluteQuantity => Math.Abs(Quantity) |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
get |
|
getset |
|
getset |
|
get |
|
get |
|
getset |
|
get |
|
getset |
|
getset |