Lean  $LEAN_TAG$
QuantConnect.Orders.TimeInForces.GoodTilDateTimeInForce Class Reference

Good Til Date Time In Force - order expires and will be cancelled on a fixed date/time More...

Inheritance diagram for QuantConnect.Orders.TimeInForces.GoodTilDateTimeInForce:
[legend]

Public Member Functions

 GoodTilDateTimeInForce (DateTime expiry)
 Initializes a new instance of the GoodTilDateTimeInForce class More...
 
override bool IsOrderExpired (Security security, Order order)
 Checks if an order is expired More...
 
override bool IsFillValid (Security security, Order order, OrderEvent fill)
 Checks if an order fill is valid More...
 
DateTime GetForexOrderExpiryDateTime (Order order)
 Returns the expiry date and time (UTC) for a Forex order More...
 

Properties

DateTime Expiry [get]
 The date/time on which the order will expire and will be cancelled More...
 

Additional Inherited Members

- Static Public Attributes inherited from QuantConnect.Orders.TimeInForce
static readonly TimeInForce GoodTilCanceled = new GoodTilCanceledTimeInForce()
 Gets a GoodTilCanceledTimeInForce instance More...
 
static readonly TimeInForce Day = new DayTimeInForce()
 Gets a DayTimeInForce instance More...
 
static Func< DateTime, TimeInForceGoodTilDate => (DateTime expiry) => new GoodTilDateTimeInForce(expiry)
 Gets a GoodTilDateTimeInForce instance More...
 

Detailed Description

Good Til Date Time In Force - order expires and will be cancelled on a fixed date/time

Definition at line 24 of file GoodTilDateTimeInForce.cs.

Constructor & Destructor Documentation

◆ GoodTilDateTimeInForce()

QuantConnect.Orders.TimeInForces.GoodTilDateTimeInForce.GoodTilDateTimeInForce ( DateTime  expiry)

Initializes a new instance of the GoodTilDateTimeInForce class

Definition at line 43 of file GoodTilDateTimeInForce.cs.

Member Function Documentation

◆ IsOrderExpired()

override bool QuantConnect.Orders.TimeInForces.GoodTilDateTimeInForce.IsOrderExpired ( Security  security,
Order  order 
)
virtual

Checks if an order is expired

Parameters
securityThe security matching the order
orderThe order to be checked
Returns
Returns true if the order has expired, false otherwise

Implements QuantConnect.Orders.TimeInForce.

Definition at line 54 of file GoodTilDateTimeInForce.cs.

Here is the call graph for this function:

◆ IsFillValid()

override bool QuantConnect.Orders.TimeInForces.GoodTilDateTimeInForce.IsFillValid ( Security  security,
Order  order,
OrderEvent  fill 
)
virtual

Checks if an order fill is valid

Parameters
securityThe security matching the order
orderThe order to be checked
fillThe order fill to be checked
Returns
Returns true if the order fill can be emitted, false otherwise

Implements QuantConnect.Orders.TimeInForce.

Definition at line 98 of file GoodTilDateTimeInForce.cs.

◆ GetForexOrderExpiryDateTime()

DateTime QuantConnect.Orders.TimeInForces.GoodTilDateTimeInForce.GetForexOrderExpiryDateTime ( Order  order)

Returns the expiry date and time (UTC) for a Forex order

Definition at line 106 of file GoodTilDateTimeInForce.cs.

Here is the caller graph for this function:

Property Documentation

◆ Expiry

DateTime QuantConnect.Orders.TimeInForces.GoodTilDateTimeInForce.Expiry
get

The date/time on which the order will expire and will be cancelled

The private set is required for JSON deserialization

Definition at line 30 of file GoodTilDateTimeInForce.cs.


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