Lean  $LEAN_TAG$
QuantConnect.Interfaces.ITradeBuilder Interface Reference

Generates trades from executions and market price updates More...

Inheritance diagram for QuantConnect.Interfaces.ITradeBuilder:
[legend]

Public Member Functions

void SetSecurityManager (SecurityManager securities)
 Sets the security manager instance More...
 
void SetLiveMode (bool live)
 Sets the live mode flag More...
 
bool HasOpenPosition (Symbol symbol)
 Returns true if there is an open position for the symbol More...
 
void SetMarketPrice (Symbol symbol, decimal price)
 Sets the current market price for the symbol More...
 
void ApplySplit (Split split, bool liveMode, DataNormalizationMode dataNormalizationMode)
 Applies a split to the trade builder More...
 
void ProcessFill (OrderEvent fill, decimal securityConversionRate, decimal feeInAccountCurrency, decimal multiplier=1.0m)
 Processes a new fill, eventually creating new trades More...
 

Properties

List< TradeClosedTrades [get]
 The list of closed trades More...
 

Detailed Description

Generates trades from executions and market price updates

Definition at line 27 of file ITradeBuilder.cs.

Member Function Documentation

◆ SetSecurityManager()

void QuantConnect.Interfaces.ITradeBuilder.SetSecurityManager ( SecurityManager  securities)

Sets the security manager instance

Parameters
securitiesThe security manager

Implemented in QuantConnect.Statistics.TradeBuilder.

◆ SetLiveMode()

void QuantConnect.Interfaces.ITradeBuilder.SetLiveMode ( bool  live)

Sets the live mode flag

Parameters
liveThe live mode flag

Implemented in QuantConnect.Statistics.TradeBuilder.

◆ HasOpenPosition()

bool QuantConnect.Interfaces.ITradeBuilder.HasOpenPosition ( Symbol  symbol)

Returns true if there is an open position for the symbol

Parameters
symbolThe symbol
Returns
true if there is an open position for the symbol

Implemented in QuantConnect.Statistics.TradeBuilder.

◆ SetMarketPrice()

void QuantConnect.Interfaces.ITradeBuilder.SetMarketPrice ( Symbol  symbol,
decimal  price 
)

Sets the current market price for the symbol

Parameters
symbol
price

Implemented in QuantConnect.Statistics.TradeBuilder.

◆ ApplySplit()

void QuantConnect.Interfaces.ITradeBuilder.ApplySplit ( Split  split,
bool  liveMode,
DataNormalizationMode  dataNormalizationMode 
)

Applies a split to the trade builder

Parameters
splitThe split to be applied
liveModeTrue if live mode, false for backtest
dataNormalizationModeThe DataNormalizationMode for this security

Implemented in QuantConnect.Statistics.TradeBuilder.

Here is the caller graph for this function:

◆ ProcessFill()

void QuantConnect.Interfaces.ITradeBuilder.ProcessFill ( OrderEvent  fill,
decimal  securityConversionRate,
decimal  feeInAccountCurrency,
decimal  multiplier = 1.0m 
)

Processes a new fill, eventually creating new trades

Parameters
fillThe new fill order event
securityConversionRateThe current security market conversion rate into the account currency
feeInAccountCurrencyThe current order fee in the account currency
multiplierThe contract multiplier

Implemented in QuantConnect.Statistics.TradeBuilder.

Property Documentation

◆ ClosedTrades

List<Trade> QuantConnect.Interfaces.ITradeBuilder.ClosedTrades
get

The list of closed trades

Definition at line 44 of file ITradeBuilder.cs.


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