Lean  $LEAN_TAG$
QuantConnect.Orders.LimitIfTouchedOrder Class Reference

In effect, a LimitIfTouchedOrder behaves opposite to the StopLimitOrder; after a trigger price is touched, a limit order is set for some user-defined value above (below) the trigger when selling (buying). https://www.interactivebrokers.ca/en/index.php?f=45318 More...

Inheritance diagram for QuantConnect.Orders.LimitIfTouchedOrder:
[legend]

Public Member Functions

 LimitIfTouchedOrder (Symbol symbol, decimal quantity, decimal? triggerPrice, decimal limitPrice, DateTime time, string tag="", IOrderProperties properties=null)
 New LimitIfTouchedOrder constructor. More...
 
 LimitIfTouchedOrder ()
 Default constructor for JSON Deserialization: More...
 
override string GetDefaultTag ()
 Gets the default tag for this order More...
 
override void ApplyUpdateOrderRequest (UpdateOrderRequest request)
 Modifies the state of this order to match the update request More...
 
override Order Clone ()
 Creates a deep-copy clone of this order More...
 
override string ToString ()
 Returns a string that represents the current object. More...
 
- Public Member Functions inherited from QuantConnect.Orders.Order
virtual IEnumerable< IPositionCreatePositions (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...
 
override string ToString ()
 Returns a string that represents the current object. More...
 

Public Attributes

override OrderType Type => OrderType.LimitIfTouched
 Order Type More...
 
- Public Attributes inherited from QuantConnect.Orders.Order
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

override 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...
 
- Protected Member Functions inherited from QuantConnect.Orders.Order
 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...
 
void CopyTo (Order order)
 Copies base Order properties to the specified order More...
 

Properties

decimal TriggerPrice [get, set]
 The price which, when touched, will trigger the setting of a limit order at LimitPrice. More...
 
decimal LimitPrice [get, set]
 The price at which to set the limit order following TriggerPrice being touched. More...
 
bool TriggerTouched [get, set]
 Whether or not the TriggerPrice has been touched. More...
 
- Properties inherited from QuantConnect.Orders.Order
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...
 

Additional Inherited Members

- Static Public Member Functions inherited from QuantConnect.Orders.Order
static Order CreateOrder (SubmitOrderRequest request)
 Creates an Order to match the specified request More...
 

Detailed Description

In effect, a LimitIfTouchedOrder behaves opposite to the StopLimitOrder; after a trigger price is touched, a limit order is set for some user-defined value above (below) the trigger when selling (buying). https://www.interactivebrokers.ca/en/index.php?f=45318

Definition at line 29 of file LimitIfTouchedOrder.cs.

Constructor & Destructor Documentation

◆ LimitIfTouchedOrder() [1/2]

QuantConnect.Orders.LimitIfTouchedOrder.LimitIfTouchedOrder ( Symbol  symbol,
decimal  quantity,
decimal?  triggerPrice,
decimal  limitPrice,
DateTime  time,
string  tag = "",
IOrderProperties  properties = null 
)

New LimitIfTouchedOrder constructor.

Parameters
symbolSymbol asset we're seeking to trade
quantityQuantity of the asset we're seeking to trade
limitPriceMaximum price to fill the order
timeTime the order was placed
triggerPricePrice which must be touched in order to then set a limit order
tagUser defined data tag for this order
propertiesThe order properties for this order

Definition at line 64 of file LimitIfTouchedOrder.cs.

◆ LimitIfTouchedOrder() [2/2]

QuantConnect.Orders.LimitIfTouchedOrder.LimitIfTouchedOrder ( )

Default constructor for JSON Deserialization:

Definition at line 82 of file LimitIfTouchedOrder.cs.

Member Function Documentation

◆ GetDefaultTag()

override string QuantConnect.Orders.LimitIfTouchedOrder.GetDefaultTag ( )
virtual

Gets the default tag for this order

Returns
The default tag

Reimplemented from QuantConnect.Orders.Order.

Definition at line 90 of file LimitIfTouchedOrder.cs.

Here is the call graph for this function:

◆ ApplyUpdateOrderRequest()

override void QuantConnect.Orders.LimitIfTouchedOrder.ApplyUpdateOrderRequest ( UpdateOrderRequest  request)
virtual

Modifies the state of this order to match the update request

Parameters
requestThe request to update this order object

Reimplemented from QuantConnect.Orders.Order.

Definition at line 99 of file LimitIfTouchedOrder.cs.

◆ Clone()

override Order QuantConnect.Orders.LimitIfTouchedOrder.Clone ( )
virtual

Creates a deep-copy clone of this order

Returns
A copy of this order

Implements QuantConnect.Orders.Order.

Definition at line 117 of file LimitIfTouchedOrder.cs.

Here is the call graph for this function:

◆ ToString()

override string QuantConnect.Orders.LimitIfTouchedOrder.ToString ( )

Returns a string that represents the current object.

Returns
A string that represents the current object.

<filterpriority>2</filterpriority>

Definition at line 132 of file LimitIfTouchedOrder.cs.

Here is the call graph for this function:

◆ GetValueImpl()

override decimal QuantConnect.Orders.LimitIfTouchedOrder.GetValueImpl ( Security  security)
protectedvirtual

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.

Parameters
securityThe security matching this order's symbol

Implements QuantConnect.Orders.Order.

Definition at line 143 of file LimitIfTouchedOrder.cs.

Member Data Documentation

◆ Type

override OrderType QuantConnect.Orders.LimitIfTouchedOrder.Type => OrderType.LimitIfTouched

Order Type

Definition at line 34 of file LimitIfTouchedOrder.cs.

Property Documentation

◆ TriggerPrice

decimal QuantConnect.Orders.LimitIfTouchedOrder.TriggerPrice
getset

The price which, when touched, will trigger the setting of a limit order at LimitPrice.

Definition at line 40 of file LimitIfTouchedOrder.cs.

◆ LimitPrice

decimal QuantConnect.Orders.LimitIfTouchedOrder.LimitPrice
getset

The price at which to set the limit order following TriggerPrice being touched.

Definition at line 46 of file LimitIfTouchedOrder.cs.

◆ TriggerTouched

bool QuantConnect.Orders.LimitIfTouchedOrder.TriggerTouched
getset

Whether or not the TriggerPrice has been touched.

Definition at line 52 of file LimitIfTouchedOrder.cs.


The documentation for this class was generated from the following file: