Lean  $LEAN_TAG$
QuantConnect.Brokerages.BrokerageExtensions Class Reference

Provides extension methods for handling brokerage operations. More...

Static Public Member Functions

static bool OrderCrossesZero (decimal holdingQuantity, decimal orderQuantity)
 Determines if executing the specified order will cross the zero holdings threshold. More...
 

Detailed Description

Provides extension methods for handling brokerage operations.

Definition at line 22 of file BrokerageExtensions.cs.

Member Function Documentation

◆ OrderCrossesZero()

static bool QuantConnect.Brokerages.BrokerageExtensions.OrderCrossesZero ( decimal  holdingQuantity,
decimal  orderQuantity 
)
static

Determines if executing the specified order will cross the zero holdings threshold.

Parameters
holdingQuantityThe current quantity of holdings.
orderQuantityThe quantity of the order to be evaluated.
Returns
true if the order will change the holdings from positive to negative or vice versa; otherwise, false.

This method checks if the order will result in a position change from positive to negative holdings or from negative to positive holdings.

Definition at line 35 of file BrokerageExtensions.cs.

Here is the caller graph for this function:

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