Writing Algorithms

API Reference

Introduction

QCAlgorithm

class QuantConnect.Algorithm.QCAlgorithm[source]

QC Algorithm Base Class - Handle the basic requirements of a trading algorithm, allowing user to focus on event methods. The QCAlgorithm class implements Portfolio, Securities, Transactions and Data Subscription Management.

QCAlgorithm

class QuantConnect.Algorithm.QCAlgorithm[source]

QC Algorithm Base Class - Handle the basic requirements of a trading algorithm, allowing user to focus on event methods. The QCAlgorithm class implements Portfolio, Securities, Transactions and Data Subscription Management.

Adding Data

Adding Data

add_cfd(ticker, resolution=None, market=None, fill_forward=True, leverage=0.0)[source]

Creates and adds a new Cfd security to the algorithm

Parameters:
  • ticker (str) — The currency pair
  • resolution (Resolution, optional)
  • market (str, optional)
  • fill_forward (bool, optional)
  • leverage (float, optional)
Returns:

The new Cfd security

Return type:

Cfd

AddCfd(ticker, resolution=None, market=None, fillForward=True, leverage=0.0)[source]

Creates and adds a new Cfd security to the algorithm

Parameters:
  • ticker (string) — The currency pair
  • resolution (Resolution, optional)
  • market (string, optional)
  • fillForward (bool, optional)
  • leverage (decimal, optional)
Returns:

The new Cfd security

Return type:

Cfd

add_crypto(ticker, resolution=None, market=None, fill_forward=True, leverage=0.0)[source]

Creates and adds a new Crypto security to the algorithm

Parameters:
  • ticker (str) — The currency pair
  • resolution (Resolution, optional)
  • market (str, optional)
  • fill_forward (bool, optional)
  • leverage (float, optional)
Returns:

The new Crypto security

Return type:

Crypto

AddCrypto(ticker, resolution=None, market=None, fillForward=True, leverage=0.0)[source]

Creates and adds a new Crypto security to the algorithm

Parameters:
  • ticker (string) — The currency pair
  • resolution (Resolution, optional)
  • market (string, optional)
  • fillForward (bool, optional)
  • leverage (decimal, optional)
Returns:

The new Crypto security

Return type:

Crypto

add_crypto_future(ticker, resolution=None, market=None, fill_forward=True, leverage=0.0)[source]

Creates and adds a new CryptoFuture security to the algorithm

Parameters:
  • ticker (str) — The currency pair
  • resolution (Resolution, optional)
  • market (str, optional)
  • fill_forward (bool, optional)
  • leverage (float, optional)
Returns:

The new CryptoFuture security

Return type:

CryptoFuture

AddCryptoFuture(ticker, resolution=None, market=None, fillForward=True, leverage=0.0)[source]

Creates and adds a new CryptoFuture security to the algorithm

Parameters:
  • ticker (string) — The currency pair
  • resolution (Resolution, optional)
  • market (string, optional)
  • fillForward (bool, optional)
  • leverage (decimal, optional)
Returns:

The new CryptoFuture security

Return type:

CryptoFuture

add_data(type, ticker, properties, exchange_hours, resolution, fill_forward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • type (PyObject) — Data source type
  • ticker (str) — KeyTicker for data
  • properties (SymbolProperties) — The properties of this new custom data
  • exchange_hours (SecurityExchangeHours) — The Exchange hours of this symbol
  • resolution (Optional[Resolution]) — Resolution of the Data Required
  • fill_forward (bool) — When no data available on a tradebar, return the last data that was generated
  • leverage (float, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

add_data(type, ticker, resolution, time_zone, fill_forward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • type (PyObject) — Data source type
  • ticker (str) — KeyTicker for data
  • resolution (Optional[Resolution]) — Resolution of the Data Required
  • time_zone (datetimeZone) — Specifies the time zone of the raw data
  • fill_forward (bool) — When no data available on a tradebar, return the last data that was generated
  • leverage (float, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

add_data(type, underlying, resolution, time_zone, fill_forward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • type (PyObject) — Data source type
  • underlying (Symbol) — The underlying symbol for the custom data
  • resolution (Optional[Resolution]) — Resolution of the Data Required
  • time_zone (datetimeZone) — Specifies the time zone of the raw data
  • fill_forward (bool) — When no data available on a tradebar, return the last data that was generated
  • leverage (float, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

add_data(data_type, ticker, resolution, time_zone, fill_forward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • data_type (Type) — Data source type
  • ticker (str) — KeyTicker for data
  • resolution (Optional[Resolution]) — Resolution of the Data Required
  • time_zone (datetimeZone) — Specifies the time zone of the raw data
  • fill_forward (bool) — When no data available on a tradebar, return the last data that was generated
  • leverage (float, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

add_data(data_type, underlying, resolution, time_zone, fill_forward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • data_type (Type) — Data source type
  • underlying (Symbol)
  • resolution (Optional[Resolution]) — Resolution of the Data Required
  • time_zone (datetimeZone) — Specifies the time zone of the raw data
  • fill_forward (bool) — When no data available on a tradebar, return the last data that was generated
  • leverage (float, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

AddData(type, ticker, properties, exchangeHours, resolution, fillForward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • type (PyObject) — Data source type
  • ticker (string) — KeyTicker for data
  • properties (SymbolProperties) — The properties of this new custom data
  • exchangeHours (SecurityExchangeHours) — The Exchange hours of this symbol
  • resolution (Nullable[Resolution]) — Resolution of the Data Required
  • fillForward (Boolean) — When no data available on a tradebar, return the last data that was generated
  • leverage (decimal, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

AddData(type, ticker, resolution, timeZone, fillForward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • type (PyObject) — Data source type
  • ticker (string) — KeyTicker for data
  • resolution (Nullable[Resolution]) — Resolution of the Data Required
  • timeZone (DateTimeZone) — Specifies the time zone of the raw data
  • fillForward (Boolean) — When no data available on a tradebar, return the last data that was generated
  • leverage (decimal, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

AddData(type, underlying, resolution, timeZone, fillForward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • type (PyObject) — Data source type
  • underlying (Symbol) — The underlying symbol for the custom data
  • resolution (Nullable[Resolution]) — Resolution of the Data Required
  • timeZone (DateTimeZone) — Specifies the time zone of the raw data
  • fillForward (Boolean) — When no data available on a tradebar, return the last data that was generated
  • leverage (decimal, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

AddData(dataType, ticker, resolution, timeZone, fillForward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • dataType (Type) — Data source type
  • ticker (string) — KeyTicker for data
  • resolution (Nullable[Resolution]) — Resolution of the Data Required
  • timeZone (DateTimeZone) — Specifies the time zone of the raw data
  • fillForward (Boolean) — When no data available on a tradebar, return the last data that was generated
  • leverage (decimal, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

AddData(dataType, underlying, resolution, timeZone, fillForward, leverage=1.0)[source]

AddDataT a new user defined data source, requiring only the minimum config options. The data is added with a default time zone of NewYork (Eastern Daylight Savings Time)

Parameters:
  • dataType (Type) — Data source type
  • underlying (Symbol)
  • resolution (Nullable[Resolution]) — Resolution of the Data Required
  • timeZone (DateTimeZone) — Specifies the time zone of the raw data
  • fillForward (Boolean) — When no data available on a tradebar, return the last data that was generated
  • leverage (decimal, optional) — Custom leverage per security
Returns:

The new Security

Return type:

Security

add_equity(ticker, resolution=None, market=None, fill_forward=True, leverage=0.0, extended_market_hours=False, data_normalization_mode=None)[source]

Creates and adds a new Equity security to the algorithm

Parameters:
  • ticker (str) — The equity ticker symbol
  • resolution (Resolution, optional)
  • market (str, optional)
  • fill_forward (bool, optional)
  • leverage (float, optional)
  • extended_market_hours (bool, optional)
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the equity
Returns:

The new Equity security

Return type:

Equity

AddEquity(ticker, resolution=None, market=None, fillForward=True, leverage=0.0, extendedMarketHours=False, dataNormalizationMode=None)[source]

Creates and adds a new Equity security to the algorithm

Parameters:
  • ticker (string) — The equity ticker symbol
  • resolution (Resolution, optional)
  • market (string, optional)
  • fillForward (bool, optional)
  • leverage (decimal, optional)
  • extendedMarketHours (bool, optional)
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the equity
Returns:

The new Equity security

Return type:

Equity

add_forex(ticker, resolution=None, market=None, fill_forward=True, leverage=0.0)[source]

Creates and adds a new Forex security to the algorithm

Parameters:
  • ticker (str) — The currency pair
  • resolution (Resolution, optional)
  • market (str, optional)
  • fill_forward (bool, optional)
  • leverage (float, optional)
Returns:

The new Forex security

Return type:

Forex

AddForex(ticker, resolution=None, market=None, fillForward=True, leverage=0.0)[source]

Creates and adds a new Forex security to the algorithm

Parameters:
  • ticker (string) — The currency pair
  • resolution (Resolution, optional)
  • market (string, optional)
  • fillForward (bool, optional)
  • leverage (decimal, optional)
Returns:

The new Forex security

Return type:

Forex

add_future(ticker, resolution=None, market=None, fill_forward=True, leverage=0.0, extended_market_hours=False, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=0)[source]

Creates and adds a new Future security to the algorithm

Parameters:
  • ticker (str) — The future ticker
  • resolution (Resolution, optional)
  • market (str, optional)
  • fill_forward (bool, optional)
  • leverage (float, optional)
  • extended_market_hours (bool, optional) — Use extended market hours data
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the continuous future contract
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the continuous future contract
  • contract_depth_offset (int, optional) — The continuous future contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract
Returns:

The new Future security

Return type:

Future

AddFuture(ticker, resolution=None, market=None, fillForward=True, leverage=0.0, extendedMarketHours=False, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=0)[source]

Creates and adds a new Future security to the algorithm

Parameters:
  • ticker (string) — The future ticker
  • resolution (Resolution, optional)
  • market (string, optional)
  • fillForward (bool, optional)
  • leverage (decimal, optional)
  • extendedMarketHours (bool, optional) — Use extended market hours data
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the continuous future contract
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the continuous future contract
  • contractDepthOffset (Int32, optional) — The continuous future contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract
Returns:

The new Future security

Return type:

Future

add_future_contract(symbol, resolution=None, fill_forward=True, leverage=0.0, extended_market_hours=False)[source]

Creates and adds a new single Future contract to the algorithm

Parameters:
  • symbol (Symbol) — The futures contract symbol
  • resolution (Resolution, optional)
  • fill_forward (bool, optional)
  • leverage (float, optional)
  • extended_market_hours (bool, optional) — Use extended market hours data
Returns:

The new Future security

Return type:

Future

AddFutureContract(symbol, resolution=None, fillForward=True, leverage=0.0, extendedMarketHours=False)[source]

Creates and adds a new single Future contract to the algorithm

Parameters:
  • symbol (Symbol) — The futures contract symbol
  • resolution (Resolution, optional)
  • fillForward (bool, optional)
  • leverage (decimal, optional)
  • extendedMarketHours (bool, optional) — Use extended market hours data
Returns:

The new Future security

Return type:

Future

add_future_option(future_symbol, option_filter)[source]

Creates and adds a new Future Option contract to the algorithm.

Parameters:
  • future_symbol (Symbol) — )
  • option_filter (PyObject) — Filter to apply to option contracts loaded as part of the universe
add_future_option(symbol, option_filter=None)[source]

Creates and adds a new Future Option contract to the algorithm.

Parameters:
  • symbol (Symbol) — )
  • option_filter (Callable[OptionFilterUniverse, OptionFilterUniverse], optional) — Filter to apply to option contracts loaded as part of the universe
AddFutureOption(futureSymbol, optionFilter)[source]

Creates and adds a new Future Option contract to the algorithm.

Parameters:
  • futureSymbol (Symbol) — )
  • optionFilter (PyObject) — Filter to apply to option contracts loaded as part of the universe
AddFutureOption(symbol, optionFilter=None)[source]

Creates and adds a new Future Option contract to the algorithm.

Parameters:
  • symbol (Symbol) — )
  • optionFilter (Func<OptionFilterUniverse, OptionFilterUniverse>, optional) — Filter to apply to option contracts loaded as part of the universe
add_future_option_contract(symbol, resolution=None, fill_forward=True, leverage=0.0, extended_market_hours=False)[source]

Adds a future option contract to the algorithm.

Parameters:
  • symbol (Symbol) — Option contract Symbol
  • resolution (Resolution, optional) — Resolution of the option contract, i.e. the granularity of the data
  • fill_forward (bool, optional) — If true, this will fill in missing data points with the previous data point
  • leverage (float, optional) — The leverage to apply to the option contract
  • extended_market_hours (bool, optional) — Use extended market hours data
Returns:

Option security

Return type:

Option

AddFutureOptionContract(symbol, resolution=None, fillForward=True, leverage=0.0, extendedMarketHours=False)[source]

Adds a future option contract to the algorithm.

Parameters:
  • symbol (Symbol) — Option contract Symbol
  • resolution (Resolution, optional) — Resolution of the option contract, i.e. the granularity of the data
  • fillForward (bool, optional) — If true, this will fill in missing data points with the previous data point
  • leverage (decimal, optional) — The leverage to apply to the option contract
  • extendedMarketHours (bool, optional) — Use extended market hours data
Returns:

Option security

Return type:

Option

add_index(ticker, resolution=None, market=None, fill_forward=True)[source]

Creates and adds index options to the algorithm.

Parameters:
  • ticker (str) — The currency pair
  • resolution (Resolution, optional)
  • market (str, optional)
  • fill_forward (bool, optional)
Returns:

The new Index security

Return type:

Index

AddIndex(ticker, resolution=None, market=None, fillForward=True)[source]

Creates and adds index options to the algorithm.

Parameters:
  • ticker (string) — The currency pair
  • resolution (Resolution, optional)
  • market (string, optional)
  • fillForward (bool, optional)
Returns:

The new Index security

Return type:

Index

add_index_option(ticker, resolution=None, market=usa, fill_forward=True)[source]

Creates and adds index options to the algorithm.

Parameters:
  • ticker (str) — The ticker of the Index Option
  • resolution (Resolution, optional) — Resolution of the index option contracts, i.e. the granularity of the data
  • market (str, optional)
  • fill_forward (bool, optional) — If true, this will fill in missing data points with the previous data point
Returns:

Canonical Option security

Return type:

Option

add_index_option(symbol, target_option, resolution=None, fill_forward=True)[source]

Creates and adds index options to the algorithm.

Parameters:
  • symbol (Symbol)
  • target_option (str) — The target option ticker. This is useful when the option ticker does not match the underlying, e.g. SPX index and the SPXW weekly option. If null is provided will use underlying
  • resolution (Resolution, optional) — Resolution of the index option contracts, i.e. the granularity of the data
  • fill_forward (bool, optional) — If true, this will fill in missing data points with the previous data point
Returns:

Canonical Option security

Return type:

Option

AddIndexOption(ticker, resolution=None, market=usa, fillForward=True)[source]

Creates and adds index options to the algorithm.

Parameters:
  • ticker (string) — The ticker of the Index Option
  • resolution (Resolution, optional) — Resolution of the index option contracts, i.e. the granularity of the data
  • market (string, optional)
  • fillForward (bool, optional) — If true, this will fill in missing data points with the previous data point
Returns:

Canonical Option security

Return type:

Option

AddIndexOption(symbol, targetOption, resolution=None, fillForward=True)[source]

Creates and adds index options to the algorithm.

Parameters:
  • symbol (Symbol)
  • targetOption (string) — The target option ticker. This is useful when the option ticker does not match the underlying, e.g. SPX index and the SPXW weekly option. If null is provided will use underlying
  • resolution (Resolution, optional) — Resolution of the index option contracts, i.e. the granularity of the data
  • fillForward (bool, optional) — If true, this will fill in missing data points with the previous data point
Returns:

Canonical Option security

Return type:

Option

add_index_option_contract(symbol, resolution=None, fill_forward=True)[source]

Adds an index option contract to the algorithm.

Parameters:
  • symbol (Symbol) — Symbol of the index option contract
  • resolution (Resolution, optional) — Resolution of the index option contract, i.e. the granularity of the data
  • fill_forward (bool, optional) — If true, this will fill in missing data points with the previous data point
Returns:

Index Option Contract

Return type:

Option

AddIndexOptionContract(symbol, resolution=None, fillForward=True)[source]

Adds an index option contract to the algorithm.

Parameters:
  • symbol (Symbol) — Symbol of the index option contract
  • resolution (Resolution, optional) — Resolution of the index option contract, i.e. the granularity of the data
  • fillForward (bool, optional) — If true, this will fill in missing data points with the previous data point
Returns:

Index Option Contract

Return type:

Option

add_option(underlying, target_option, resolution=None, market=None, fill_forward=True, leverage=0.0)[source]

Creates and adds a new equity Option security to the algorithm

Parameters:
  • underlying (Symbol | str) — Underlying asset Symbol to use as the option's underlying
  • target_option (str) — The target option ticker. This is useful when the option ticker does not match the underlying, e.g. SPX index and the SPXW weekly option. If null is provided will use underlying
  • resolution (Resolution, optional)
  • market (str, optional)
  • fill_forward (bool, optional) — If true, data will be provided to the algorithm every Second, Minute, Hour, or Day, while the asset is open and depending on the Resolution this option was configured to use.
  • leverage (float, optional) — The requested leverage for the
Returns:

The new option security instance

Return type:

Option

AddOption(underlying, targetOption, resolution=None, market=None, fillForward=True, leverage=0.0)[source]

Creates and adds a new equity Option security to the algorithm

Parameters:
  • underlying (String | Symbol) — Underlying asset Symbol to use as the option's underlying
  • targetOption (string) — The target option ticker. This is useful when the option ticker does not match the underlying, e.g. SPX index and the SPXW weekly option. If null is provided will use underlying
  • resolution (Resolution, optional)
  • market (string, optional)
  • fillForward (bool, optional) — If true, data will be provided to the algorithm every Second, Minute, Hour, or Day, while the asset is open and depending on the Resolution this option was configured to use.
  • leverage (decimal, optional) — The requested leverage for the
Returns:

The new option security instance

Return type:

Option

add_option_contract(symbol, resolution=None, fill_forward=True, leverage=0.0, extended_market_hours=False)[source]

Creates and adds a new single Option contract to the algorithm

Parameters:
  • symbol (Symbol) — The option contract symbol
  • resolution (Resolution, optional)
  • fill_forward (bool, optional)
  • leverage (float, optional)
  • extended_market_hours (bool, optional) — Use extended market hours data
Returns:

The new Option security

Return type:

Option

AddOptionContract(symbol, resolution=None, fillForward=True, leverage=0.0, extendedMarketHours=False)[source]

Creates and adds a new single Option contract to the algorithm

Parameters:
  • symbol (Symbol) — The option contract symbol
  • resolution (Resolution, optional)
  • fillForward (bool, optional)
  • leverage (decimal, optional)
  • extendedMarketHours (bool, optional) — Use extended market hours data
Returns:

The new Option security

Return type:

Option

add_security(security_type, ticker, resolution, market, fill_forward, leverage, extended_market_hours, data_mapping_mode=None, data_normalization_mode=None)[source]

Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine.

Parameters:
  • security_type (SecurityType) — MarketType Type: Equity, Commodity, Future, FOREX or Crypto
  • ticker (str) — The security ticker, e.g. AAPL
  • resolution (Optional[Resolution]) — Resolution of the MarketType required: MarketData, Second or Minute
  • market (str) — The market the requested security belongs to, such as 'usa' or 'fxcm'
  • fill_forward (bool) — If true, returns the last available data even if none in that timeslice.
  • leverage (float) — leverage for this security
  • extended_market_hours (bool) — Use extended market hours data
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the security
Return type:

Security

add_security(symbol, resolution=None, fill_forward=True, leverage=0.0, extended_market_hours=False, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=0)[source]

Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine.

Parameters:
  • symbol (Symbol) — The security Symbol
  • resolution (Resolution, optional) — Resolution of the MarketType required: MarketData, Second or Minute
  • fill_forward (bool, optional) — If true, returns the last available data even if none in that timeslice.
  • leverage (float, optional) — leverage for this security
  • extended_market_hours (bool, optional) — Use extended market hours data
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the security
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract
Returns:

The new Security that was added to the algorithm

Return type:

Security

AddSecurity(securityType, ticker, resolution, market, fillForward, leverage, extendedMarketHours, dataMappingMode=None, dataNormalizationMode=None)[source]

Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine.

Parameters:
  • securityType (SecurityType) — MarketType Type: Equity, Commodity, Future, FOREX or Crypto
  • ticker (string) — The security ticker, e.g. AAPL
  • resolution (Nullable[Resolution]) — Resolution of the MarketType required: MarketData, Second or Minute
  • market (string) — The market the requested security belongs to, such as 'usa' or 'fxcm'
  • fillForward (Boolean) — If true, returns the last available data even if none in that timeslice.
  • leverage (decimal) — leverage for this security
  • extendedMarketHours (Boolean) — Use extended market hours data
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the security
Return type:

Security

AddSecurity(symbol, resolution=None, fillForward=True, leverage=0.0, extendedMarketHours=False, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=0)[source]

Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine.

Parameters:
  • symbol (Symbol) — The security Symbol
  • resolution (Resolution, optional) — Resolution of the MarketType required: MarketData, Second or Minute
  • fillForward (bool, optional) — If true, returns the last available data even if none in that timeslice.
  • leverage (decimal, optional) — leverage for this security
  • extendedMarketHours (bool, optional) — Use extended market hours data
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the security
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract
Returns:

The new Security that was added to the algorithm

Return type:

Security

download(address, headers, user_name, password)[source]

Downloads the requested resource as a String. The resource to download is specified as a String containing the URI.

Parameters:
  • address (str) — A string containing the URI to download
  • headers (Dict[str, str] | PyObject) — Defines header values to add to the request
  • user_name (str) — The user name associated with the credentials
  • password (str) — The password for the user name associated with the credentials
Returns:

The requested resource as a string

Return type:

str

Download(address, headers, userName, password)[source]

Downloads the requested resource as a String. The resource to download is specified as a String containing the URI.

Parameters:
  • address (string) — A string containing the URI to download
  • headers (KeyValuePair[String, String] | PyObject) — Defines header values to add to the request
  • userName (string) — The user name associated with the credentials
  • password (string) — The password for the user name associated with the credentials
Returns:

The requested resource as a string

Return type:

String

get_last_known_prices(security)[source]

Yields data to warmup a security for all it's subscribed data types

Parameters:
  • security (Security) — object for which to retrieve historical data
Returns:

Securities historical data

Return type:

List[BaseData]

get_last_known_prices(symbol)[source]

Yields data to warmup a security for all it's subscribed data types

Parameters:
  • symbol (Symbol) — The symbol we want to get seed data for
Returns:

Securities historical data

Return type:

List[BaseData]

GetLastKnownPrices(security)[source]

Yields data to warmup a security for all it's subscribed data types

Parameters:
  • security (Security) — object for which to retrieve historical data
Returns:

Securities historical data

Return type:

IEnumerable[BaseData]

GetLastKnownPrices(symbol)[source]

Yields data to warmup a security for all it's subscribed data types

Parameters:
  • symbol (Symbol) — The symbol we want to get seed data for
Returns:

Securities historical data

Return type:

IEnumerable[BaseData]

on_securities_changed(changes)[source]

Event fired each time the we add/remove securities from the data feed

Parameters:
  • changes (SecurityChanges) — Security additionsremovals for this time step
OnSecuritiesChanged(changes)[source]

Event fired each time the we add/remove securities from the data feed

Parameters:
  • changes (SecurityChanges) — Security additionsremovals for this time step
remove_option_contract(symbol)[source]

Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

Parameters:
  • symbol (Symbol) — The symbol of the security to be removed
Return type:

bool

RemoveOptionContract(symbol)[source]

Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

Parameters:
  • symbol (Symbol) — The symbol of the security to be removed
Return type:

Boolean

remove_security(symbol)[source]

Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

Parameters:
  • symbol (Symbol) — The symbol of the security to be removed
Return type:

bool

RemoveSecurity(symbol)[source]

Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

Parameters:
  • symbol (Symbol) — The symbol of the security to be removed
Return type:

Boolean

set_future_chain_provider(future_chain_provider)[source]

Sets the future chain provider, used to get the list of future contracts for an underlying symbol

Parameters:
  • future_chain_provider (IFutureChainProvider) — The future chain provider
SetFutureChainProvider(futureChainProvider)[source]

Sets the future chain provider, used to get the list of future contracts for an underlying symbol

Parameters:
  • futureChainProvider (IFutureChainProvider) — The future chain provider
set_option_chain_provider(option_chain_provider)[source]

Sets the option chain provider, used to get the list of option contracts for an underlying symbol

Parameters:
  • option_chain_provider (IOptionChainProvider) — The option chain provider
SetOptionChainProvider(optionChainProvider)[source]

Sets the option chain provider, used to get the list of option contracts for an underlying symbol

Parameters:
  • optionChainProvider (IOptionChainProvider) — The option chain provider
set_security_initializer(security_initializer)[source]

Sets the security initializer, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities.

Parameters:
  • security_initializer (ISecurityInitializer | Action[Security] | PyObject) — The security initializer function or class
SetSecurityInitializer(securityInitializer)[source]

Sets the security initializer, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities.

Parameters:
  • securityInitializer (ISecurityInitializer | Action[Security] | PyObject) — The security initializer function or class
symbol(ticker)[source]

Converts the string 'ticker' symbol into a full String) object This requires that the string 'ticker' has been added to the algorithm

Parameters:
  • ticker (str) — The ticker symbol. This should be the ticker symbol as it was added to the algorithm
Returns:

The symbol object mapped to the specified ticker

Return type:

Symbol

Symbol(ticker)[source]

Converts the string 'ticker' symbol into a full String) object This requires that the string 'ticker' has been added to the algorithm

Parameters:
  • ticker (string) — The ticker symbol. This should be the ticker symbol as it was added to the algorithm
Returns:

The symbol object mapped to the specified ticker

Return type:

Symbol

ticker(symbol)[source]

For the given symbol will resolve the ticker it used at the current algorithm date

Parameters:
  • symbol (Symbol) — The symbol to get the ticker for
Returns:

The mapped ticker for a symbol

Return type:

str

Ticker(symbol)[source]

For the given symbol will resolve the ticker it used at the current algorithm date

Parameters:
  • symbol (Symbol) — The symbol to get the ticker for
Returns:

The mapped ticker for a symbol

Return type:

String

property future_chain_provider[source]

Gets the future chain provider, used to get the list of future contracts for an underlying symbol

Returns:

Gets the future chain provider, used to get the list of future contracts for an underlying symbol

Return type:

IFutureChainProvider

property FutureChainProvider[source]

Gets the future chain provider, used to get the list of future contracts for an underlying symbol

Returns:

Gets the future chain provider, used to get the list of future contracts for an underlying symbol

Return type:

IFutureChainProvider

property option_chain_provider[source]

Gets the option chain provider, used to get the list of option contracts for an underlying symbol

Returns:

Gets the option chain provider, used to get the list of option contracts for an underlying symbol

Return type:

IOptionChainProvider

property OptionChainProvider[source]

Gets the option chain provider, used to get the list of option contracts for an underlying symbol

Returns:

Gets the option chain provider, used to get the list of option contracts for an underlying symbol

Return type:

IOptionChainProvider

property security_initializer[source]

Gets an instance that is to be used to initialize newly created securities.

Returns:

Gets an instance that is to be used to initialize newly created securities.

Return type:

ISecurityInitializer

property SecurityInitializer[source]

Gets an instance that is to be used to initialize newly created securities.

Returns:

Gets an instance that is to be used to initialize newly created securities.

Return type:

ISecurityInitializer

Algorithm Framework

Algorithm Framework

add_alpha(alpha)[source]

Adds a new alpha model

Parameters:
  • alpha (IAlphaModel | PyObject) — Model that generates alpha to add
AddAlpha(alpha)[source]

Adds a new alpha model

Parameters:
  • alpha (IAlphaModel | PyObject) — Model that generates alpha to add
add_risk_management(risk_management)[source]

Adds a new risk management model

Parameters:
  • risk_management (PyObject | IRiskManagementModel) — Model defining how risk is managed to add
AddRiskManagement(riskManagement)[source]

Adds a new risk management model

Parameters:
  • riskManagement (PyObject | IRiskManagementModel) — Model defining how risk is managed to add
add_universe_selection(universe_selection)[source]

Adds a new universe selection model

Parameters:
  • universe_selection (PyObject | IUniverseSelectionModel) — Model defining universes for the algorithm to add
AddUniverseSelection(universeSelection)[source]

Adds a new universe selection model

Parameters:
  • universeSelection (PyObject | IUniverseSelectionModel) — Model defining universes for the algorithm to add
emit_insights(insights)[source]

Manually emit insights from an algorithm. This is typically invoked before calls to submit orders in algorithms written against QCAlgorithm that have been ported into the algorithm framework.

Parameters:
  • insights (Insight[]) — The array of insights to be emitted
emit_insights(insight)[source]

Manually emit insights from an algorithm. This is typically invoked before calls to submit orders in algorithms written against QCAlgorithm that have been ported into the algorithm framework.

Parameters:
  • insight (Insight) — The insight to be emitted
EmitInsights(insights)[source]

Manually emit insights from an algorithm. This is typically invoked before calls to submit orders in algorithms written against QCAlgorithm that have been ported into the algorithm framework.

Parameters:
  • insights (Insight[]) — The array of insights to be emitted
EmitInsights(insight)[source]

Manually emit insights from an algorithm. This is typically invoked before calls to submit orders in algorithms written against QCAlgorithm that have been ported into the algorithm framework.

Parameters:
  • insight (Insight) — The insight to be emitted
framework_post_initialize()[source]

Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method

FrameworkPostInitialize()[source]

Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method

get_locked()[source]

Gets whether or not this algorithm has been locked and fully initialized

Return type:

bool

GetLocked()[source]

Gets whether or not this algorithm has been locked and fully initialized

Return type:

Boolean

initialize()[source]

Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.

Initialize()[source]

Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.

on_framework_data(slice)[source]

Used to send data updates to algorithm framework models

Parameters:
  • slice (Slice) — The current data slice
OnFrameworkData(slice)[source]

Used to send data updates to algorithm framework models

Parameters:
  • slice (Slice) — The current data slice
on_framework_securities_changed(changes)[source]

Used to send security changes to algorithm framework models

Parameters:
  • changes (SecurityChanges) — Security additionsremovals for this time step
OnFrameworkSecuritiesChanged(changes)[source]

Used to send security changes to algorithm framework models

Parameters:
  • changes (SecurityChanges) — Security additionsremovals for this time step
post_initialize()[source]

Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method

PostInitialize()[source]

Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method

set_alpha(alpha)[source]

Sets the alpha model

Parameters:
  • alpha (IAlphaModel | PyObject) — Model that generates alpha
SetAlpha(alpha)[source]

Sets the alpha model

Parameters:
  • alpha (IAlphaModel | PyObject) — Model that generates alpha
set_execution(execution)[source]

Sets the execution model

Parameters:
  • execution (PyObject | IExecutionModel) — Model defining how to execute trades to reach a portfolio target
SetExecution(execution)[source]

Sets the execution model

Parameters:
  • execution (PyObject | IExecutionModel) — Model defining how to execute trades to reach a portfolio target
set_locked()[source]

Lock the algorithm initialization to avoid user modifiying cash and data stream subscriptions

SetLocked()[source]

Lock the algorithm initialization to avoid user modifiying cash and data stream subscriptions

set_portfolio_construction(portfolio_construction)[source]

Sets the portfolio construction model

Parameters:
  • portfolio_construction (PyObject | IPortfolioConstructionModel) — Model defining how to build a portfolio from insights
SetPortfolioConstruction(portfolioConstruction)[source]

Sets the portfolio construction model

Parameters:
  • portfolioConstruction (PyObject | IPortfolioConstructionModel) — Model defining how to build a portfolio from insights
set_risk_management(risk_management)[source]

Sets the risk management model

Parameters:
  • risk_management (PyObject | IRiskManagementModel) — Model defining how risk is managed
SetRiskManagement(riskManagement)[source]

Sets the risk management model

Parameters:
  • riskManagement (PyObject | IRiskManagementModel) — Model defining how risk is managed
set_universe_selection(universe_selection)[source]

Sets the universe selection model

Parameters:
  • universe_selection (PyObject | IUniverseSelectionModel) — Model defining universes for the algorithm
SetUniverseSelection(universeSelection)[source]

Sets the universe selection model

Parameters:
  • universeSelection (PyObject | IUniverseSelectionModel) — Model defining universes for the algorithm
property alpha[source]

Gets or sets the alpha model

Returns:

Gets or sets the alpha model

Return type:

IAlphaModel

property Alpha[source]

Gets or sets the alpha model

Returns:

Gets or sets the alpha model

Return type:

IAlphaModel

property execution[source]

Gets or sets the execution model

Returns:

Gets or sets the execution model

Return type:

IExecutionModel

property Execution[source]

Gets or sets the execution model

Returns:

Gets or sets the execution model

Return type:

IExecutionModel

property insights[source]

Gets the insight manager

Returns:

Gets the insight manager

Return type:

InsightManager

property Insights[source]

Gets the insight manager

Returns:

Gets the insight manager

Return type:

InsightManager

property portfolio_construction[source]

Gets or sets the portfolio construction model

Returns:

Gets or sets the portfolio construction model

Return type:

IPortfolioConstructionModel

property PortfolioConstruction[source]

Gets or sets the portfolio construction model

Returns:

Gets or sets the portfolio construction model

Return type:

IPortfolioConstructionModel

property risk_management[source]

Gets or sets the risk management model

Returns:

Gets or sets the risk management model

Return type:

IRiskManagementModel

property RiskManagement[source]

Gets or sets the risk management model

Returns:

Gets or sets the risk management model

Return type:

IRiskManagementModel

property universe_selection[source]

Gets or sets the universe selection model.

Returns:

Gets or sets the universe selection model.

Return type:

IUniverseSelectionModel

property UniverseSelection[source]

Gets or sets the universe selection model.

Returns:

Gets or sets the universe selection model.

Return type:

IUniverseSelectionModel

Charting

Charting

add_chart(chart)[source]

Add a Chart object to algorithm collection

Parameters:
  • chart (Chart) — Chart object to add to collection.
AddChart(chart)[source]

Add a Chart object to algorithm collection

Parameters:
  • chart (Chart) — Chart object to add to collection.
add_series(chart, series, series_type, unit=$)[source]

Add a series object for charting. This is useful when initializing charts with series other than type = line. If a series exists in the chart with the same name, then it is replaced.

Parameters:
  • chart (str) — The chart name
  • series (str) — The series name
  • series_type (SeriesType) — The type of series, i.e, Scatter
  • unit (str, optional) — The unit of the y axis, usually $
AddSeries(chart, series, seriesType, unit=$)[source]

Add a series object for charting. This is useful when initializing charts with series other than type = line. If a series exists in the chart with the same name, then it is replaced.

Parameters:
  • chart (string) — The chart name
  • series (string) — The series name
  • seriesType (SeriesType) — The type of series, i.e, Scatter
  • unit (string, optional) — The unit of the y axis, usually $
get_chart_updates(clear_chart_data=False)[source]

Get the chart updates by fetch the recent points added and return for dynamic Charting.

Parameters:
  • clear_chart_data (bool, optional)
Returns:

List of chart updates since the last request

Return type:

List[Chart]

GetChartUpdates(clearChartData=False)[source]

Get the chart updates by fetch the recent points added and return for dynamic Charting.

Parameters:
  • clearChartData (bool, optional)
Returns:

List of chart updates since the last request

Return type:

IEnumerable[Chart]

plot(chart, series, open, high, low, close)[source]

Plot a chart using string series name, with value.

Parameters:
  • chart (str) — Chart name
  • series (str) — Series name
  • open (int | float) — The candlestick open value
  • high (int | float) — The candlestick high value
  • low (int | float) — The candlestick low value
  • close (int | float) — The candlestick close value
plot(chart, first, second=None, third=None, fourth=None)[source]

Plot a chart using string series name, with value.

Parameters:
plot(chart, series, value)[source]

Plot a chart using string series name, with value.

Parameters:
  • chart (str)
  • series (str)
  • value (int | float)
plot(chart, series, bar)[source]

Plot a chart using string series name, with value.

Parameters:
  • chart (str) — Chart name
  • series (str) — Name of the plot series
  • bar (TradeBar) — The trade bar to be plotted to the candlestick series
plot(series, py_object)[source]

Plot a chart using string series name, with value.

Parameters:
  • series (str) — Name of the plot series
  • py_object (PyObject) — PyObject with the value to plot
plot(chart, indicators)[source]

Plot a chart using string series name, with value.

Parameters:
  • chart (str) — The chart's name
  • indicators (IndicatorBase[]) — The indicators to plot
Plot(chart, series, open, high, low, close)[source]

Plot a chart using string series name, with value.

Parameters:
  • chart (string) — Chart name
  • series (string) — Series name
  • open (Double | Decimal | Int32 | Single) — The candlestick open value
  • high (Double | Decimal | Int32 | Single) — The candlestick high value
  • low (Double | Decimal | Int32 | Single) — The candlestick low value
  • close (Double | Decimal | Int32 | Single) — The candlestick close value
Plot(chart, first, second=None, third=None, fourth=None)[source]

Plot a chart using string series name, with value.

Parameters:
Plot(chart, series, value)[source]

Plot a chart using string series name, with value.

Parameters:
  • chart (string)
  • series (string)
  • value (Double | Decimal | Int32 | Single)
Plot(chart, series, bar)[source]

Plot a chart using string series name, with value.

Parameters:
  • chart (string) — Chart name
  • series (string) — Name of the plot series
  • bar (TradeBar) — The trade bar to be plotted to the candlestick series
Plot(series, pyObject)[source]

Plot a chart using string series name, with value.

Parameters:
  • series (string) — Name of the plot series
  • pyObject (PyObject) — PyObject with the value to plot
Plot(chart, indicators)[source]

Plot a chart using string series name, with value.

Parameters:
  • chart (string) — The chart's name
  • indicators (IndicatorBase[]) — The indicators to plot
plot_indicator(chart, wait_for_ready, first, second=None, third=None, fourth=None)[source]

Automatically plots each indicator when a new value is available

Parameters:
  • chart (str)
  • wait_for_ready (bool)
  • first (PyObject)
  • second (PyObject, optional)
  • third (PyObject, optional)
  • fourth (PyObject, optional)
plot_indicator(chart, wait_for_ready, indicators)[source]

Automatically plots each indicator when a new value is available

Parameters:
PlotIndicator(chart, waitForReady, first, second=None, third=None, fourth=None)[source]

Automatically plots each indicator when a new value is available

Parameters:
  • chart (string)
  • waitForReady (bool)
  • first (PyObject)
  • second (PyObject, optional)
  • third (PyObject, optional)
  • fourth (PyObject, optional)
PlotIndicator(chart, waitForReady, indicators)[source]

Automatically plots each indicator when a new value is available

Parameters:
record(series, value)[source]

Plot a chart using string series name, with int value. Alias of Plot();

Parameters:
  • series (str)
  • value (int | float)
Record(series, value)[source]

Plot a chart using string series name, with int value. Alias of Plot();

Parameters:
  • series (string)
  • value (Double | Decimal | Int32)
set_runtime_statistic(name, value)[source]

Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI.

Parameters:
  • name (str) — Name of your runtime statistic
  • value (int | float | str) — String value of your runtime statistic
SetRuntimeStatistic(name, value)[source]

Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI.

Parameters:
  • name (string) — Name of your runtime statistic
  • value (String | Double | Decimal | Int32) — String value of your runtime statistic
property runtime_statistics[source]

Access to the runtime statistics property. User provided statistics.

Returns:

Access to the runtime statistics property. User provided statistics.

Return type:

Dict[str, str]

property RuntimeStatistics[source]

Access to the runtime statistics property. User provided statistics.

Returns:

Access to the runtime statistics property. User provided statistics.

Return type:

ConcurrentDictionary<String, String>

Consolidating Data

Consolidating Data

consolidate(symbol, period, tick_type, handler)[source]

Registers the handler to receive consolidated data for the specified symbol

Parameters:
  • symbol (Symbol) — The symbol who's data is to be consolidated
  • period (timedelta | Resolution) — The symbol who's data is to be consolidated
  • tick_type (TickType) — The consolidation period
  • handler (Action[QuoteBar] | Action[TradeBar] | PyObject | None) — The tick type of subscription used as data source for consolidator. Specify null to use first subscription found.
Returns:

A new consolidator matching the requested parameters with the handler already registered

Return type:

IDataConsolidator

consolidate(symbol, calendar, tick_type, handler)[source]

Registers the handler to receive consolidated data for the specified symbol

Parameters:
  • symbol (Symbol) — The symbol who's data is to be consolidated
  • calendar (Callable[datetime, CalendarInfo]) — The symbol who's data is to be consolidated
  • tick_type (TickType) — The consolidation calendar
  • handler (Action[QuoteBar] | Action[TradeBar] | PyObject | None) — The tick type of subscription used as data source for consolidator. Specify null to use first subscription found.
Returns:

A new consolidator matching the requested parameters with the handler already registered

Return type:

IDataConsolidator

Consolidate(symbol, period, tickType, handler)[source]

Registers the handler to receive consolidated data for the specified symbol

Parameters:
  • symbol (Symbol) — The symbol who's data is to be consolidated
  • period (TimeSpan | Resolution) — The symbol who's data is to be consolidated
  • tickType (TickType) — The consolidation period
  • handler (Action[QuoteBar] | Action[TradeBar] | PyObject | None) — The tick type of subscription used as data source for consolidator. Specify null to use first subscription found.
Returns:

A new consolidator matching the requested parameters with the handler already registered

Return type:

IDataConsolidator

Consolidate(symbol, calendar, tickType, handler)[source]

Registers the handler to receive consolidated data for the specified symbol

Parameters:
  • symbol (Symbol) — The symbol who's data is to be consolidated
  • calendar (Func<DateTime, CalendarInfo>) — The symbol who's data is to be consolidated
  • tickType (TickType) — The consolidation calendar
  • handler (Action[QuoteBar] | Action[TradeBar] | PyObject | None) — The tick type of subscription used as data source for consolidator. Specify null to use first subscription found.
Returns:

A new consolidator matching the requested parameters with the handler already registered

Return type:

IDataConsolidator

deregister_indicator(indicator)[source]

Will deregister an indicator and it's associated consolidator instance so they stop receiving data updates

Parameters:
  • indicator (IndicatorBase) — The indicator instance to deregister
DeregisterIndicator(indicator)[source]

Will deregister an indicator and it's associated consolidator instance so they stop receiving data updates

Parameters:
  • indicator (IndicatorBase) — The indicator instance to deregister
resolve_consolidator(symbol, resolution, data_type=None)[source]

Gets the default consolidator for the specified symbol and resolution

Parameters:
  • symbol (Symbol) — The symbol whose data is to be consolidated
  • resolution (Resolution) — The resolution for the consolidator, if null, uses the resolution from subscription
  • data_type (Type, optional) — The data type for this consolidator, if null, uses TradeBar over QuoteBar if present
Returns:

The new default consolidator

Return type:

IDataConsolidator

resolve_consolidator(symbol, time_span, data_type=None)[source]

Gets the default consolidator for the specified symbol and resolution

Parameters:
  • symbol (Symbol) — The symbol whose data is to be consolidated
  • time_span (timedelta) — The requested time span for the consolidator, if null, uses the resolution from subscription
  • data_type (Type, optional) — The data type for this consolidator, if null, uses TradeBar over QuoteBar if present
Returns:

The new default consolidator

Return type:

IDataConsolidator

ResolveConsolidator(symbol, resolution, dataType=None)[source]

Gets the default consolidator for the specified symbol and resolution

Parameters:
  • symbol (Symbol) — The symbol whose data is to be consolidated
  • resolution (Resolution) — The resolution for the consolidator, if null, uses the resolution from subscription
  • dataType (Type, optional) — The data type for this consolidator, if null, uses TradeBar over QuoteBar if present
Returns:

The new default consolidator

Return type:

IDataConsolidator

ResolveConsolidator(symbol, timeSpan, dataType=None)[source]

Gets the default consolidator for the specified symbol and resolution

Parameters:
  • symbol (Symbol) — The symbol whose data is to be consolidated
  • timeSpan (TimeSpan) — The requested time span for the consolidator, if null, uses the resolution from subscription
  • dataType (Type, optional) — The data type for this consolidator, if null, uses TradeBar over QuoteBar if present
Returns:

The new default consolidator

Return type:

IDataConsolidator

unregister_indicator(indicator)[source]

Will unregister an indicator and it's associated consolidator instance so they stop receiving data updates

Parameters:
  • indicator (IndicatorBase) — The indicator instance to unregister
UnregisterIndicator(indicator)[source]

Will unregister an indicator and it's associated consolidator instance so they stop receiving data updates

Parameters:
  • indicator (IndicatorBase) — The indicator instance to unregister

Handling Data

Handling Data

cik(symbol)[source]

Converts a CIK identifier into String) array

Parameters:
Returns:

CIK corresponding to the Symbol. If no matching CIK is found, returns null.

Return type:

Optional[int]

cik(cik, trading_date=None)[source]

Converts a CIK identifier into String) array

Parameters:
  • cik (int) — The CIK identifier of an asset
  • trading_date (datetime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbols corresponding to the CIK. If no Symbol with a matching CIK was found, returns empty array.

Return type:

Symbol[]

CIK(symbol)[source]

Converts a CIK identifier into String) array

Parameters:
Returns:

CIK corresponding to the Symbol. If no matching CIK is found, returns null.

Return type:

Nullable[Int32]

CIK(cik, tradingDate=None)[source]

Converts a CIK identifier into String) array

Parameters:
  • cik (Int32) — The CIK identifier of an asset
  • tradingDate (DateTime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbols corresponding to the CIK. If no Symbol with a matching CIK was found, returns empty array.

Return type:

Symbol[]

composite_figi(composite_figi, trading_date=None)[source]

Converts a composite FIGI identifier into a String)

Parameters:
  • composite_figi (str) — The composite Financial Instrument Global Identifier (FIGI) of an asset
  • trading_date (datetime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbol corresponding to the composite FIGI. If no Symbol with a matching composite FIGI was found, returns null.

Return type:

Symbol

composite_figi(symbol)[source]

Converts a composite FIGI identifier into a String)

Parameters:
Returns:

Composite FIGI corresponding to the Symbol. If no matching composite FIGI is found, returns null.

Return type:

str

cusip(cusip, trading_date=None)[source]

Converts a CUSIP identifier into a String)

Parameters:
  • cusip (str) — The CUSIP number of an asset
  • trading_date (datetime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbol corresponding to the CUSIP. If no Symbol with a matching CUSIP was found, returns null.

Return type:

Symbol

cusip(symbol)[source]

Converts a CUSIP identifier into a String)

Parameters:
Returns:

CUSIP corresponding to the Symbol. If no matching CUSIP is found, returns null.

Return type:

str

CUSIP(cusip, tradingDate=None)[source]

Converts a CUSIP identifier into a String)

Parameters:
  • cusip (string) — The CUSIP number of an asset
  • tradingDate (DateTime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbol corresponding to the CUSIP. If no Symbol with a matching CUSIP was found, returns null.

Return type:

Symbol

CUSIP(symbol)[source]

Converts a CUSIP identifier into a String)

Parameters:
Returns:

CUSIP corresponding to the Symbol. If no matching CUSIP is found, returns null.

Return type:

String

fundamentals(symbol)[source]

Get the fundamental data for the requested symbol at the current time

Parameters:
Returns:

The fundamental data for the Symbol

Return type:

Fundamental

fundamentals(symbols)[source]

Get the fundamental data for the requested symbol at the current time

Parameters:
  • symbols (List[Symbol])
Returns:

The fundamental data for the symbols

Return type:

List[Fundamental]

Fundamentals(symbol)[source]

Get the fundamental data for the requested symbol at the current time

Parameters:
Returns:

The fundamental data for the Symbol

Return type:

Fundamental

Fundamentals(symbols)[source]

Get the fundamental data for the requested symbol at the current time

Parameters:
  • symbols (List<Symbol>)
Returns:

The fundamental data for the symbols

Return type:

List[Fundamental]

isin(isin, trading_date=None)[source]

Converts an ISIN identifier into a String)

Parameters:
  • isin (str) — The International Securities Identification Number (ISIN) of an asset
  • trading_date (datetime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbol corresponding to the ISIN. If no Symbol with a matching ISIN was found, returns null.

Return type:

Symbol

isin(symbol)[source]

Converts an ISIN identifier into a String)

Parameters:
Returns:

ISIN corresponding to the Symbol. If no matching ISIN is found, returns null.

Return type:

str

ISIN(isin, tradingDate=None)[source]

Converts an ISIN identifier into a String)

Parameters:
  • isin (string) — The International Securities Identification Number (ISIN) of an asset
  • tradingDate (DateTime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbol corresponding to the ISIN. If no Symbol with a matching ISIN was found, returns null.

Return type:

Symbol

ISIN(symbol)[source]

Converts an ISIN identifier into a String)

Parameters:
Returns:

ISIN corresponding to the Symbol. If no matching ISIN is found, returns null.

Return type:

String

on_data(slice)[source]

Event - v3.0 DATA EVENT HANDLER: (Pattern) Basic template for user to override for receiving all subscription data in a single event

Parameters:
  • slice (Slice) — The current slice of data keyed by symbol string
OnData(slice)[source]

Event - v3.0 DATA EVENT HANDLER: (Pattern) Basic template for user to override for receiving all subscription data in a single event

Parameters:
  • slice (Slice) — The current slice of data keyed by symbol string
on_delistings(delistings)[source]

Event handler to be called when there's been a delistings event

Parameters:
  • delistings (Delistings) — The current time slice delistings
OnDelistings(delistings)[source]

Event handler to be called when there's been a delistings event

Parameters:
  • delistings (Delistings) — The current time slice delistings
on_dividends(dividends)[source]

Event handler to be called when there's been a dividend event

Parameters:
  • dividends (Dividends) — The current time slice dividends
OnDividends(dividends)[source]

Event handler to be called when there's been a dividend event

Parameters:
  • dividends (Dividends) — The current time slice dividends
on_end_of_algorithm()[source]

End of algorithm run event handler. This method is called at the end of a backtest or live trading operation. Intended for closing out logs.

OnEndOfAlgorithm()[source]

End of algorithm run event handler. This method is called at the end of a backtest or live trading operation. Intended for closing out logs.

on_end_of_day(symbol)[source]

End of a trading day event handler. This method is called at the end of the algorithm day (or multiple times if trading multiple assets).

Parameters:
  • symbol (Symbol | str) — Asset symbol for this end of day event. Forex and equities have different closing hours.
OnEndOfDay(symbol)[source]

End of a trading day event handler. This method is called at the end of the algorithm day (or multiple times if trading multiple assets).

Parameters:
  • symbol (String | Symbol) — Asset symbol for this end of day event. Forex and equities have different closing hours.
on_end_of_time_step()[source]

Invoked at the end of every time step. This allows the algorithm to process events before advancing to the next time step.

OnEndOfTimeStep()[source]

Invoked at the end of every time step. This allows the algorithm to process events before advancing to the next time step.

on_splits(splits)[source]

Event handler to be called when there's been a split event

Parameters:
  • splits (Splits) — The current time slice splits
OnSplits(splits)[source]

Event handler to be called when there's been a split event

Parameters:
  • splits (Splits) — The current time slice splits
on_symbol_changed_events(symbols_changed)[source]

Event handler to be called when there's been a symbol changed event

Parameters:
OnSymbolChangedEvents(symbolsChanged)[source]

Event handler to be called when there's been a symbol changed event

Parameters:
on_warmup_finished()[source]

Called when the algorithm has completed initialization and warm up.

OnWarmupFinished()[source]

Called when the algorithm has completed initialization and warm up.

sedol(sedol, trading_date=None)[source]

Converts a SEDOL identifier into a String)

Parameters:
  • sedol (str) — The SEDOL identifier of an asset
  • trading_date (datetime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbol corresponding to the SEDOL. If no Symbol with a matching SEDOL was found, returns null.

Return type:

Symbol

sedol(symbol)[source]

Converts a SEDOL identifier into a String)

Parameters:
Returns:

SEDOL corresponding to the Symbol. If no matching SEDOL is found, returns null.

Return type:

str

SEDOL(sedol, tradingDate=None)[source]

Converts a SEDOL identifier into a String)

Parameters:
  • sedol (string) — The SEDOL identifier of an asset
  • tradingDate (DateTime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbol corresponding to the SEDOL. If no Symbol with a matching SEDOL was found, returns null.

Return type:

Symbol

SEDOL(symbol)[source]

Converts a SEDOL identifier into a String)

Parameters:
Returns:

SEDOL corresponding to the Symbol. If no matching SEDOL is found, returns null.

Return type:

String

set_algorithm_id(algorithm_id)[source]

Set the algorithm id (backtestId or live deployId for the algorithm).

Parameters:
  • algorithm_id (str) — String Algorithm Id
SetAlgorithmId(algorithmId)[source]

Set the algorithm id (backtestId or live deployId for the algorithm).

Parameters:
  • algorithmId (string) — String Algorithm Id
set_api(api)[source]

Provide the API for the algorithm.

Parameters:
  • api (IApi) — Initiated API
SetApi(api)[source]

Provide the API for the algorithm.

Parameters:
  • api (IApi) — Initiated API
set_available_data_types(available_data_types)[source]

Set the available data feeds in the SecurityManager

Parameters:
  • available_data_types (Dict[SecurityType, List[TickType]]) — supports
SetAvailableDataTypes(availableDataTypes)[source]

Set the available data feeds in the SecurityManager

Parameters:
  • availableDataTypes (Dictionary<SecurityType, List<TickType>>) — supports
set_current_slice(slice)[source]

Sets the current slice

Parameters:
  • slice (Slice) — The Slice object
SetCurrentSlice(slice)[source]

Sets the current slice

Parameters:
  • slice (Slice) — The Slice object
set_date_time(frontier)[source]

Update the internal algorithm time frontier.

Parameters:
  • frontier (datetime) — Current utc datetime.
SetDateTime(frontier)[source]

Update the internal algorithm time frontier.

Parameters:
  • frontier (DateTime) — Current utc datetime.
set_end_date(year, month, day)[source]

Set the end date for a backtest run

Parameters:
  • year (int) — Int end date 1-30
  • month (int) — Int month end date
  • day (int) — Int year end date
set_end_date(end)[source]

Set the end date for a backtest run

Parameters:
  • end (datetime) — Datetime value for end date
SetEndDate(year, month, day)[source]

Set the end date for a backtest run

Parameters:
  • year (Int32) — Int end date 1-30
  • month (Int32) — Int month end date
  • day (Int32) — Int year end date
SetEndDate(end)[source]

Set the end date for a backtest run

Parameters:
  • end (DateTime) — Datetime value for end date
set_object_store(object_store)[source]

Sets the object store

Parameters:
  • object_store (IObjectStore) — The object store
SetObjectStore(objectStore)[source]

Sets the object store

Parameters:
  • objectStore (IObjectStore) — The object store
set_run_time_error(exception)[source]

Set the runtime error

Parameters:
  • exception (Exception) — Represents error that occur during execution
SetRunTimeError(exception)[source]

Set the runtime error

Parameters:
  • exception (Exception) — Represents error that occur during execution
set_start_date(year, month, day)[source]

Set the start date for backtest.

Parameters:
  • year (int) — Int starting date 1-30
  • month (int) — Int month starting date
  • day (int) — Int year starting date
set_start_date(start)[source]

Set the start date for backtest.

Parameters:
  • start (datetime) — Datetime Start date for backtest
SetStartDate(year, month, day)[source]

Set the start date for backtest.

Parameters:
  • year (Int32) — Int starting date 1-30
  • month (Int32) — Int month starting date
  • day (Int32) — Int year starting date
SetStartDate(start)[source]

Set the start date for backtest.

Parameters:
  • start (DateTime) — Datetime Start date for backtest
set_time_zone(time_zone)[source]

Sets the time zone of the Time property in the algorithm

Parameters:
  • time_zone (str | datetimeZone) — The desired time zone
SetTimeZone(timeZone)[source]

Sets the time zone of the Time property in the algorithm

Parameters:
  • timeZone (String | DateTimeZone) — The desired time zone
property algorithm_id[source]

Algorithm Id for this backtest or live algorithm.

Returns:

Algorithm Id for this backtest or live algorithm.

Return type:

str

property AlgorithmId[source]

Algorithm Id for this backtest or live algorithm.

Returns:

Algorithm Id for this backtest or live algorithm.

Return type:

string

property current_slice[source]

Returns the current Slice object

Returns:

Returns the current Slice object

Return type:

Slice

property CurrentSlice[source]

Returns the current Slice object

Returns:

Returns the current Slice object

Return type:

Slice

property end_date[source]

Value of the user set start-date from the backtest. Controls the period of the backtest.

Returns:

Value of the user set start-date from the backtest. Controls the period of the backtest.

Return type:

datetime

property EndDate[source]

Value of the user set start-date from the backtest. Controls the period of the backtest.

Returns:

Value of the user set start-date from the backtest. Controls the period of the backtest.

Return type:

DateTime

property name[source]

Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.

Returns:

Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.

Return type:

str

property Name[source]

Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.

Returns:

Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.

Return type:

string

property object_store[source]

Gets the object store, used for persistence

Returns:

Gets the object store, used for persistence

Return type:

ObjectStore

property ObjectStore[source]

Gets the object store, used for persistence

Returns:

Gets the object store, used for persistence

Return type:

ObjectStore

property settings[source]

Gets the user settings for the algorithm

Returns:

Gets the user settings for the algorithm

Return type:

IAlgorithmSettings

property Settings[source]

Gets the user settings for the algorithm

Returns:

Gets the user settings for the algorithm

Return type:

IAlgorithmSettings

property start_date[source]

Value of the user set start-date from the backtest.

Returns:

Value of the user set start-date from the backtest.

Return type:

datetime

property StartDate[source]

Value of the user set start-date from the backtest.

Returns:

Value of the user set start-date from the backtest.

Return type:

DateTime

property status[source]

Gets or sets the current status of the algorithm

Returns:

Gets or sets the current status of the algorithm

Return type:

AlgorithmStatus

property Status[source]

Gets or sets the current status of the algorithm

Returns:

Gets or sets the current status of the algorithm

Return type:

AlgorithmStatus

property subscription_manager[source]

Generic Data Manager - Required for compiling all data feeds in order, and passing them into algorithm event methods. The subscription manager contains a list of the data feed's we're subscribed to and properties of each data feed.

Returns:

Generic Data Manager - Required for compiling all data feeds in order, and passing them into algorithm event methods. The subscription manager contains a list of the data feed's we're subscribed to and properties of each data feed.

Return type:

SubscriptionManager

property SubscriptionManager[source]

Generic Data Manager - Required for compiling all data feeds in order, and passing them into algorithm event methods. The subscription manager contains a list of the data feed's we're subscribed to and properties of each data feed.

Returns:

Generic Data Manager - Required for compiling all data feeds in order, and passing them into algorithm event methods. The subscription manager contains a list of the data feed's we're subscribed to and properties of each data feed.

Return type:

SubscriptionManager

property tags[source]

A list of tags associated with the algorithm or the backtest, useful for categorization

Returns:

A list of tags associated with the algorithm or the backtest, useful for categorization

Return type:

HashSet[str]

property Tags[source]

A list of tags associated with the algorithm or the backtest, useful for categorization

Returns:

A list of tags associated with the algorithm or the backtest, useful for categorization

Return type:

HashSet<String>

property time[source]

Read-only value for current time frontier of the algorithm in terms of the TimeZone

Returns:

Read-only value for current time frontier of the algorithm in terms of the TimeZone

Return type:

datetime

property Time[source]

Read-only value for current time frontier of the algorithm in terms of the TimeZone

Returns:

Read-only value for current time frontier of the algorithm in terms of the TimeZone

Return type:

DateTime

property time_zone[source]

Gets the time zone used for the Time property. The default value is NewYork

Returns:

Gets the time zone used for the Time property. The default value is NewYork

Return type:

datetimeZone

property TimeZone[source]

Gets the time zone used for the Time property. The default value is NewYork

Returns:

Gets the time zone used for the Time property. The default value is NewYork

Return type:

DateTimeZone

property utc_time[source]

Current date/time in UTC.

Returns:

Current date/time in UTC.

Return type:

datetime

property UtcTime[source]

Current date/time in UTC.

Returns:

Current date/time in UTC.

Return type:

DateTime

CompositeFIGI(compositeFigi, tradingDate=None)[source]

Converts a composite FIGI identifier into a String)

Parameters:
  • compositeFigi (string) — The composite Financial Instrument Global Identifier (FIGI) of an asset
  • tradingDate (DateTime, optional) — The date that the stock being looked up iswas traded at. The date is used to create a Symbol with the ticker set to the ticker the asset traded under on the trading date.
Returns:

Symbol corresponding to the composite FIGI. If no Symbol with a matching composite FIGI was found, returns null.

Return type:

Symbol

CompositeFIGI(symbol)[source]

Converts a composite FIGI identifier into a String)

Parameters:
Returns:

Composite FIGI corresponding to the Symbol. If no matching composite FIGI is found, returns null.

Return type:

String

Historical Data

Historical Data

history(universe, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • universe (Universe) — The universe to fetch the data for
  • start (datetime) — The start time in the algorithm's time zone
  • end (datetime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

List[BaseDataCollection]

history(universe, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • universe (Universe) — The universe to fetch the data for
  • periods (int) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing data over the most recent span for all configured securities

Return type:

List[BaseDataCollection]

history(universe, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • universe (Universe) — The universe to fetch the data for
  • span (timedelta) — The span over which to request data. This is a calendar span, so take into consideration weekends and such
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

List[BaseDataCollection]

history(symbols, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List[Symbol]) — The symbols to retrieve historical data for
  • start (datetime) — The start time in the algorithm's time zone
  • end (datetime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
history(symbols, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List[Symbol]) — The symbols to retrieve historical data for
  • span (timedelta) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
history(symbols, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List[Symbol]) — The symbols to retrieve historical data for
  • periods (int) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
history(symbols, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List[Symbol]) — The symbols to retrieve historical data for
  • start (datetime) — The start time in the algorithm's time zone
  • end (datetime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

List[Slice]

history(symbols, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List[Symbol]) — The symbols to retrieve historical data for
  • span (timedelta) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

List[Slice]

history(symbols, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List[Symbol]) — The symbols to retrieve historical data for
  • periods (int) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

List[Slice]

history(request)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
Returns:

An enumerable of slice satisfying the specified history request

Return type:

List[Slice]

history(requests)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • requests (List[HistoryRequest]) — the history requests to execute
Returns:

An enumerable of slice satisfying the specified history request

Return type:

List[Slice]

history(symbol, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • start (datetime) — The start time in the algorithm's time zone
  • end (datetime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
history(symbol, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • periods (int) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
history(symbol, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • span (timedelta) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
history(symbol, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • start (datetime) — The start time in the algorithm's time zone
  • end (datetime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

List[TradeBar]

history(symbol, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • span (timedelta) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

List[TradeBar]

history(symbol, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • periods (int) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

List[TradeBar]

history(type, tickers, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • tickers (PyObject) — The symbols to retrieve historical data for
  • start (datetime) — The start time in the algorithm's time zone
  • end (datetime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

history(type, symbol, start, end, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • symbol (Symbol) — The symbol to retrieve historical data for
  • start (datetime) — The start time in the algorithm's time zone
  • end (datetime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

history(type, tickers, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • tickers (PyObject) — The symbols to retrieve historical data for
  • periods (int) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

history(type, tickers, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • tickers (PyObject) — The symbols to retrieve historical data for
  • span (timedelta) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

history(type, symbol, periods, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • symbol (Symbol) — The symbol to retrieve historical data for
  • periods (int) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

history(type, symbol, span, resolution=None, fill_forward=None, extended_market_hours=None, data_mapping_mode=None, data_normalization_mode=None, contract_depth_offset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • symbol (Symbol) — The symbol to retrieve historical data for
  • span (timedelta) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fill_forward (bool, optional) — True to fill forward missing data, false otherwise
  • extended_market_hours (bool, optional) — True to include extended market hours data, false otherwise
  • data_mapping_mode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • data_normalization_mode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contract_depth_offset (int, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

History(universe, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • universe (Universe) — The universe to fetch the data for
  • start (DateTime) — The start time in the algorithm's time zone
  • end (DateTime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

IEnumerable[BaseDataCollection]

History(universe, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • universe (Universe) — The universe to fetch the data for
  • periods (Int32) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing data over the most recent span for all configured securities

Return type:

IEnumerable[BaseDataCollection]

History(universe, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • universe (Universe) — The universe to fetch the data for
  • span (TimeSpan) — The span over which to request data. This is a calendar span, so take into consideration weekends and such
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

IEnumerable[BaseDataCollection]

History(symbols, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List<Symbol>) — The symbols to retrieve historical data for
  • start (DateTime) — The start time in the algorithm's time zone
  • end (DateTime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
History(symbols, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List<Symbol>) — The symbols to retrieve historical data for
  • span (TimeSpan) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
History(symbols, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List<Symbol>) — The symbols to retrieve historical data for
  • periods (Int32) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
History(symbols, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List<Symbol>) — The symbols to retrieve historical data for
  • start (DateTime) — The start time in the algorithm's time zone
  • end (DateTime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

IEnumerable[Slice]

History(symbols, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List<Symbol>) — The symbols to retrieve historical data for
  • span (TimeSpan) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

IEnumerable[Slice]

History(symbols, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbols (List<Symbol>) — The symbols to retrieve historical data for
  • periods (Int32) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

IEnumerable[Slice]

History(request)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
Returns:

An enumerable of slice satisfying the specified history request

Return type:

IEnumerable[Slice]

History(requests)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • requests (List<HistoryRequest>) — the history requests to execute
Returns:

An enumerable of slice satisfying the specified history request

Return type:

IEnumerable[Slice]

History(symbol, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • start (DateTime) — The start time in the algorithm's time zone
  • end (DateTime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
History(symbol, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • periods (Int32) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
History(symbol, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • span (TimeSpan) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
History(symbol, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • start (DateTime) — The start time in the algorithm's time zone
  • end (DateTime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

IEnumerable[TradeBar]

History(symbol, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • span (TimeSpan) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

IEnumerable[TradeBar]

History(symbol, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • symbol (Symbol) — The symbol to retrieve historical data for
  • periods (Int32) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

An enumerable of slice containing the requested historical data

Return type:

IEnumerable[TradeBar]

History(type, tickers, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • tickers (PyObject) — The symbols to retrieve historical data for
  • start (DateTime) — The start time in the algorithm's time zone
  • end (DateTime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

History(type, symbol, start, end, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • symbol (Symbol) — The symbol to retrieve historical data for
  • start (DateTime) — The start time in the algorithm's time zone
  • end (DateTime) — The end time in the algorithm's time zone
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

History(type, tickers, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • tickers (PyObject) — The symbols to retrieve historical data for
  • periods (Int32) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

History(type, tickers, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • tickers (PyObject) — The symbols to retrieve historical data for
  • span (TimeSpan) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

History(type, symbol, periods, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • symbol (Symbol) — The symbol to retrieve historical data for
  • periods (Int32) — The number of bars to request
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

History(type, symbol, span, resolution=None, fillForward=None, extendedMarketHours=None, dataMappingMode=None, dataNormalizationMode=None, contractDepthOffset=None)[source]

Get the history for all configured securities over the requested span. This will use the resolution and other subscription settings for each security. The symbols must exist in the Securities collection.

Parameters:
  • type (PyObject) — The data type of the symbols
  • symbol (Symbol) — The symbol to retrieve historical data for
  • span (TimeSpan) — The span over which to retrieve recent historical data
  • resolution (Resolution, optional) — The resolution to request
  • fillForward (Boolean, optional) — True to fill forward missing data, false otherwise
  • extendedMarketHours (Boolean, optional) — True to include extended market hours data, false otherwise
  • dataMappingMode (DataMappingMode, optional) — The contract mapping mode to use for the security history request
  • dataNormalizationMode (DataNormalizationMode, optional) — The price scaling mode to use for the securities history
  • contractDepthOffset (Int32, optional) — The continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract
Returns:

pandas.DataFrame containing the requested historical data

Return type:

PyObject

set_finished_warming_up()[source]

Sets IsWarmingUp to false to indicate this algorithm has finished its warm up

SetFinishedWarmingUp()[source]

Sets IsWarmingUp to false to indicate this algorithm has finished its warm up

set_history_provider(history_provider)[source]

Set the historical data provider

Parameters:
  • history_provider (IHistoryProvider) — Historical data provider
SetHistoryProvider(historyProvider)[source]

Set the historical data provider

Parameters:
  • historyProvider (IHistoryProvider) — Historical data provider
set_warm_up(time_span, resolution)[source]

Sets the warm up period to the specified value

Parameters:
  • time_span (timedelta) — The amount of time to warm up, this does not take into account market hoursweekends
  • resolution (Resolution) — The resolution to request
set_warm_up(bar_count, resolution)[source]

Sets the warm up period to the specified value

Parameters:
  • bar_count (int) — The number of data points requested for warm up
  • resolution (Resolution) — The resolution to request
SetWarmUp(timeSpan, resolution)[source]

Sets the warm up period to the specified value

Parameters:
  • timeSpan (TimeSpan) — The amount of time to warm up, this does not take into account market hoursweekends
  • resolution (Resolution) — The resolution to request
SetWarmUp(barCount, resolution)[source]

Sets the warm up period to the specified value

Parameters:
  • barCount (Int32) — The number of data points requested for warm up
  • resolution (Resolution) — The resolution to request
set_warmup(time_span, resolution)[source]

Sets the warm up period to the specified value

Parameters:
  • time_span (timedelta) — The amount of time to warm up, this does not take into account market hoursweekends
  • resolution (Resolution) — The resolution to request
set_warmup(bar_count, resolution)[source]

Sets the warm up period to the specified value

Parameters:
  • bar_count (int) — The number of data points requested for warm up
  • resolution (Resolution) — The resolution to request
SetWarmup(timeSpan, resolution)[source]

Sets the warm up period to the specified value

Parameters:
  • timeSpan (TimeSpan) — The amount of time to warm up, this does not take into account market hoursweekends
  • resolution (Resolution) — The resolution to request
SetWarmup(barCount, resolution)[source]

Sets the warm up period to the specified value

Parameters:
  • barCount (Int32) — The number of data points requested for warm up
  • resolution (Resolution) — The resolution to request
property is_warming_up[source]

Gets whether or not this algorithm is still warming up

Returns:

Gets whether or not this algorithm is still warming up

Return type:

bool

property IsWarmingUp[source]

Gets whether or not this algorithm is still warming up

Returns:

Gets whether or not this algorithm is still warming up

Return type:

bool

Indicators

Indicators

a(target, reference, alpha_period=1, beta_period=252, resolution=None, risk_free_rate=None, selector=None)[source]

Adds a tag to the algorithm

Parameters:
  • target (Symbol) — The target symbol whose Alpha value we want
  • reference (Symbol) — The reference symbol to compare with the target symbol
  • alpha_period (int, optional) — The period of the Alpha indicator
  • beta_period (int, optional) — The period of the Beta indicator
  • resolution (Resolution, optional) — The resolution
  • risk_free_rate (float, optional) — The risk free rate
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Alpha indicator for the given parameters

Return type:

Alpha

A(target, reference, alphaPeriod=1, betaPeriod=252, resolution=None, riskFreeRate=None, selector=None)[source]

Adds a tag to the algorithm

Parameters:
  • target (Symbol) — The target symbol whose Alpha value we want
  • reference (Symbol) — The reference symbol to compare with the target symbol
  • alphaPeriod (Int32, optional) — The period of the Alpha indicator
  • betaPeriod (Int32, optional) — The period of the Beta indicator
  • resolution (Resolution, optional) — The resolution
  • riskFreeRate (decimal, optional) — The risk free rate
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Alpha indicator for the given parameters

Return type:

Alpha

abands(symbol, period, width=4.0, moving_average_type=0, resolution=None, selector=None)[source]

Creates a new Acceleration Bands indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Acceleration Bands we want.
  • period (int) — The period of the three moving average (middle, upper and lower band).
  • width (float, optional) — A coefficient specifying the distance between the middle band and upper or lower bands.
  • moving_average_type (MovingAverageType, optional) — Type of the moving average.
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar.
Return type:

AccelerationBands

ABANDS(symbol, period, width=4.0, movingAverageType=0, resolution=None, selector=None)[source]

Creates a new Acceleration Bands indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Acceleration Bands we want.
  • period (Int32) — The period of the three moving average (middle, upper and lower band).
  • width (decimal, optional) — A coefficient specifying the distance between the middle band and upper or lower bands.
  • movingAverageType (MovingAverageType, optional) — Type of the moving average.
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar.
Return type:

AccelerationBands

ad(symbol, resolution=None, selector=None)[source]

Creates a new AccumulationDistribution indicator.

Parameters:
  • symbol (Symbol) — The symbol whose AD we want
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — x.Value)
Returns:

The AccumulationDistribution indicator for the requested symbol over the specified period

Return type:

AccumulationDistribution

AD(symbol, resolution=None, selector=None)[source]

Creates a new AccumulationDistribution indicator.

Parameters:
  • symbol (Symbol) — The symbol whose AD we want
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — x.Value)
Returns:

The AccumulationDistribution indicator for the requested symbol over the specified period

Return type:

AccumulationDistribution

addiff(symbols, resolution=None, selector=None)[source]

Creates a new Advance/Decline Difference indicator

Parameters:
  • symbols (List[Symbol]) — The symbols whose AD Difference we want
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The AdvanceDecline Difference indicator for the requested symbol over the specified period

Return type:

AdvanceDeclineDifference

ADDIFF(symbols, resolution=None, selector=None)[source]

Creates a new Advance/Decline Difference indicator

Parameters:
  • symbols (List<Symbol>) — The symbols whose AD Difference we want
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The AdvanceDecline Difference indicator for the requested symbol over the specified period

Return type:

AdvanceDeclineDifference

adosc(symbol, fast_period, slow_period, resolution=None, selector=None)[source]

Creates a new AccumulationDistributionOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ADOSC we want
  • fast_period (int) — The fast moving average period
  • slow_period (int) — The slow moving average period
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — x.Value)
Returns:

The AccumulationDistributionOscillator indicator for the requested symbol over the specified period

Return type:

AccumulationDistributionOscillator

ADOSC(symbol, fastPeriod, slowPeriod, resolution=None, selector=None)[source]

Creates a new AccumulationDistributionOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ADOSC we want
  • fastPeriod (Int32) — The fast moving average period
  • slowPeriod (Int32) — The slow moving average period
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — x.Value)
Returns:

The AccumulationDistributionOscillator indicator for the requested symbol over the specified period

Return type:

AccumulationDistributionOscillator

adr(symbols, resolution=None, selector=None)[source]

Creates a new Advance/Decline Ratio indicator

Parameters:
  • symbols (List[Symbol]) — The symbols whose AD Ratio we want
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The AdvanceDecline Ratio indicator for the requested symbol over the specified period

Return type:

AdvanceDeclineRatio

ADR(symbols, resolution=None, selector=None)[source]

Creates a new Advance/Decline Ratio indicator

Parameters:
  • symbols (List<Symbol>) — The symbols whose AD Ratio we want
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The AdvanceDecline Ratio indicator for the requested symbol over the specified period

Return type:

AdvanceDeclineRatio

advr(symbols, resolution=None, selector=None)[source]

Creates a new Advance/Decline Volume Ratio indicator

Parameters:
  • symbols (List[Symbol]) — The symbol whose AD Volume Rate we want
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The AdvanceDecline Volume Ratio indicator for the requested symbol over the specified period

Return type:

AdvanceDeclineVolumeRatio

ADVR(symbols, resolution=None, selector=None)[source]

Creates a new Advance/Decline Volume Ratio indicator

Parameters:
  • symbols (List<Symbol>) — The symbol whose AD Volume Rate we want
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The AdvanceDecline Volume Ratio indicator for the requested symbol over the specified period

Return type:

AdvanceDeclineVolumeRatio

adx(symbol, period, resolution=None, selector=None)[source]

Creates a new Average Directional Index indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Average Directional Index we seek
  • period (int) — The resolution.
  • resolution (Resolution, optional) — The period over which to compute the Average Directional Index
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Average Directional Index indicator for the requested symbol.

Return type:

AverageDirectionalIndex

ADX(symbol, period, resolution=None, selector=None)[source]

Creates a new Average Directional Index indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Average Directional Index we seek
  • period (Int32) — The resolution.
  • resolution (Resolution, optional) — The period over which to compute the Average Directional Index
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Average Directional Index indicator for the requested symbol.

Return type:

AverageDirectionalIndex

adxr(symbol, period, resolution=None, selector=None)[source]

Creates a new AverageDirectionalMovementIndexRating indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ADXR we want
  • period (int) — The period over which to compute the ADXR
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, IBaseDataBar], optional) — x.Value)
Returns:

The AverageDirectionalMovementIndexRating indicator for the requested symbol over the specified period

Return type:

AverageDirectionalMovementIndexRating

ADXR(symbol, period, resolution=None, selector=None)[source]

Creates a new AverageDirectionalMovementIndexRating indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ADXR we want
  • period (Int32) — The period over which to compute the ADXR
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, IBaseDataBar>, optional) — x.Value)
Returns:

The AverageDirectionalMovementIndexRating indicator for the requested symbol over the specified period

Return type:

AverageDirectionalMovementIndexRating

alma(symbol, period, sigma=6, offset=0.85, resolution=None, selector=None)[source]

Creates a new ArnaudLegouxMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ALMA we want
  • period (int) — int - the number of periods to calculate the ALMA
  • sigma (int, optional) — int - this parameter is responsible for the shape of the curve coefficients.
  • offset (float, optional) — decimal - This parameter allows regulating the smoothness and high sensitivity of the Moving Average. The range for this parameter is [0, 1].
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The ArnaudLegouxMovingAverage indicator for the requested symbol over the specified period

Return type:

ArnaudLegouxMovingAverage

ALMA(symbol, period, sigma=6, offset=0.85, resolution=None, selector=None)[source]

Creates a new ArnaudLegouxMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ALMA we want
  • period (Int32) — int - the number of periods to calculate the ALMA
  • sigma (Int32, optional) — int - this parameter is responsible for the shape of the curve coefficients.
  • offset (decimal, optional) — decimal - This parameter allows regulating the smoothness and high sensitivity of the Moving Average. The range for this parameter is [0, 1].
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The ArnaudLegouxMovingAverage indicator for the requested symbol over the specified period

Return type:

ArnaudLegouxMovingAverage

ao(symbol, slow_period, fast_period, type, resolution=None, selector=None)[source]

Creates a new Awesome Oscillator from the specified periods.

Parameters:
  • symbol (Symbol) — The symbol whose Awesome Oscillator we seek
  • slow_period (int) — The resolution.
  • fast_period (int) — The period of the fast moving average associated with the AO
  • type (MovingAverageType) — The period of the slow moving average associated with the AO
  • resolution (Resolution, optional) — The type of moving average used when computing the fast and slow term. Defaults to simple moving average.
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Return type:

AwesomeOscillator

AO(symbol, slowPeriod, fastPeriod, type, resolution=None, selector=None)[source]

Creates a new Awesome Oscillator from the specified periods.

Parameters:
  • symbol (Symbol) — The symbol whose Awesome Oscillator we seek
  • slowPeriod (Int32) — The resolution.
  • fastPeriod (Int32) — The period of the fast moving average associated with the AO
  • type (MovingAverageType) — The period of the slow moving average associated with the AO
  • resolution (Resolution, optional) — The type of moving average used when computing the fast and slow term. Defaults to simple moving average.
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Return type:

AwesomeOscillator

apo(symbol, fast_period, slow_period, moving_average_type, resolution=None, selector=None)[source]

Creates a new AbsolutePriceOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose APO we want
  • fast_period (int) — The fast moving average period
  • slow_period (int) — The slow moving average period
  • moving_average_type (MovingAverageType) — The type of moving average to use
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The AbsolutePriceOscillator indicator for the requested symbol over the specified period

Return type:

AbsolutePriceOscillator

APO(symbol, fastPeriod, slowPeriod, movingAverageType, resolution=None, selector=None)[source]

Creates a new AbsolutePriceOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose APO we want
  • fastPeriod (Int32) — The fast moving average period
  • slowPeriod (Int32) — The slow moving average period
  • movingAverageType (MovingAverageType) — The type of moving average to use
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The AbsolutePriceOscillator indicator for the requested symbol over the specified period

Return type:

AbsolutePriceOscillator

aps(symbol, period=3, resolution=None, selector=None)[source]

Creates an AugenPriceSpike indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose APS we want
  • period (int, optional) — The period of the APS
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The AugenPriceSpike indicator for the given parameters

Return type:

AugenPriceSpike

APS(symbol, period=3, resolution=None, selector=None)[source]

Creates an AugenPriceSpike indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose APS we want
  • period (Int32, optional) — The period of the APS
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The AugenPriceSpike indicator for the given parameters

Return type:

AugenPriceSpike

arima(symbol, ar_order, diff_order, ma_order, period, resolution=None, selector=None)[source]

Creates a new ARIMA indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ARIMA indicator we want
  • ar_order (int) — AR order (p) -- defines the number of past values to consider in the AR component of the model.
  • diff_order (int) — Difference order (d) -- defines how many times to difference the model before fitting parameters.
  • ma_order (int) — MA order (q) -- defines the number of past values to consider in the MA component of the model.
  • period (int) — Size of the rolling series to fit onto
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The ARIMA indicator for the requested symbol over the specified period

Return type:

AutoRegressiveIntegratedMovingAverage

ARIMA(symbol, arOrder, diffOrder, maOrder, period, resolution=None, selector=None)[source]

Creates a new ARIMA indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ARIMA indicator we want
  • arOrder (Int32) — AR order (p) -- defines the number of past values to consider in the AR component of the model.
  • diffOrder (Int32) — Difference order (d) -- defines how many times to difference the model before fitting parameters.
  • maOrder (Int32) — MA order (q) -- defines the number of past values to consider in the MA component of the model.
  • period (Int32) — Size of the rolling series to fit onto
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The ARIMA indicator for the requested symbol over the specified period

Return type:

AutoRegressiveIntegratedMovingAverage

aroon(symbol, up_period, down_period, resolution=None, selector=None)[source]

Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

Parameters:
  • symbol (Symbol) — The symbol whose Aroon we seek
  • up_period (int) — The look back period for computing number of periods since maximum
  • down_period (int) — The look back period for computing number of periods since minimum
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

An AroonOscillator configured with the specified periods

Return type:

AroonOscillator

aroon(symbol, period, resolution=None, selector=None)[source]

Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

Parameters:
  • symbol (Symbol) — The symbol whose Aroon we seek
  • period (int) — The look back period for computing number of periods since maximum and minimum
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

An AroonOscillator configured with the specified periods

Return type:

AroonOscillator

AROON(symbol, upPeriod, downPeriod, resolution=None, selector=None)[source]

Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

Parameters:
  • symbol (Symbol) — The symbol whose Aroon we seek
  • upPeriod (Int32) — The look back period for computing number of periods since maximum
  • downPeriod (Int32) — The look back period for computing number of periods since minimum
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

An AroonOscillator configured with the specified periods

Return type:

AroonOscillator

AROON(symbol, period, resolution=None, selector=None)[source]

Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)

Parameters:
  • symbol (Symbol) — The symbol whose Aroon we seek
  • period (Int32) — The look back period for computing number of periods since maximum and minimum
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

An AroonOscillator configured with the specified periods

Return type:

AroonOscillator

asi(symbol, limit_move, resolution=4, selector=None)[source]

Creates a Wilder Accumulative Swing Index (ASI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose ASI we want
  • limit_move (float) — The maximum daily change in price for the ASI
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The WilderAccumulativeSwingIndex for the given parameters

Return type:

WilderAccumulativeSwingIndex

ASI(symbol, limitMove, resolution=4, selector=None)[source]

Creates a Wilder Accumulative Swing Index (ASI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose ASI we want
  • limitMove (decimal) — The maximum daily change in price for the ASI
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The WilderAccumulativeSwingIndex for the given parameters

Return type:

WilderAccumulativeSwingIndex

atr(symbol, period, type=0, resolution=None, selector=None)[source]

Creates a new AverageTrueRange indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose ATR we want
  • period (int) — The smoothing period used to smooth the computed TrueRange values
  • type (MovingAverageType, optional) — The type of smoothing to use
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

A new AverageTrueRange indicator with the specified smoothing type and period

Return type:

AverageTrueRange

ATR(symbol, period, type=0, resolution=None, selector=None)[source]

Creates a new AverageTrueRange indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose ATR we want
  • period (Int32) — The smoothing period used to smooth the computed TrueRange values
  • type (MovingAverageType, optional) — The type of smoothing to use
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

A new AverageTrueRange indicator with the specified smoothing type and period

Return type:

AverageTrueRange

b(target, reference, period, resolution=None, selector=None)[source]

Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

Parameters:
  • target (Symbol) — The target symbol whose Beta value we want
  • reference (Symbol) — The reference symbol to compare with the target symbol
  • period (int) — The period of the Beta indicator
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Beta indicator for the given parameters

Return type:

Beta

B(target, reference, period, resolution=None, selector=None)[source]

Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

Parameters:
  • target (Symbol) — The target symbol whose Beta value we want
  • reference (Symbol) — The reference symbol to compare with the target symbol
  • period (Int32) — The period of the Beta indicator
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Beta indicator for the given parameters

Return type:

Beta

bb(symbol, period, k, moving_average_type=0, resolution=None, selector=None)[source]

Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

Parameters:
  • symbol (Symbol) — The symbol whose BollingerBands we seek
  • period (int) — The period of the standard deviation and moving average (middle band)
  • k (float) — The number of standard deviations specifying the distance between the middle band and upper or lower bands
  • moving_average_type (MovingAverageType, optional) — The type of moving average to be used
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

A BollingerBands configured with the specified period

Return type:

BollingerBands

BB(symbol, period, k, movingAverageType=0, resolution=None, selector=None)[source]

Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation

Parameters:
  • symbol (Symbol) — The symbol whose BollingerBands we seek
  • period (Int32) — The period of the standard deviation and moving average (middle band)
  • k (decimal) — The number of standard deviations specifying the distance between the middle band and upper or lower bands
  • movingAverageType (MovingAverageType, optional) — The type of moving average to be used
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

A BollingerBands configured with the specified period

Return type:

BollingerBands

bop(symbol, resolution=None, selector=None)[source]

Creates a new Balance Of Power indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Balance Of Power we seek
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Balance Of Power indicator for the requested symbol.

Return type:

BalanceOfPower

BOP(symbol, resolution=None, selector=None)[source]

Creates a new Balance Of Power indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Balance Of Power we seek
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Balance Of Power indicator for the requested symbol.

Return type:

BalanceOfPower

c(target, reference, period, correlation_type=0, resolution=None, selector=None)[source]

Converts a composite FIGI identifier into a String)

Parameters:
  • target (Symbol) — The target symbol of this indicator
  • reference (Symbol) — The reference symbol of this indicator
  • period (int) — The period of this indicator
  • correlation_type (CorrelationType, optional) — Correlation type
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Correlation indicator for the given parameters

Return type:

Correlation

C(target, reference, period, correlationType=0, resolution=None, selector=None)[source]

Converts a composite FIGI identifier into a String)

Parameters:
  • target (Symbol) — The target symbol of this indicator
  • reference (Symbol) — The reference symbol of this indicator
  • period (Int32) — The period of this indicator
  • correlationType (CorrelationType, optional) — Correlation type
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Correlation indicator for the given parameters

Return type:

Correlation

cc(symbol, short_roc_period=11, long_roc_period=14, lwma_period=10, resolution=None, selector=None)[source]

Initializes a new instance of the CoppockCurve indicator

Parameters:
  • symbol (Symbol) — The symbol whose Coppock Curve we want
  • short_roc_period (int, optional) — The period for the short ROC
  • long_roc_period (int, optional) — The period for the long ROC
  • lwma_period (int, optional) — The period for the LWMA
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Coppock Curve indicator for the requested symbol over the specified period

Return type:

CoppockCurve

CC(symbol, shortRocPeriod=11, longRocPeriod=14, lwmaPeriod=10, resolution=None, selector=None)[source]

Initializes a new instance of the CoppockCurve indicator

Parameters:
  • symbol (Symbol) — The symbol whose Coppock Curve we want
  • shortRocPeriod (Int32, optional) — The period for the short ROC
  • longRocPeriod (Int32, optional) — The period for the long ROC
  • lwmaPeriod (Int32, optional) — The period for the LWMA
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Coppock Curve indicator for the requested symbol over the specified period

Return type:

CoppockCurve

cci(symbol, period, moving_average_type=0, resolution=None, selector=None)[source]

Creates a new CommodityChannelIndex indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose CCI we want
  • period (int) — The period over which to compute the CCI
  • moving_average_type (MovingAverageType, optional) — The type of moving average to use in computing the typical price average
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The CommodityChannelIndex indicator for the requested symbol over the specified period

Return type:

CommodityChannelIndex

CCI(symbol, period, movingAverageType=0, resolution=None, selector=None)[source]

Creates a new CommodityChannelIndex indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose CCI we want
  • period (Int32) — The period over which to compute the CCI
  • movingAverageType (MovingAverageType, optional) — The type of moving average to use in computing the typical price average
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The CommodityChannelIndex indicator for the requested symbol over the specified period

Return type:

CommodityChannelIndex

cmf(symbol, period, resolution=None, selector=None)[source]

Creates a new ChaikinMoneyFlow indicator.

Parameters:
  • symbol (Symbol) — The symbol whose CMF we want
  • period (int) — The period over which to compute the CMF
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The ChaikinMoneyFlow indicator for the requested symbol over the specified period

Return type:

ChaikinMoneyFlow

CMF(symbol, period, resolution=None, selector=None)[source]

Creates a new ChaikinMoneyFlow indicator.

Parameters:
  • symbol (Symbol) — The symbol whose CMF we want
  • period (Int32) — The period over which to compute the CMF
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The ChaikinMoneyFlow indicator for the requested symbol over the specified period

Return type:

ChaikinMoneyFlow

cmo(symbol, period, resolution=None, selector=None)[source]

Creates a new ChandeMomentumOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose CMO we want
  • period (int) — The period over which to compute the CMO
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The ChandeMomentumOscillator indicator for the requested symbol over the specified period

Return type:

ChandeMomentumOscillator

CMO(symbol, period, resolution=None, selector=None)[source]

Creates a new ChandeMomentumOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose CMO we want
  • period (Int32) — The period over which to compute the CMO
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The ChandeMomentumOscillator indicator for the requested symbol over the specified period

Return type:

ChandeMomentumOscillator

create_indicator_name(symbol, type, resolution)[source]

Creates a new name for an indicator created with the convenience functions (SMA, EMA, ect...)

Parameters:
  • symbol (Symbol) — The symbol this indicator is registered to
  • type (Formattablestr | str) — The indicator type, for example, 'SMA(5)'
  • resolution (Resolution) — The resolution requested
Returns:

A unique for the given parameters

Return type:

str

CreateIndicatorName(symbol, type, resolution)[source]

Creates a new name for an indicator created with the convenience functions (SMA, EMA, ect...)

Parameters:
  • symbol (Symbol) — The symbol this indicator is registered to
  • type (String | FormattableString) — The indicator type, for example, 'SMA(5)'
  • resolution (Resolution) — The resolution requested
Returns:

A unique for the given parameters

Return type:

String

d(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None)[source]

Send a debug message to the web console:

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirror_option (Symbol, optional) — The mirror option for parity calculation
  • risk_free_rate (float, optional) — The risk free rate
  • dividend_yield (float, optional) — The dividend yield
  • option_model (OptionPricingModelType, optional) — The option pricing model used to estimate Delta
  • iv_model (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Delta indicator for the specified symbol

Return type:

Delta

D(symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None)[source]

Send a debug message to the web console:

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirrorOption (Symbol, optional) — The mirror option for parity calculation
  • riskFreeRate (decimal, optional) — The risk free rate
  • dividendYield (decimal, optional) — The dividend yield
  • optionModel (OptionPricingModelType, optional) — The option pricing model used to estimate Delta
  • ivModel (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Delta indicator for the specified symbol

Return type:

Delta

dch(symbol, upper_period, lower_period, resolution=None, selector=None)[source]

Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Donchian Channel we seek.
  • upper_period (int) — The period over which to compute the upper Donchian Channel.
  • lower_period (int) — The period over which to compute the lower Donchian Channel.
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Donchian Channel indicator for the requested symbol.

Return type:

DonchianChannel

dch(symbol, period, resolution=None, selector=None)[source]

Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Donchian Channel we seek.
  • period (int) — The period over which to compute the Donchian Channel.
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Donchian Channel indicator for the requested symbol.

Return type:

DonchianChannel

DCH(symbol, upperPeriod, lowerPeriod, resolution=None, selector=None)[source]

Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Donchian Channel we seek.
  • upperPeriod (Int32) — The period over which to compute the upper Donchian Channel.
  • lowerPeriod (Int32) — The period over which to compute the lower Donchian Channel.
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Donchian Channel indicator for the requested symbol.

Return type:

DonchianChannel

DCH(symbol, period, resolution=None, selector=None)[source]

Creates a new Donchian Channel indicator which will compute the Upper Band and Lower Band. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Donchian Channel we seek.
  • period (Int32) — The period over which to compute the Donchian Channel.
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Donchian Channel indicator for the requested symbol.

Return type:

DonchianChannel

dem(symbol, period, type, resolution=None, selector=None)[source]

Creates a new DeMarker Indicator (DEM), an oscillator-type indicator measuring changes in terms of an asset's High and Low tradebar values.

Parameters:
  • symbol (Symbol) — The symbol whose DEM we seek.
  • period (int) — The period of the moving average implemented
  • type (MovingAverageType) — Specifies the type of moving average to be used
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The DeMarker indicator for the requested symbol.

Return type:

DeMarkerIndicator

DEM(symbol, period, type, resolution=None, selector=None)[source]

Creates a new DeMarker Indicator (DEM), an oscillator-type indicator measuring changes in terms of an asset's High and Low tradebar values.

Parameters:
  • symbol (Symbol) — The symbol whose DEM we seek.
  • period (Int32) — The period of the moving average implemented
  • type (MovingAverageType) — Specifies the type of moving average to be used
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The DeMarker indicator for the requested symbol.

Return type:

DeMarkerIndicator

dema(symbol, period, resolution=None, selector=None)[source]

Creates a new DoubleExponentialMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose DEMA we want
  • period (int) — The period over which to compute the DEMA
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The DoubleExponentialMovingAverage indicator for the requested symbol over the specified period

Return type:

floatExponentialMovingAverage

DEMA(symbol, period, resolution=None, selector=None)[source]

Creates a new DoubleExponentialMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose DEMA we want
  • period (Int32) — The period over which to compute the DEMA
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The DoubleExponentialMovingAverage indicator for the requested symbol over the specified period

Return type:

DoubleExponentialMovingAverage

do(symbol, rsi_period, smoothing_rsi_period, double_smoothing_rsi_period, signal_line_period, resolution=None, selector=None)[source]

Creates a new DerivativeOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose DO we want
  • rsi_period (int) — The period over which to compute the RSI
  • smoothing_rsi_period (int) — The period over which to compute the smoothing RSI
  • double_smoothing_rsi_period (int) — The period over which to compute the double smoothing RSI
  • signal_line_period (int) — The period over which to compute the signal line
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value)
Returns:

The DerivativeOscillator indicator for the requested symbol over the specified period

Return type:

DerivativeOscillator

DO(symbol, rsiPeriod, smoothingRsiPeriod, doubleSmoothingRsiPeriod, signalLinePeriod, resolution=None, selector=None)[source]

Creates a new DerivativeOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose DO we want
  • rsiPeriod (Int32) — The period over which to compute the RSI
  • smoothingRsiPeriod (Int32) — The period over which to compute the smoothing RSI
  • doubleSmoothingRsiPeriod (Int32) — The period over which to compute the double smoothing RSI
  • signalLinePeriod (Int32) — The period over which to compute the signal line
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value)
Returns:

The DerivativeOscillator indicator for the requested symbol over the specified period

Return type:

DerivativeOscillator

dpo(symbol, period, resolution=None, selector=None)[source]

Creates a new DetrendedPriceOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose DPO we want
  • period (int) — The period over which to compute the DPO
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

A new registered DetrendedPriceOscillator indicator for the requested symbol over the specified period

Return type:

DetrendedPriceOscillator

DPO(symbol, period, resolution=None, selector=None)[source]

Creates a new DetrendedPriceOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose DPO we want
  • period (Int32) — The period over which to compute the DPO
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

A new registered DetrendedPriceOscillator indicator for the requested symbol over the specified period

Return type:

DetrendedPriceOscillator

ema(symbol, period, smoothing_factor, resolution=None, selector=None)[source]

Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose EMA we want
  • period (int) — The period of the EMA
  • smoothing_factor (float) — The percentage of data from the previous value to be carried into the next value
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The ExponentialMovingAverage for the given parameters

Return type:

ExponentialMovingAverage

EMA(symbol, period, smoothingFactor, resolution=None, selector=None)[source]

Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose EMA we want
  • period (Int32) — The period of the EMA
  • smoothingFactor (decimal) — The percentage of data from the previous value to be carried into the next value
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The ExponentialMovingAverage for the given parameters

Return type:

ExponentialMovingAverage

emv(symbol, period=1, scale=10000, resolution=None, selector=None)[source]

Creates an EaseOfMovementValue indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose EMV we want
  • period (int, optional) — The period of the EMV
  • scale (int, optional) — The length of the outputed value
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The EaseOfMovementValue indicator for the given parameters

Return type:

EaseOfMovementValue

EMV(symbol, period=1, scale=10000, resolution=None, selector=None)[source]

Creates an EaseOfMovementValue indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose EMV we want
  • period (Int32, optional) — The period of the EMV
  • scale (Int32, optional) — The length of the outputed value
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The EaseOfMovementValue indicator for the given parameters

Return type:

EaseOfMovementValue

filtered_identity(symbol, resolution, selector=None, filter=None, field_name=None)[source]

Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

Parameters:
  • symbol (Symbol) — The symbol whose values we want as an indicator
  • resolution (timedelta | Resolution) — The desired resolution of the data
  • selector (PyObject | Callable[IBaseData, IBaseDataBar], optional) — x.Value)
  • filter (Callable[IBaseData, bool] | PyObject, optional) — true) which means no filter
  • field_name (str, optional) — The name of the field being selected
Returns:

A new FilteredIdentity indicator for the specified symbol and selector

Return type:

FilteredIdentity

FilteredIdentity(symbol, resolution, selector=None, filter=None, fieldName=None)[source]

Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

Parameters:
  • symbol (Symbol) — The symbol whose values we want as an indicator
  • resolution (TimeSpan | Resolution) — The desired resolution of the data
  • selector (Func[IBaseData, IBaseDataBar] | PyObject, optional) — x.Value)
  • filter (Func[IBaseData, Boolean] | PyObject, optional) — true) which means no filter
  • fieldName (string, optional) — The name of the field being selected
Returns:

A new FilteredIdentity indicator for the specified symbol and selector

Return type:

FilteredIdentity

fish(symbol, period, resolution=None, selector=None)[source]

Creates an FisherTransform indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose FisherTransform we want
  • period (int) — The period of the FisherTransform
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The FisherTransform for the given parameters

Return type:

FisherTransform

FISH(symbol, period, resolution=None, selector=None)[source]

Creates an FisherTransform indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose FisherTransform we want
  • period (Int32) — The period of the FisherTransform
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The FisherTransform for the given parameters

Return type:

FisherTransform

frama(symbol, period, long_period=198, resolution=None, selector=None)[source]

Creates an FractalAdaptiveMovingAverage (FRAMA) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose FRAMA we want
  • period (int) — The period of the FRAMA
  • long_period (int, optional) — The long period of the FRAMA
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The FRAMA for the given parameters

Return type:

FractalAdaptiveMovingAverage

FRAMA(symbol, period, longPeriod=198, resolution=None, selector=None)[source]

Creates an FractalAdaptiveMovingAverage (FRAMA) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose FRAMA we want
  • period (Int32) — The period of the FRAMA
  • longPeriod (Int32, optional) — The long period of the FRAMA
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The FRAMA for the given parameters

Return type:

FractalAdaptiveMovingAverage

g(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirror_option (Symbol, optional) — The mirror option for parity calculation
  • risk_free_rate (float, optional) — The risk free rate
  • dividend_yield (float, optional) — The dividend yield
  • option_model (OptionPricingModelType, optional) — The option pricing model used to estimate Gamma
  • iv_model (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Gamma indicator for the specified symbol

Return type:

Gamma

G(symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirrorOption (Symbol, optional) — The mirror option for parity calculation
  • riskFreeRate (decimal, optional) — The risk free rate
  • dividendYield (decimal, optional) — The dividend yield
  • optionModel (OptionPricingModelType, optional) — The option pricing model used to estimate Gamma
  • ivModel (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Gamma indicator for the specified symbol

Return type:

Gamma

heikin_ashi(symbol, resolution=None, selector=None)[source]

Creates a new Heikin-Ashi indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Heikin-Ashi we want
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Heikin-Ashi indicator for the requested symbol over the specified period

Return type:

HeikinAshi

HeikinAshi(symbol, resolution=None, selector=None)[source]

Creates a new Heikin-Ashi indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Heikin-Ashi we want
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Heikin-Ashi indicator for the requested symbol over the specified period

Return type:

HeikinAshi

hma(symbol, period, resolution=None, selector=None)[source]

Creates a new HullMovingAverage indicator. The Hull moving average is a series of nested weighted moving averages, is fast and smooth.

Parameters:
  • symbol (Symbol) — The symbol whose Hull moving average we want
  • period (int) — The period over which to compute the Hull moving average
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Return type:

HullMovingAverage

HMA(symbol, period, resolution=None, selector=None)[source]

Creates a new HullMovingAverage indicator. The Hull moving average is a series of nested weighted moving averages, is fast and smooth.

Parameters:
  • symbol (Symbol) — The symbol whose Hull moving average we want
  • period (Int32) — The period over which to compute the Hull moving average
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Return type:

HullMovingAverage

ht(symbol, length, in_phase_multiplication_factor, quadrature_multiplication_factor, resolution=None, selector=None)[source]

Creates a new Hilbert Transform indicator

Parameters:
  • symbol (Symbol) — The symbol whose Hilbert transform we want
  • length (int) — The length of the FIR filter used in the calculation of the Hilbert Transform. This parameter determines the number of filter coefficients in the FIR filter.
  • in_phase_multiplication_factor (float) — The multiplication factor used in the calculation of the in-phase component of the Hilbert Transform. This parameter adjusts the sensitivity and responsiveness of the transform to changes in the input signal.
  • quadrature_multiplication_factor (float) — The multiplication factor used in the calculation of the quadrature component of the Hilbert Transform. This parameter also adjusts the sensitivity and responsiveness of the transform to changes in the input signal.
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Return type:

HilbertTransform

HT(symbol, length, inPhaseMultiplicationFactor, quadratureMultiplicationFactor, resolution=None, selector=None)[source]

Creates a new Hilbert Transform indicator

Parameters:
  • symbol (Symbol) — The symbol whose Hilbert transform we want
  • length (Int32) — The length of the FIR filter used in the calculation of the Hilbert Transform. This parameter determines the number of filter coefficients in the FIR filter.
  • inPhaseMultiplicationFactor (decimal) — The multiplication factor used in the calculation of the in-phase component of the Hilbert Transform. This parameter adjusts the sensitivity and responsiveness of the transform to changes in the input signal.
  • quadratureMultiplicationFactor (decimal) — The multiplication factor used in the calculation of the quadrature component of the Hilbert Transform. This parameter also adjusts the sensitivity and responsiveness of the transform to changes in the input signal.
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Return type:

HilbertTransform

ichimoku(symbol, tenkan_period, kijun_period, senkou_a_period, senkou_b_period, senkou_a_delay_period, senkou_b_delay_period, resolution=None, selector=None)[source]

Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose ICHIMOKU we want
  • tenkan_period (int) — The period to calculate the Tenkan-sen period
  • kijun_period (int) — The period to calculate the Kijun-sen period
  • senkou_a_period (int) — The period to calculate the Tenkan-sen period
  • senkou_b_period (int) — The period to calculate the Tenkan-sen period
  • senkou_a_delay_period (int) — The period to calculate the Tenkan-sen period
  • senkou_b_delay_period (int) — The period to calculate the Tenkan-sen period
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

A new IchimokuKinkoHyo indicator with the specified periods and delays

Return type:

IchimokuKinkoHyo

ICHIMOKU(symbol, tenkanPeriod, kijunPeriod, senkouAPeriod, senkouBPeriod, senkouADelayPeriod, senkouBDelayPeriod, resolution=None, selector=None)[source]

Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose ICHIMOKU we want
  • tenkanPeriod (Int32) — The period to calculate the Tenkan-sen period
  • kijunPeriod (Int32) — The period to calculate the Kijun-sen period
  • senkouAPeriod (Int32) — The period to calculate the Tenkan-sen period
  • senkouBPeriod (Int32) — The period to calculate the Tenkan-sen period
  • senkouADelayPeriod (Int32) — The period to calculate the Tenkan-sen period
  • senkouBDelayPeriod (Int32) — The period to calculate the Tenkan-sen period
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

A new IchimokuKinkoHyo indicator with the specified periods and delays

Return type:

IchimokuKinkoHyo

identity(symbol, resolution, selector=None, field_name=None)[source]

Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

Parameters:
  • symbol (Symbol) — The symbol whose values we want as an indicator
  • resolution (timedelta | Resolution) — The desired resolution of the data
  • selector (Callable[IBaseData, float], optional) — x.Value)
  • field_name (str, optional) — The name of the field being selected
Returns:

A new Identity indicator for the specified symbol and selector

Return type:

Identity

Identity(symbol, resolution, selector=None, fieldName=None)[source]

Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

Parameters:
  • symbol (Symbol) — The symbol whose values we want as an indicator
  • resolution (TimeSpan | Resolution) — The desired resolution of the data
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
  • fieldName (string, optional) — The name of the field being selected
Returns:

A new Identity indicator for the specified symbol and selector

Return type:

Identity

iv(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, period=252, resolution=None)[source]

Creates a new ImpliedVolatility indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirror_option (Symbol, optional) — The mirror option contract used for parity type calculation
  • risk_free_rate (float, optional) — The risk free rate
  • dividend_yield (float, optional) — The dividend yield
  • option_model (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • period (int, optional) — The lookback period of historical volatility
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new ImpliedVolatility indicator for the specified symbol

Return type:

ImpliedVolatility

IV(symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, period=252, resolution=None)[source]

Creates a new ImpliedVolatility indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirrorOption (Symbol, optional) — The mirror option contract used for parity type calculation
  • riskFreeRate (decimal, optional) — The risk free rate
  • dividendYield (decimal, optional) — The dividend yield
  • optionModel (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • period (Int32, optional) — The lookback period of historical volatility
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new ImpliedVolatility indicator for the specified symbol

Return type:

ImpliedVolatility

kama(symbol, period, fast_ema_period, slow_ema_period, resolution=None, selector=None)[source]

Creates a new KaufmanAdaptiveMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose KAMA we want
  • period (int) — The period of the Efficiency Ratio (ER)
  • fast_ema_period (int) — The period of the fast EMA used to calculate the Smoothing Constant (SC)
  • slow_ema_period (int) — The period of the slow EMA used to calculate the Smoothing Constant (SC)
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The KaufmanAdaptiveMovingAverage indicator for the requested symbol over the specified period

Return type:

KaufmanAdaptiveMovingAverage

KAMA(symbol, period, fastEmaPeriod, slowEmaPeriod, resolution=None, selector=None)[source]

Creates a new KaufmanAdaptiveMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose KAMA we want
  • period (Int32) — The period of the Efficiency Ratio (ER)
  • fastEmaPeriod (Int32) — The period of the fast EMA used to calculate the Smoothing Constant (SC)
  • slowEmaPeriod (Int32) — The period of the slow EMA used to calculate the Smoothing Constant (SC)
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The KaufmanAdaptiveMovingAverage indicator for the requested symbol over the specified period

Return type:

KaufmanAdaptiveMovingAverage

kch(symbol, period, k, moving_average_type=0, resolution=None, selector=None)[source]

Creates a new Keltner Channels indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Keltner Channel we seek
  • period (int) — The period over which to compute the Keltner Channels
  • k (float) — from the middle band of the Keltner Channels
  • moving_average_type (MovingAverageType, optional) — Specifies the type of moving average to be used as the middle line of the Keltner Channel
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Keltner Channel indicator for the requested symbol.

Return type:

KeltnerChannels

KCH(symbol, period, k, movingAverageType=0, resolution=None, selector=None)[source]

Creates a new Keltner Channels indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Keltner Channel we seek
  • period (Int32) — The period over which to compute the Keltner Channels
  • k (decimal) — from the middle band of the Keltner Channels
  • movingAverageType (MovingAverageType, optional) — Specifies the type of moving average to be used as the middle line of the Keltner Channel
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Keltner Channel indicator for the requested symbol.

Return type:

KeltnerChannels

ker(symbol, period=2, resolution=None, selector=None)[source]

Creates an KaufmanEfficiencyRatio indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose EF we want
  • period (int, optional) — The period of the EF
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The KaufmanEfficiencyRatio indicator for the given parameters

Return type:

KaufmanEfficiencyRatio

KER(symbol, period=2, resolution=None, selector=None)[source]

Creates an KaufmanEfficiencyRatio indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose EF we want
  • period (Int32, optional) — The period of the EF
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The KaufmanEfficiencyRatio indicator for the given parameters

Return type:

KaufmanEfficiencyRatio

logr(symbol, period, resolution=None, selector=None)[source]

Creates a new LogReturn indicator.

Parameters:
  • symbol (Symbol) — The symbol whose log return we seek
  • period (int) — The period of the log return.
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, float], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar.
Returns:

log return indicator for the requested symbol.

Return type:

LogReturn

LOGR(symbol, period, resolution=None, selector=None)[source]

Creates a new LogReturn indicator.

Parameters:
  • symbol (Symbol) — The symbol whose log return we seek
  • period (Int32) — The period of the log return.
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, Decimal>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar.
Returns:

log return indicator for the requested symbol.

Return type:

LogReturn

lsma(symbol, period, resolution=None, selector=None)[source]

Creates and registers a new Least Squares Moving Average instance.

Parameters:
  • symbol (Symbol) — The symbol whose LSMA we seek.
  • period (int) — The LSMA period. Normally 14.
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, float], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar.
Returns:

A LeastSquaredMovingAverage configured with the specified period

Return type:

LeastSquaresMovingAverage

LSMA(symbol, period, resolution=None, selector=None)[source]

Creates and registers a new Least Squares Moving Average instance.

Parameters:
  • symbol (Symbol) — The symbol whose LSMA we seek.
  • period (Int32) — The LSMA period. Normally 14.
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, Decimal>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar.
Returns:

A LeastSquaredMovingAverage configured with the specified period

Return type:

LeastSquaresMovingAverage

lwma(symbol, period, resolution=None, selector=None)[source]

Creates a new LinearWeightedMovingAverage indicator. This indicator will linearly distribute the weights across the periods.

Parameters:
  • symbol (Symbol) — The symbol whose LWMA we want
  • period (int) — The period over which to compute the LWMA
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Return type:

LinearWeightedMovingAverage

LWMA(symbol, period, resolution=None, selector=None)[source]

Creates a new LinearWeightedMovingAverage indicator. This indicator will linearly distribute the weights across the periods.

Parameters:
  • symbol (Symbol) — The symbol whose LWMA we want
  • period (Int32) — The period over which to compute the LWMA
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Return type:

LinearWeightedMovingAverage

macd(symbol, fast_period, slow_period, signal_period, type=1, resolution=None, selector=None)[source]

Creates a MACD indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose MACD we want
  • fast_period (int) — The period for the fast moving average
  • slow_period (int) — The period for the slow moving average
  • signal_period (int) — The period for the signal moving average
  • type (MovingAverageType, optional) — The type of moving average to use for the MACD
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The moving average convergence divergence between the fast and slow averages

Return type:

MovingAverageConvergenceDivergence

MACD(symbol, fastPeriod, slowPeriod, signalPeriod, type=1, resolution=None, selector=None)[source]

Creates a MACD indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose MACD we want
  • fastPeriod (Int32) — The period for the fast moving average
  • slowPeriod (Int32) — The period for the slow moving average
  • signalPeriod (Int32) — The period for the signal moving average
  • type (MovingAverageType, optional) — The type of moving average to use for the MACD
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The moving average convergence divergence between the fast and slow averages

Return type:

MovingAverageConvergenceDivergence

mad(symbol, period, resolution=None, selector=None)[source]

Creates a new MeanAbsoluteDeviation indicator.

Parameters:
  • symbol (Symbol) — The symbol whose MeanAbsoluteDeviation we want
  • period (int) — The period over which to compute the MeanAbsoluteDeviation
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The MeanAbsoluteDeviation indicator for the requested symbol over the specified period

Return type:

MeanAbsoluteDeviation

MAD(symbol, period, resolution=None, selector=None)[source]

Creates a new MeanAbsoluteDeviation indicator.

Parameters:
  • symbol (Symbol) — The symbol whose MeanAbsoluteDeviation we want
  • period (Int32) — The period over which to compute the MeanAbsoluteDeviation
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The MeanAbsoluteDeviation indicator for the requested symbol over the specified period

Return type:

MeanAbsoluteDeviation

mass(symbol, ema_period=9, sum_period=25, resolution=None, selector=None)[source]

Creates a new Mass Index indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Mass Index we want.
  • ema_period (int, optional) — The period used by both EMA.
  • sum_period (int, optional) — The sum period.
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Mass Index indicator for the requested symbol over the specified period

Return type:

MassIndex

MASS(symbol, emaPeriod=9, sumPeriod=25, resolution=None, selector=None)[source]

Creates a new Mass Index indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Mass Index we want.
  • emaPeriod (Int32, optional) — The period used by both EMA.
  • sumPeriod (Int32, optional) — The sum period.
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Mass Index indicator for the requested symbol over the specified period

Return type:

MassIndex

max(symbol, period, resolution=None, selector=None)[source]

Creates a new Maximum indicator to compute the maximum value

Parameters:
  • symbol (Symbol) — The symbol whose max we want
  • period (int) — The look back period over which to compute the max value
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

A Maximum indicator that compute the max value and the periods since the max value

Return type:

Maximum

MAX(symbol, period, resolution=None, selector=None)[source]

Creates a new Maximum indicator to compute the maximum value

Parameters:
  • symbol (Symbol) — The symbol whose max we want
  • period (Int32) — The look back period over which to compute the max value
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

A Maximum indicator that compute the max value and the periods since the max value

Return type:

Maximum

mfi(symbol, period, resolution=None, selector=None)[source]

Creates a new MoneyFlowIndex indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose MFI we want
  • period (int) — The period over which to compute the MFI
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The MoneyFlowIndex indicator for the requested symbol over the specified period

Return type:

MoneyFlowIndex

MFI(symbol, period, resolution=None, selector=None)[source]

Creates a new MoneyFlowIndex indicator. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose MFI we want
  • period (Int32) — The period over which to compute the MFI
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The MoneyFlowIndex indicator for the requested symbol over the specified period

Return type:

MoneyFlowIndex

midpoint(symbol, period, resolution=None, selector=None)[source]

Creates a new MidPoint indicator.

Parameters:
  • symbol (Symbol) — The symbol whose MIDPOINT we want
  • period (int) — The period over which to compute the MIDPOINT
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The MidPoint indicator for the requested symbol over the specified period

Return type:

MidPoint

MIDPOINT(symbol, period, resolution=None, selector=None)[source]

Creates a new MidPoint indicator.

Parameters:
  • symbol (Symbol) — The symbol whose MIDPOINT we want
  • period (Int32) — The period over which to compute the MIDPOINT
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The MidPoint indicator for the requested symbol over the specified period

Return type:

MidPoint

midprice(symbol, period, resolution=None, selector=None)[source]

Creates a new MidPrice indicator.

Parameters:
  • symbol (Symbol) — The symbol whose MIDPRICE we want
  • period (int) — The period over which to compute the MIDPRICE
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The MidPrice indicator for the requested symbol over the specified period

Return type:

MidPrice

MIDPRICE(symbol, period, resolution=None, selector=None)[source]

Creates a new MidPrice indicator.

Parameters:
  • symbol (Symbol) — The symbol whose MIDPRICE we want
  • period (Int32) — The period over which to compute the MIDPRICE
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The MidPrice indicator for the requested symbol over the specified period

Return type:

MidPrice

min(symbol, period, resolution=None, selector=None)[source]

Creates a new Minimum indicator to compute the minimum value

Parameters:
  • symbol (Symbol) — The symbol whose min we want
  • period (int) — The look back period over which to compute the min value
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

A Minimum indicator that compute the in value and the periods since the min value

Return type:

Minimum

MIN(symbol, period, resolution=None, selector=None)[source]

Creates a new Minimum indicator to compute the minimum value

Parameters:
  • symbol (Symbol) — The symbol whose min we want
  • period (Int32) — The look back period over which to compute the min value
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

A Minimum indicator that compute the in value and the periods since the min value

Return type:

Minimum

mom(symbol, period, resolution=None, selector=None)[source]

Creates a new Momentum indicator. This will compute the absolute n-period change in the security. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose momentum we want
  • period (int) — The period over which to compute the momentum
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The momentum indicator for the requested symbol over the specified period

Return type:

Momentum

MOM(symbol, period, resolution=None, selector=None)[source]

Creates a new Momentum indicator. This will compute the absolute n-period change in the security. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose momentum we want
  • period (Int32) — The period over which to compute the momentum
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The momentum indicator for the requested symbol over the specified period

Return type:

Momentum

momersion(symbol, min_period, full_period, resolution=None, selector=None)[source]

Creates a new Momersion indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Momersion we want
  • min_period (int) — The minimum period over which to compute the Momersion. Must be greater than 3. If null, only full period will be used in computations.
  • full_period (int) — The full period over which to compute the Momersion
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The Momersion indicator for the requested symbol over the specified period

Return type:

MomersionIndicator

MOMERSION(symbol, minPeriod, fullPeriod, resolution=None, selector=None)[source]

Creates a new Momersion indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Momersion we want
  • minPeriod (Int32) — The minimum period over which to compute the Momersion. Must be greater than 3. If null, only full period will be used in computations.
  • fullPeriod (Int32) — The full period over which to compute the Momersion
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The Momersion indicator for the requested symbol over the specified period

Return type:

MomersionIndicator

momp(symbol, period, resolution=None, selector=None)[source]

Creates a new MomentumPercent indicator. This will compute the n-period percent change in the security. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose momentum we want
  • period (int) — The period over which to compute the momentum
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The momentum indicator for the requested symbol over the specified period

Return type:

MomentumPercent

MOMP(symbol, period, resolution=None, selector=None)[source]

Creates a new MomentumPercent indicator. This will compute the n-period percent change in the security. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose momentum we want
  • period (Int32) — The period over which to compute the momentum
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The momentum indicator for the requested symbol over the specified period

Return type:

MomentumPercent

mosc(symbols, fast_period=19, slow_period=39, resolution=None, selector=None)[source]

Creates a new McClellan Oscillator indicator

Parameters:
  • symbols (List[Symbol] | Symbol[]) — The symbols whose McClellan Oscillator we want
  • fast_period (int, optional) — Fast period EMA of advance decline difference
  • slow_period (int, optional) — Slow period EMA of advance decline difference
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The McClellan Oscillator indicator for the requested symbol over the specified period

Return type:

McClellanOscillator

MOSC(symbols, fastPeriod=19, slowPeriod=39, resolution=None, selector=None)[source]

Creates a new McClellan Oscillator indicator

Parameters:
  • symbols (IEnumerable[Symbol] | Symbol[]) — The symbols whose McClellan Oscillator we want
  • fastPeriod (Int32, optional) — Fast period EMA of advance decline difference
  • slowPeriod (Int32, optional) — Slow period EMA of advance decline difference
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The McClellan Oscillator indicator for the requested symbol over the specified period

Return type:

McClellanOscillator

msi(symbols, fast_period=19, slow_period=39, resolution=None, selector=None)[source]

Creates a new McClellan Summation Index indicator

Parameters:
  • symbols (List[Symbol] | Symbol[]) — The symbols whose McClellan Summation Index we want
  • fast_period (int, optional) — Fast period EMA of advance decline difference
  • slow_period (int, optional) — Slow period EMA of advance decline difference
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The McClellan Summation Index indicator for the requested symbol over the specified period

Return type:

McClellanSummationIndex

MSI(symbols, fastPeriod=19, slowPeriod=39, resolution=None, selector=None)[source]

Creates a new McClellan Summation Index indicator

Parameters:
  • symbols (IEnumerable[Symbol] | Symbol[]) — The symbols whose McClellan Summation Index we want
  • fastPeriod (Int32, optional) — Fast period EMA of advance decline difference
  • slowPeriod (Int32, optional) — Slow period EMA of advance decline difference
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The McClellan Summation Index indicator for the requested symbol over the specified period

Return type:

McClellanSummationIndex

natr(symbol, period, resolution=None, selector=None)[source]

Creates a new NormalizedAverageTrueRange indicator.

Parameters:
  • symbol (Symbol) — The symbol whose NATR we want
  • period (int) — The period over which to compute the NATR
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The NormalizedAverageTrueRange indicator for the requested symbol over the specified period

Return type:

NormalizedAverageTrueRange

NATR(symbol, period, resolution=None, selector=None)[source]

Creates a new NormalizedAverageTrueRange indicator.

Parameters:
  • symbol (Symbol) — The symbol whose NATR we want
  • period (Int32) — The period over which to compute the NATR
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The NormalizedAverageTrueRange indicator for the requested symbol over the specified period

Return type:

NormalizedAverageTrueRange

obv(symbol, resolution=None, selector=None)[source]

Creates a new On Balance Volume indicator. This will compute the cumulative total volume based on whether the close price being higher or lower than the previous period. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose On Balance Volume we seek
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The On Balance Volume indicator for the requested symbol.

Return type:

OnBalanceVolume

OBV(symbol, resolution=None, selector=None)[source]

Creates a new On Balance Volume indicator. This will compute the cumulative total volume based on whether the close price being higher or lower than the previous period. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose On Balance Volume we seek
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The On Balance Volume indicator for the requested symbol.

Return type:

OnBalanceVolume

pphl(symbol, length_high, length_low, last_stored_values=100, resolution=None, selector=None)[source]

Creates a new PivotPointsHighLow indicator

Parameters:
  • symbol (Symbol) — The symbol whose PPHL we seek
  • length_high (int) — The number of surrounding bars whose high values should be less than the current bar's for the bar high to be marked as high pivot point
  • length_low (int) — The number of surrounding bars whose low values should be more than the current bar's for the bar low to be marked as low pivot point
  • last_stored_values (int, optional) — The number of last stored indicator values
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The PivotPointsHighLow indicator for the requested symbol.

Return type:

PivotPointsHighLow

PPHL(symbol, lengthHigh, lengthLow, lastStoredValues=100, resolution=None, selector=None)[source]

Creates a new PivotPointsHighLow indicator

Parameters:
  • symbol (Symbol) — The symbol whose PPHL we seek
  • lengthHigh (Int32) — The number of surrounding bars whose high values should be less than the current bar's for the bar high to be marked as high pivot point
  • lengthLow (Int32) — The number of surrounding bars whose low values should be more than the current bar's for the bar low to be marked as low pivot point
  • lastStoredValues (Int32, optional) — The number of last stored indicator values
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The PivotPointsHighLow indicator for the requested symbol.

Return type:

PivotPointsHighLow

ppo(symbol, fast_period, slow_period, moving_average_type, resolution=None, selector=None)[source]

Creates a new PercentagePriceOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose PPO we want
  • fast_period (int) — The fast moving average period
  • slow_period (int) — The slow moving average period
  • moving_average_type (MovingAverageType) — The type of moving average to use
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The PercentagePriceOscillator indicator for the requested symbol over the specified period

Return type:

PercentagePriceOscillator

PPO(symbol, fastPeriod, slowPeriod, movingAverageType, resolution=None, selector=None)[source]

Creates a new PercentagePriceOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose PPO we want
  • fastPeriod (Int32) — The fast moving average period
  • slowPeriod (Int32) — The slow moving average period
  • movingAverageType (MovingAverageType) — The type of moving average to use
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The PercentagePriceOscillator indicator for the requested symbol over the specified period

Return type:

PercentagePriceOscillator

psar(symbol, af_start=0.02, af_increment=0.02, af_max=0.2, resolution=None, selector=None)[source]

Creates a new Parabolic SAR indicator

Parameters:
  • symbol (Symbol) — The symbol whose PSAR we seek
  • af_start (float, optional) — Acceleration factor start value. Normally 0.02
  • af_increment (float, optional) — Acceleration factor increment value. Normally 0.02
  • af_max (float, optional) — Acceleration factor max value. Normally 0.2
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

A ParabolicStopAndReverse configured with the specified periods

Return type:

ParabolicStopAndReverse

PSAR(symbol, afStart=0.02, afIncrement=0.02, afMax=0.2, resolution=None, selector=None)[source]

Creates a new Parabolic SAR indicator

Parameters:
  • symbol (Symbol) — The symbol whose PSAR we seek
  • afStart (decimal, optional) — Acceleration factor start value. Normally 0.02
  • afIncrement (decimal, optional) — Acceleration factor increment value. Normally 0.02
  • afMax (decimal, optional) — Acceleration factor max value. Normally 0.2
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

A ParabolicStopAndReverse configured with the specified periods

Return type:

ParabolicStopAndReverse

r(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None)[source]

Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirror_option (Symbol, optional) — The mirror option for parity calculation
  • risk_free_rate (float, optional) — The risk free rate
  • dividend_yield (float, optional) — The dividend yield
  • option_model (OptionPricingModelType, optional) — The option pricing model used to estimate Rho
  • iv_model (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Rho indicator for the specified symbol

Return type:

Rho

R(symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None)[source]

Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirrorOption (Symbol, optional) — The mirror option for parity calculation
  • riskFreeRate (decimal, optional) — The risk free rate
  • dividendYield (decimal, optional) — The dividend yield
  • optionModel (OptionPricingModelType, optional) — The option pricing model used to estimate Rho
  • ivModel (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Rho indicator for the specified symbol

Return type:

Rho

rc(symbol, period, k, resolution=None, selector=None)[source]

Creates a new RegressionChannel indicator which will compute the LinearRegression, UpperChannel and LowerChannel lines, the intercept and slope

Parameters:
  • symbol (Symbol) — The symbol whose RegressionChannel we seek
  • period (int) — The period of the standard deviation and least square moving average (linear regression line)
  • k (float) — The number of standard deviations specifying the distance between the linear regression and upper or lower channel lines
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

A Regression Channel configured with the specified period and number of standard deviation

Return type:

RegressionChannel

RC(symbol, period, k, resolution=None, selector=None)[source]

Creates a new RegressionChannel indicator which will compute the LinearRegression, UpperChannel and LowerChannel lines, the intercept and slope

Parameters:
  • symbol (Symbol) — The symbol whose RegressionChannel we seek
  • period (Int32) — The period of the standard deviation and least square moving average (linear regression line)
  • k (decimal) — The number of standard deviations specifying the distance between the linear regression and upper or lower channel lines
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

A Regression Channel configured with the specified period and number of standard deviation

Return type:

RegressionChannel

rdv(symbol, period=2, resolution=4, selector=None)[source]

Creates an RelativeDailyVolume indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose RDV we want
  • period (int, optional) — The period of the RDV
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Relative Volume indicator for the given parameters

Return type:

RelativeDailyVolume

RDV(symbol, period=2, resolution=4, selector=None)[source]

Creates an RelativeDailyVolume indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose RDV we want
  • period (Int32, optional) — The period of the RDV
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Relative Volume indicator for the given parameters

Return type:

RelativeDailyVolume

register_indicator(symbol, indicator, resolution, selector)[source]

Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

Parameters:
  • symbol (Symbol) — The symbol to register against
  • indicator (PyObject | None | IndicatorBase[IndicatorDataPoint]) — The indicator to receive data from the consolidator
  • resolution (Optional[timedelta] | Optional[Resolution]) — The resolution at which to send data to the indicator, null to use the same resolution as the subscription
  • selector (Callable[IBaseData, float] | PyObject | None) — (T)x)
register_indicator(symbol, indicator, py_object, selector=None)[source]

Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

Parameters:
  • symbol (Symbol) — The symbol to register against
  • indicator (PyObject) — The indicator to receive data from the consolidator
  • py_object (PyObject) — The python object that it is trying to register with, could be consolidator or a timespan
  • selector (PyObject, optional) — (T)x)
register_indicator(symbol, indicator, consolidator, selector=None)[source]

Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

Parameters:
  • symbol (Symbol) — The symbol to register against
  • indicator (PyObject | None | IndicatorBase[IndicatorDataPoint]) — The indicator to receive data from the consolidator
  • consolidator (IDataConsolidator) — The consolidator to receive raw subscription data
  • selector (Callable[IBaseData, float] | PyObject | None, optional) — (T)x)
RegisterIndicator(symbol, indicator, resolution, selector)[source]

Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

Parameters:
  • symbol (Symbol) — The symbol to register against
  • indicator (PyObject | None | IndicatorBase[IndicatorDataPoint]) — The indicator to receive data from the consolidator
  • resolution (Nullable[Resolution] | Nullable[TimeSpan]) — The resolution at which to send data to the indicator, null to use the same resolution as the subscription
  • selector (PyObject | None | Func[IBaseData, Decimal]) — (T)x)
RegisterIndicator(symbol, indicator, pyObject, selector=None)[source]

Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

Parameters:
  • symbol (Symbol) — The symbol to register against
  • indicator (PyObject) — The indicator to receive data from the consolidator
  • pyObject (PyObject) — The python object that it is trying to register with, could be consolidator or a timespan
  • selector (PyObject, optional) — (T)x)
RegisterIndicator(symbol, indicator, consolidator, selector=None)[source]

Creates and registers a new consolidator to receive automatic updates at the specified resolution as well as configures the indicator to receive updates from the consolidator.

Parameters:
  • symbol (Symbol) — The symbol to register against
  • indicator (PyObject | None | IndicatorBase[IndicatorDataPoint]) — The indicator to receive data from the consolidator
  • consolidator (IDataConsolidator) — The consolidator to receive raw subscription data
  • selector (PyObject | Func[IBaseData, Decimal] | None, optional) — (T)x)
rma(symbol, period, resolution=None, selector=None)[source]

Creates a new Relative Moving Average indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose relative moving average we seek
  • period (int) — The period of the relative moving average
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

A relative moving average configured with the specified period and number of standard deviation

Return type:

RelativeMovingAverage

RMA(symbol, period, resolution=None, selector=None)[source]

Creates a new Relative Moving Average indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose relative moving average we seek
  • period (Int32) — The period of the relative moving average
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

A relative moving average configured with the specified period and number of standard deviation

Return type:

RelativeMovingAverage

roc(symbol, period, resolution=None, selector=None)[source]

Creates a new RateOfChange indicator. This will compute the n-period rate of change in the security. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose RateOfChange we want
  • period (int) — The period over which to compute the RateOfChange
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The RateOfChange indicator for the requested symbol over the specified period

Return type:

RateOfChange

ROC(symbol, period, resolution=None, selector=None)[source]

Creates a new RateOfChange indicator. This will compute the n-period rate of change in the security. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose RateOfChange we want
  • period (Int32) — The period over which to compute the RateOfChange
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The RateOfChange indicator for the requested symbol over the specified period

Return type:

RateOfChange

rocp(symbol, period, resolution=None, selector=None)[source]

Creates a new RateOfChangePercent indicator. This will compute the n-period percentage rate of change in the security. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose RateOfChangePercent we want
  • period (int) — The period over which to compute the RateOfChangePercent
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The RateOfChangePercent indicator for the requested symbol over the specified period

Return type:

RateOfChangePercent

ROCP(symbol, period, resolution=None, selector=None)[source]

Creates a new RateOfChangePercent indicator. This will compute the n-period percentage rate of change in the security. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose RateOfChangePercent we want
  • period (Int32) — The period over which to compute the RateOfChangePercent
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The RateOfChangePercent indicator for the requested symbol over the specified period

Return type:

RateOfChangePercent

rocr(symbol, period, resolution=None, selector=None)[source]

Creates a new RateOfChangeRatio indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ROCR we want
  • period (int) — The period over which to compute the ROCR
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The RateOfChangeRatio indicator for the requested symbol over the specified period

Return type:

RateOfChangeRatio

ROCR(symbol, period, resolution=None, selector=None)[source]

Creates a new RateOfChangeRatio indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ROCR we want
  • period (Int32) — The period over which to compute the ROCR
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The RateOfChangeRatio indicator for the requested symbol over the specified period

Return type:

RateOfChangeRatio

rsi(symbol, period, moving_average_type=2, resolution=None, selector=None)[source]

Creates a new RelativeStrengthIndex indicator. This will produce an oscillator that ranges from 0 to 100 based on the ratio of average gains to average losses over the specified period.

Parameters:
  • symbol (Symbol) — The symbol whose RSI we want
  • period (int) — The period over which to compute the RSI
  • moving_average_type (MovingAverageType, optional) — The type of moving average to use in computing the average gainloss values
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The RelativeStrengthIndex indicator for the requested symbol over the specified period

Return type:

RelativeStrengthIndex

RSI(symbol, period, movingAverageType=2, resolution=None, selector=None)[source]

Creates a new RelativeStrengthIndex indicator. This will produce an oscillator that ranges from 0 to 100 based on the ratio of average gains to average losses over the specified period.

Parameters:
  • symbol (Symbol) — The symbol whose RSI we want
  • period (Int32) — The period over which to compute the RSI
  • movingAverageType (MovingAverageType, optional) — The type of moving average to use in computing the average gainloss values
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The RelativeStrengthIndex indicator for the requested symbol over the specified period

Return type:

RelativeStrengthIndex

rvi(symbol, period, moving_average_type=0, resolution=None, selector=None)[source]

Creates a new RelativeVigorIndex indicator.

Parameters:
  • symbol (Symbol) — The symbol whose RVI we want
  • period (int) — The period over which to compute the RVI
  • moving_average_type (MovingAverageType, optional) — The type of moving average to use
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The RelativeVigorIndex indicator for the requested symbol over the specified period

Return type:

RelativeVigorIndex

RVI(symbol, period, movingAverageType=0, resolution=None, selector=None)[source]

Creates a new RelativeVigorIndex indicator.

Parameters:
  • symbol (Symbol) — The symbol whose RVI we want
  • period (Int32) — The period over which to compute the RVI
  • movingAverageType (MovingAverageType, optional) — The type of moving average to use
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The RelativeVigorIndex indicator for the requested symbol over the specified period

Return type:

RelativeVigorIndex

si(symbol, limit_move, resolution=4, selector=None)[source]

Creates a Wilder Swing Index (SI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose SI we want
  • limit_move (float) — The maximum daily change in price for the SI
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The WilderSwingIndex for the given parameters

Return type:

WilderSwingIndex

SI(symbol, limitMove, resolution=4, selector=None)[source]

Creates a Wilder Swing Index (SI) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose SI we want
  • limitMove (decimal) — The maximum daily change in price for the SI
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The WilderSwingIndex for the given parameters

Return type:

WilderSwingIndex

sma(symbol, period, resolution=None, selector=None)[source]

Creates an SimpleMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose SMA we want
  • period (int) — The period of the SMA
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The SimpleMovingAverage for the given parameters

Return type:

SimpleMovingAverage

SMA(symbol, period, resolution=None, selector=None)[source]

Creates an SimpleMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose SMA we want
  • period (Int32) — The period of the SMA
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The SimpleMovingAverage for the given parameters

Return type:

SimpleMovingAverage

sortino(symbol, sortino_period, minimum_acceptable_return=0.0, resolution=None, selector=None)[source]

Creates a new Sortino indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Sortino we want
  • sortino_period (int) — Period of historical observation for Sortino ratio calculation
  • minimum_acceptable_return (float, optional) — Minimum acceptable return (eg risk-free rate) for the Sortino ratio calculation
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The SortinoRatio indicator for the requested symbol over the specified period

Return type:

SortinoRatio

SORTINO(symbol, sortinoPeriod, minimumAcceptableReturn=0.0, resolution=None, selector=None)[source]

Creates a new Sortino indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Sortino we want
  • sortinoPeriod (Int32) — Period of historical observation for Sortino ratio calculation
  • minimumAcceptableReturn (Double, optional) — Minimum acceptable return (eg risk-free rate) for the Sortino ratio calculation
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The SortinoRatio indicator for the requested symbol over the specified period

Return type:

SortinoRatio

sr(symbol, sharpe_period, risk_free_rate=None, resolution=None, selector=None)[source]

Creates a new SharpeRatio indicator.

Parameters:
  • symbol (Symbol) — The symbol whose RSR we want
  • sharpe_period (int) — Period of historical observation for sharpe ratio calculation
  • risk_free_rate (float, optional) —
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The SharpeRatio indicator for the requested symbol over the specified period

Return type:

SharpeRatio

SR(symbol, sharpePeriod, riskFreeRate=None, resolution=None, selector=None)[source]

Creates a new SharpeRatio indicator.

Parameters:
  • symbol (Symbol) — The symbol whose RSR we want
  • sharpePeriod (Int32) — Period of historical observation for sharpe ratio calculation
  • riskFreeRate (decimal, optional) —
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The SharpeRatio indicator for the requested symbol over the specified period

Return type:

SharpeRatio

stc(symbol, cycle_period, fast_period, slow_period, moving_average_type=1, resolution=None, selector=None)[source]

Creates a new Schaff Trend Cycle indicator

Parameters:
  • symbol (Symbol) — The symbol for the indicator to track
  • cycle_period (int) — The fast moving average period
  • fast_period (int) — The slow moving average period
  • slow_period (int) — The signal period
  • moving_average_type (MovingAverageType, optional) — The type of moving average to use
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The SchaffTrendCycle indicator for the requested symbol over the specified period

Return type:

SchaffTrendCycle

STC(symbol, cyclePeriod, fastPeriod, slowPeriod, movingAverageType=1, resolution=None, selector=None)[source]

Creates a new Schaff Trend Cycle indicator

Parameters:
  • symbol (Symbol) — The symbol for the indicator to track
  • cyclePeriod (Int32) — The fast moving average period
  • fastPeriod (Int32) — The slow moving average period
  • slowPeriod (Int32) — The signal period
  • movingAverageType (MovingAverageType, optional) — The type of moving average to use
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The SchaffTrendCycle indicator for the requested symbol over the specified period

Return type:

SchaffTrendCycle

std(symbol, period, resolution=None, selector=None)[source]

Creates a new StandardDeviation indicator. This will return the population standard deviation of samples over the specified period.

Parameters:
  • symbol (Symbol) — The symbol whose STD we want
  • period (int) — The period over which to compute the STD
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The StandardDeviation indicator for the requested symbol over the specified period

Return type:

StandardDeviation

STD(symbol, period, resolution=None, selector=None)[source]

Creates a new StandardDeviation indicator. This will return the population standard deviation of samples over the specified period.

Parameters:
  • symbol (Symbol) — The symbol whose STD we want
  • period (Int32) — The period over which to compute the STD
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The StandardDeviation indicator for the requested symbol over the specified period

Return type:

StandardDeviation

sto(symbol, period, k_period, d_period, resolution=None, selector=None)[source]

Creates a new Stochastic indicator.

Parameters:
  • symbol (Symbol) — The symbol whose stochastic we seek
  • period (int) — The period of the stochastic. Normally 14
  • k_period (int) — The sum period of the stochastic. Normally 14
  • d_period (int) — The sum period of the stochastic. Normally 3
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

Stochastic indicator for the requested symbol.

Return type:

Stochastic

STO(symbol, period, kPeriod, dPeriod, resolution=None, selector=None)[source]

Creates a new Stochastic indicator.

Parameters:
  • symbol (Symbol) — The symbol whose stochastic we seek
  • period (Int32) — The period of the stochastic. Normally 14
  • kPeriod (Int32) — The sum period of the stochastic. Normally 14
  • dPeriod (Int32) — The sum period of the stochastic. Normally 3
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

Stochastic indicator for the requested symbol.

Return type:

Stochastic

str(symbol, period, multiplier, moving_average_type=2, resolution=None, selector=None)[source]

Creates a new SuperTrend indicator.

Parameters:
  • symbol (Symbol) — The symbol whose SuperTrend indicator we want.
  • period (int) — The smoothing period for average true range.
  • multiplier (float) — Multiplier to calculate basic upper and lower bands width.
  • moving_average_type (MovingAverageType, optional) — Smoother type for average true range, defaults to Wilders.
  • resolution (Resolution, optional) — The resolution.
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Return type:

SuperTrend

STR(symbol, period, multiplier, movingAverageType=2, resolution=None, selector=None)[source]

Creates a new SuperTrend indicator.

Parameters:
  • symbol (Symbol) — The symbol whose SuperTrend indicator we want.
  • period (Int32) — The smoothing period for average true range.
  • multiplier (decimal) — Multiplier to calculate basic upper and lower bands width.
  • movingAverageType (MovingAverageType, optional) — Smoother type for average true range, defaults to Wilders.
  • resolution (Resolution, optional) — The resolution.
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Return type:

SuperTrend

sum(symbol, period, resolution=None, selector=None)[source]

Creates a new Sum indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Sum we want
  • period (int) — The period over which to compute the Sum
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The Sum indicator for the requested symbol over the specified period

Return type:

Sum

SUM(symbol, period, resolution=None, selector=None)[source]

Creates a new Sum indicator.

Parameters:
  • symbol (Symbol) — The symbol whose Sum we want
  • period (Int32) — The period over which to compute the Sum
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The Sum indicator for the requested symbol over the specified period

Return type:

Sum

swiss(symbol, period, delta, tool, resolution=None, selector=None)[source]

Creates Swiss Army Knife transformation for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol to use for calculations
  • period (int) — The period of the calculation
  • delta (float) — The delta scale of the BandStop or BandPass
  • tool (SwissArmyKnifeTool) — The tool os the Swiss Army Knife
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The calculation using the given tool

Return type:

SwissArmyKnife

SWISS(symbol, period, delta, tool, resolution=None, selector=None)[source]

Creates Swiss Army Knife transformation for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol to use for calculations
  • period (Int32) — The period of the calculation
  • delta (Double) — The delta scale of the BandStop or BandPass
  • tool (SwissArmyKnifeTool) — The tool os the Swiss Army Knife
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The calculation using the given tool

Return type:

SwissArmyKnife

t(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None)[source]

For the given symbol will resolve the ticker it used at the current algorithm date

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirror_option (Symbol, optional) — The mirror option for parity calculation
  • risk_free_rate (float, optional) — The risk free rate
  • dividend_yield (float, optional) — The dividend yield
  • option_model (OptionPricingModelType, optional) — The option pricing model used to estimate Theta
  • iv_model (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Theta indicator for the specified symbol

Return type:

Theta

T(symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None)[source]

For the given symbol will resolve the ticker it used at the current algorithm date

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirrorOption (Symbol, optional) — The mirror option for parity calculation
  • riskFreeRate (decimal, optional) — The risk free rate
  • dividendYield (decimal, optional) — The dividend yield
  • optionModel (OptionPricingModelType, optional) — The option pricing model used to estimate Theta
  • ivModel (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Theta indicator for the specified symbol

Return type:

Theta

t_3(symbol, period, volume_factor=0.7, resolution=None, selector=None)[source]

Creates a new T3MovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose T3 we want
  • period (int) — The period over which to compute the T3
  • volume_factor (float, optional) — The volume factor to be used for the T3 (value must be in the [0,1] range, defaults to 0.7)
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The T3MovingAverage indicator for the requested symbol over the specified period

Return type:

T3MovingAverage

tdd(symbol, period, minimum_acceptable_return=0.0, resolution=None, selector=None)[source]

Creates a new TargetDownsideDeviation indicator. The target downside deviation is defined as the root-mean-square, or RMS, of the deviations of the realized return’s underperformance from the target return where all returns above the target return are treated as underperformance of 0.

Parameters:
  • symbol (Symbol) — The symbol whose TDD we want
  • period (int) — The period over which to compute the TDD
  • minimum_acceptable_return (float, optional) — The resolution
  • resolution (Resolution, optional) — Minimum acceptable return (MAR) for the target downside deviation calculation
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The TargetDownsideDeviation indicator for the requested symbol over the specified period

Return type:

TargetDownsideDeviation

TDD(symbol, period, minimumAcceptableReturn=0.0, resolution=None, selector=None)[source]

Creates a new TargetDownsideDeviation indicator. The target downside deviation is defined as the root-mean-square, or RMS, of the deviations of the realized return’s underperformance from the target return where all returns above the target return are treated as underperformance of 0.

Parameters:
  • symbol (Symbol) — The symbol whose TDD we want
  • period (Int32) — The period over which to compute the TDD
  • minimumAcceptableReturn (Double, optional) — The resolution
  • resolution (Resolution, optional) — Minimum acceptable return (MAR) for the target downside deviation calculation
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The TargetDownsideDeviation indicator for the requested symbol over the specified period

Return type:

TargetDownsideDeviation

tema(symbol, period, resolution=None, selector=None)[source]

Creates a new TripleExponentialMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose TEMA we want
  • period (int) — The period over which to compute the TEMA
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The TripleExponentialMovingAverage indicator for the requested symbol over the specified period

Return type:

TripleExponentialMovingAverage

TEMA(symbol, period, resolution=None, selector=None)[source]

Creates a new TripleExponentialMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose TEMA we want
  • period (Int32) — The period over which to compute the TEMA
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The TripleExponentialMovingAverage indicator for the requested symbol over the specified period

Return type:

TripleExponentialMovingAverage

tp(symbol, period=2, value_area_volume_percentage=0.7, price_range_round_off=0.05, resolution=4, selector=None)[source]

Creates an Market Profile indicator for the symbol with Time Price Opportunity (TPO) mode. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose TP we want
  • period (int, optional) — The period of the TP
  • value_area_volume_percentage (float, optional) — The percentage of volume contained in the value area
  • price_range_round_off (float, optional) — How many digits you want to round and the precision. i.e 0.01 round to two digits exactly.
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Time Profile indicator for the given parameters

Return type:

TimeProfile

TP(symbol, period=2, valueAreaVolumePercentage=0.7, priceRangeRoundOff=0.05, resolution=4, selector=None)[source]

Creates an Market Profile indicator for the symbol with Time Price Opportunity (TPO) mode. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose TP we want
  • period (Int32, optional) — The period of the TP
  • valueAreaVolumePercentage (decimal, optional) — The percentage of volume contained in the value area
  • priceRangeRoundOff (decimal, optional) — How many digits you want to round and the precision. i.e 0.01 round to two digits exactly.
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Time Profile indicator for the given parameters

Return type:

TimeProfile

tr(symbol, resolution=None, selector=None)[source]

Creates a new TrueRange indicator.

Parameters:
  • symbol (Symbol) — The symbol whose TR we want
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The TrueRange indicator for the requested symbol.

Return type:

TrueRange

TR(symbol, resolution=None, selector=None)[source]

Creates a new TrueRange indicator.

Parameters:
  • symbol (Symbol) — The symbol whose TR we want
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The TrueRange indicator for the requested symbol.

Return type:

TrueRange

trima(symbol, period, resolution=None, selector=None)[source]

Creates a new TriangularMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose TRIMA we want
  • period (int) — The period over which to compute the TRIMA
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The TriangularMovingAverage indicator for the requested symbol over the specified period

Return type:

TriangularMovingAverage

TRIMA(symbol, period, resolution=None, selector=None)[source]

Creates a new TriangularMovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose TRIMA we want
  • period (Int32) — The period over which to compute the TRIMA
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The TriangularMovingAverage indicator for the requested symbol over the specified period

Return type:

TriangularMovingAverage

trin(symbols, resolution=None, selector=None)[source]

Creates a new Arms Index indicator

Parameters:
  • symbols (List[Symbol] | Symbol[]) — The symbols whose Arms Index we want
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Arms Index indicator for the requested symbol over the specified period

Return type:

ArmsIndex

TRIN(symbols, resolution=None, selector=None)[source]

Creates a new Arms Index indicator

Parameters:
  • symbols (IEnumerable[Symbol] | Symbol[]) — The symbols whose Arms Index we want
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Arms Index indicator for the requested symbol over the specified period

Return type:

ArmsIndex

trix(symbol, period, resolution=None, selector=None)[source]

Creates a new Trix indicator.

Parameters:
  • symbol (Symbol) — The symbol whose TRIX we want
  • period (int) — The period over which to compute the TRIX
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The Trix indicator for the requested symbol over the specified period

Return type:

Trix

TRIX(symbol, period, resolution=None, selector=None)[source]

Creates a new Trix indicator.

Parameters:
  • symbol (Symbol) — The symbol whose TRIX we want
  • period (Int32) — The period over which to compute the TRIX
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The Trix indicator for the requested symbol over the specified period

Return type:

Trix

tsf(symbol, period, resolution=None, selector=None)[source]

Creates a new Time Series Forecast indicator

Parameters:
  • symbol (Symbol) — The symbol whose TSF we want
  • period (int) — The period of the TSF
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The TimeSeriesForecast indicator for the requested symbol over the specified period

Return type:

TimeSeriesForecast

TSF(symbol, period, resolution=None, selector=None)[source]

Creates a new Time Series Forecast indicator

Parameters:
  • symbol (Symbol) — The symbol whose TSF we want
  • period (Int32) — The period of the TSF
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The TimeSeriesForecast indicator for the requested symbol over the specified period

Return type:

TimeSeriesForecast

tsi(symbol, long_term_period=25, short_term_period=13, signal_period=7, signal_type=1, resolution=None, selector=None)[source]

Creates a TrueStrengthIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose TSI we want
  • long_term_period (int, optional) — Period used for the first price change smoothing
  • short_term_period (int, optional) — Period used for the second (double) price change smoothing
  • signal_period (int, optional) — The signal period
  • signal_type (MovingAverageType, optional) — The type of moving average to use for the signal
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The TrueStrengthIndex indicator for the given parameters

Return type:

TrueStrengthIndex

TSI(symbol, longTermPeriod=25, shortTermPeriod=13, signalPeriod=7, signalType=1, resolution=None, selector=None)[source]

Creates a TrueStrengthIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose TSI we want
  • longTermPeriod (Int32, optional) — Period used for the first price change smoothing
  • shortTermPeriod (Int32, optional) — Period used for the second (double) price change smoothing
  • signalPeriod (Int32, optional) — The signal period
  • signalType (MovingAverageType, optional) — The type of moving average to use for the signal
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The TrueStrengthIndex indicator for the given parameters

Return type:

TrueStrengthIndex

ultosc(symbol, period_1, period_2, period_3, resolution=None, selector=None)[source]

Creates a new UltimateOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ULTOSC we want
  • period_1 (int) — The first period over which to compute the ULTOSC
  • period_2 (int) — The second period over which to compute the ULTOSC
  • period_3 (int) — The third period over which to compute the ULTOSC
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The UltimateOscillator indicator for the requested symbol over the specified period

Return type:

UltimateOscillator

ULTOSC(symbol, period1, period2, period3, resolution=None, selector=None)[source]

Creates a new UltimateOscillator indicator.

Parameters:
  • symbol (Symbol) — The symbol whose ULTOSC we want
  • period1 (Int32) — The first period over which to compute the ULTOSC
  • period2 (Int32) — The second period over which to compute the ULTOSC
  • period3 (Int32) — The third period over which to compute the ULTOSC
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The UltimateOscillator indicator for the requested symbol over the specified period

Return type:

UltimateOscillator

v(symbol, period, resolution=None, selector=None)[source]

Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose variance we want
  • period (int) — The period over which to compute the variance
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The Variance indicator for the requested symbol over the specified period

Return type:

Variance

v(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=0, iv_model=None, resolution=None)[source]

Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirror_option (Symbol, optional) — The mirror option for parity calculation
  • risk_free_rate (float, optional) — The risk free rate
  • dividend_yield (float, optional) — The dividend yield
  • option_model (OptionPricingModelType, optional) — The option pricing model used to estimate Vega
  • iv_model (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Vega indicator for the specified symbol

Return type:

Vega

V(symbol, period, resolution=None, selector=None)[source]

Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose variance we want
  • period (Int32) — The period over which to compute the variance
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The Variance indicator for the requested symbol over the specified period

Return type:

Variance

V(symbol, mirrorOption=None, riskFreeRate=None, dividendYield=None, optionModel=0, ivModel=None, resolution=None)[source]

Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The option symbol whose values we want as an indicator
  • mirrorOption (Symbol, optional) — The mirror option for parity calculation
  • riskFreeRate (decimal, optional) — The risk free rate
  • dividendYield (decimal, optional) — The dividend yield
  • optionModel (OptionPricingModelType, optional) — The option pricing model used to estimate Vega
  • ivModel (OptionPricingModelType, optional) — The option pricing model used to estimate IV
  • resolution (Resolution, optional) — The desired resolution of the data
Returns:

A new Vega indicator for the specified symbol

Return type:

Vega

vidya(symbol, period, resolution=None, selector=None)[source]

Creates a new Chande's Variable Index Dynamic Average indicator.

Parameters:
  • symbol (Symbol) — The symbol whose VIDYA we want
  • period (int) — The period over which to compute the VIDYA
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The VariableIndexDynamicAverage indicator for the requested symbol over the specified period

Return type:

VariableIndexDynamicAverage

VIDYA(symbol, period, resolution=None, selector=None)[source]

Creates a new Chande's Variable Index Dynamic Average indicator.

Parameters:
  • symbol (Symbol) — The symbol whose VIDYA we want
  • period (Int32) — The period over which to compute the VIDYA
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The VariableIndexDynamicAverage indicator for the requested symbol over the specified period

Return type:

VariableIndexDynamicAverage

vp(symbol, period=2, value_area_volume_percentage=0.7, price_range_round_off=0.05, resolution=4, selector=None)[source]

Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose VP we want
  • period (int, optional) — The period of the VP
  • value_area_volume_percentage (float, optional) — The percentage of volume contained in the value area
  • price_range_round_off (float, optional) — How many digits you want to round and the precision. i.e 0.01 round to two digits exactly.
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Volume Profile indicator for the given parameters

Return type:

VolumeProfile

VP(symbol, period=2, valueAreaVolumePercentage=0.7, priceRangeRoundOff=0.05, resolution=4, selector=None)[source]

Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose VP we want
  • period (Int32, optional) — The period of the VP
  • valueAreaVolumePercentage (decimal, optional) — The percentage of volume contained in the value area
  • priceRangeRoundOff (decimal, optional) — How many digits you want to round and the precision. i.e 0.01 round to two digits exactly.
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Volume Profile indicator for the given parameters

Return type:

VolumeProfile

vwap(symbol)[source]

Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose VWAP we want
Returns:

The IntradayVWAP for the specified symbol

Return type:

IntradayVwap

vwap(symbol, period, resolution=None, selector=None)[source]

Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose VWAP we want
  • period (int) — The period of the VWAP
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The VolumeWeightedAveragePrice for the given parameters

Return type:

VolumeWeightedAveragePriceIndicator

VWAP(symbol)[source]

Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose VWAP we want
Returns:

The IntradayVWAP for the specified symbol

Return type:

IntradayVwap

VWAP(symbol, period, resolution=None, selector=None)[source]

Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose VWAP we want
  • period (Int32) — The period of the VWAP
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The VolumeWeightedAveragePrice for the given parameters

Return type:

VolumeWeightedAveragePriceIndicator

warm_up_indicator(symbol, indicator, resolution=None, selector=None)[source]

Warms up a given indicator with historical data

Parameters:
  • symbol (Symbol) — The symbol whose indicator we want
  • indicator (PyObject | None | IndicatorBase[IndicatorDataPoint]) — The indicator we want to warm up
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float] | PyObject | None, optional) — (T)x)
warm_up_indicator(symbol, indicator, period, selector=None)[source]

Warms up a given indicator with historical data

Parameters:
  • symbol (Symbol) — The symbol whose indicator we want
  • indicator (None | IndicatorBase[IndicatorDataPoint]) — The indicator we want to warm up
  • period (timedelta) — The necessary period to warm up the indicator
  • selector (Callable[IBaseData, float] | None, optional) — x.Value)
WarmUpIndicator(symbol, indicator, resolution=None, selector=None)[source]

Warms up a given indicator with historical data

Parameters:
  • symbol (Symbol) — The symbol whose indicator we want
  • indicator (PyObject | None | IndicatorBase[IndicatorDataPoint]) — The indicator we want to warm up
  • resolution (Resolution, optional) — The resolution
  • selector (PyObject | None | Func[IBaseData, Decimal], optional) — (T)x)
WarmUpIndicator(symbol, indicator, period, selector=None)[source]

Warms up a given indicator with historical data

Parameters:
  • symbol (Symbol) — The symbol whose indicator we want
  • indicator (None | IndicatorBase[IndicatorDataPoint]) — The indicator we want to warm up
  • period (TimeSpan) — The necessary period to warm up the indicator
  • selector (Func[IBaseData, Decimal] | None, optional) — x.Value)
wilr(symbol, period, resolution=None, selector=None)[source]

Creates a new Williams %R indicator. This will compute the percentage change of the current closing price in relation to the high and low of the past N periods. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Williams %R we want
  • period (int) — The period over which to compute the Williams %R
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, IBaseDataBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Williams %R indicator for the requested symbol over the specified period

Return type:

WilliamsPercentR

WILR(symbol, period, resolution=None, selector=None)[source]

Creates a new Williams %R indicator. This will compute the percentage change of the current closing price in relation to the high and low of the past N periods. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose Williams %R we want
  • period (Int32) — The period over which to compute the Williams %R
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, IBaseDataBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

The Williams %R indicator for the requested symbol over the specified period

Return type:

WilliamsPercentR

wwma(symbol, period, resolution=None, selector=None)[source]

Creates a WilderMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose WMA we want
  • period (int) — The period of the WMA
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, float], optional) — x.Value)
Returns:

The WilderMovingAverage for the given parameters

Return type:

WilderMovingAverage

WWMA(symbol, period, resolution=None, selector=None)[source]

Creates a WilderMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose WMA we want
  • period (Int32) — The period of the WMA
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The WilderMovingAverage for the given parameters

Return type:

WilderMovingAverage

Warning: include(/tmp/docs/858353de988de310323f75527b8edd7974c65372/Resources/qcalgorithm-api/qcalgorithm-γ.html): Failed to open stream: No such file or directory in /tmp/docs/858353de988de310323f75527b8edd7974c65372/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 109 Warning: include(): Failed opening '/tmp/docs/858353de988de310323f75527b8edd7974c65372/Resources/qcalgorithm-api/qcalgorithm-γ.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/858353de988de310323f75527b8edd7974c65372/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 109 Warning: include(/tmp/docs/858353de988de310323f75527b8edd7974c65372/Resources/qcalgorithm-api/qcalgorithm-δ.html): Failed to open stream: No such file or directory in /tmp/docs/858353de988de310323f75527b8edd7974c65372/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 110 Warning: include(): Failed opening '/tmp/docs/858353de988de310323f75527b8edd7974c65372/Resources/qcalgorithm-api/qcalgorithm-δ.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/858353de988de310323f75527b8edd7974c65372/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 110 Warning: include(/tmp/docs/858353de988de310323f75527b8edd7974c65372/Resources/qcalgorithm-api/qcalgorithm-θ.html): Failed to open stream: No such file or directory in /tmp/docs/858353de988de310323f75527b8edd7974c65372/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 111 Warning: include(): Failed opening '/tmp/docs/858353de988de310323f75527b8edd7974c65372/Resources/qcalgorithm-api/qcalgorithm-θ.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/858353de988de310323f75527b8edd7974c65372/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 111 Warning: include(/tmp/docs/858353de988de310323f75527b8edd7974c65372/Resources/qcalgorithm-api/qcalgorithm-ρ.html): Failed to open stream: No such file or directory in /tmp/docs/858353de988de310323f75527b8edd7974c65372/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 112 Warning: include(): Failed opening '/tmp/docs/858353de988de310323f75527b8edd7974c65372/Resources/qcalgorithm-api/qcalgorithm-ρ.html' for inclusion (include_path='/var/www/beta/core/libraries/Google:/var/www/beta:.:/usr/share/php') in /tmp/docs/858353de988de310323f75527b8edd7974c65372/03 Writing Algorithms/98 API Reference/08 Indicators.php on line 112
property candlestick_patterns[source]

Gets an instance to access the candlestick pattern helper methods

Returns:

Gets an instance to access the candlestick pattern helper methods

Return type:

CandlestickPatterns

property CandlestickPatterns[source]

Gets an instance to access the candlestick pattern helper methods

Returns:

Gets an instance to access the candlestick pattern helper methods

Return type:

CandlestickPatterns

property enable_automatic_indicator_warm_up[source]

Gets whether or not WarmUpIndicator is allowed to warm up indicators/>

Returns:

Gets whether or not WarmUpIndicator is allowed to warm up indicators/>

Return type:

bool

property EnableAutomaticIndicatorWarmUp[source]

Gets whether or not WarmUpIndicator is allowed to warm up indicators/>

Returns:

Gets whether or not WarmUpIndicator is allowed to warm up indicators/>

Return type:

bool

T3(symbol, period, volumeFactor=0.7, resolution=None, selector=None)[source]

Creates a new T3MovingAverage indicator.

Parameters:
  • symbol (Symbol) — The symbol whose T3 we want
  • period (Int32) — The period over which to compute the T3
  • volumeFactor (decimal, optional) — The volume factor to be used for the T3 (value must be in the [0,1] range, defaults to 0.7)
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, Decimal>, optional) — x.Value)
Returns:

The T3MovingAverage indicator for the requested symbol over the specified period

Return type:

T3MovingAverage

Live Trading

Live Trading

on_brokerage_disconnect()[source]

Brokerage disconnected event handler. This method is called when the brokerage connection is lost.

OnBrokerageDisconnect()[source]

Brokerage disconnected event handler. This method is called when the brokerage connection is lost.

on_brokerage_message(message_event)[source]

Brokerage message event handler. This method is called for all types of brokerage messages.

Parameters:
OnBrokerageMessage(messageEvent)[source]

Brokerage message event handler. This method is called for all types of brokerage messages.

Parameters:
on_brokerage_reconnect()[source]

Brokerage reconnected event handler. This method is called when the brokerage connection is restored after a disconnection.

OnBrokerageReconnect()[source]

Brokerage reconnected event handler. This method is called when the brokerage connection is restored after a disconnection.

set_live_mode(live)[source]

Set live mode state of the algorithm run: Public setter for the algorithm property LiveMode.

Parameters:
  • live (bool)
SetLiveMode(live)[source]

Set live mode state of the algorithm run: Public setter for the algorithm property LiveMode.

Parameters:
  • live (bool)
set_status(status)[source]

Set the state of a live deployment

Parameters:
SetStatus(status)[source]

Set the state of a live deployment

Parameters:
property live_mode[source]

Boolean property indicating the algorithm is currently running in live mode.

Returns:

Boolean property indicating the algorithm is currently running in live mode.

Return type:

bool

property LiveMode[source]

Boolean property indicating the algorithm is currently running in live mode.

Returns:

Boolean property indicating the algorithm is currently running in live mode.

Return type:

bool

property notify[source]

Notification Manager for Sending Live Runtime Notifications to users about important events.

Returns:

Notification Manager for Sending Live Runtime Notifications to users about important events.

Return type:

NotificationManager

property Notify[source]

Notification Manager for Sending Live Runtime Notifications to users about important events.

Returns:

Notification Manager for Sending Live Runtime Notifications to users about important events.

Return type:

NotificationManager

Logging

Logging

debug(message)[source]

Send a debug message to the web console:

Parameters:
  • message (int | float | PyObject | str) — Message to send to debug console
Debug(message)[source]

Send a debug message to the web console:

Parameters:
  • message (Int32 | String | Decimal | Double | PyObject) — Message to send to debug console
error(message)[source]

Send a string error message to the Console.

Parameters:
  • message (int | float | PyObject | str) — Message to display in errors grid
error(error)[source]

Send a string error message to the Console.

Parameters:
  • error (Exception) — Exception object captured from a try catch loop
Error(message)[source]

Send a string error message to the Console.

Parameters:
  • message (Int32 | String | Decimal | Double | PyObject) — Message to display in errors grid
Error(error)[source]

Send a string error message to the Console.

Parameters:
  • error (Exception) — Exception object captured from a try catch loop
log(message)[source]

Added another method for logging if user guessed.

Parameters:
  • message (int | float | PyObject | str) — String message to log.
Log(message)[source]

Added another method for logging if user guessed.

Parameters:
  • message (Int32 | String | Decimal | Double | PyObject) — String message to log.
quit(message)[source]

Terminate the algorithm after processing the current event handler.

Parameters:
  • message (PyObject | str) — Exit message to display on quitting
Quit(message)[source]

Terminate the algorithm after processing the current event handler.

Parameters:
  • message (String | PyObject) — Exit message to display on quitting
set_quit(quit)[source]

Set the Quit flag property of the algorithm.

Parameters:
  • quit (bool) — Boolean quit state
SetQuit(quit)[source]

Set the Quit flag property of the algorithm.

Parameters:
  • quit (bool) — Boolean quit state
property debug_messages[source]

Storage for debugging messages before the event handler has passed control back to the Lean Engine.

Returns:

Storage for debugging messages before the event handler has passed control back to the Lean Engine.

Return type:

List[str]

property DebugMessages[source]

Storage for debugging messages before the event handler has passed control back to the Lean Engine.

Returns:

Storage for debugging messages before the event handler has passed control back to the Lean Engine.

Return type:

ConcurrentQueue<String>

property debug_mode[source]

Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets

Returns:

Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets

Return type:

bool

property DebugMode[source]

Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets

Returns:

Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets

Return type:

bool

property error_messages[source]

List of error messages generated by the user's code calling the "Error" function.

Returns:

List of error messages generated by the user's code calling the "Error" function.

Return type:

List[str]

property ErrorMessages[source]

List of error messages generated by the user's code calling the "Error" function.

Returns:

List of error messages generated by the user's code calling the "Error" function.

Return type:

ConcurrentQueue<String>

property log_messages[source]

Storage for log messages before the event handlers have passed control back to the Lean Engine.

Returns:

Storage for log messages before the event handlers have passed control back to the Lean Engine.

Return type:

List[str]

property LogMessages[source]

Storage for log messages before the event handlers have passed control back to the Lean Engine.

Returns:

Storage for log messages before the event handlers have passed control back to the Lean Engine.

Return type:

ConcurrentQueue<String>

property run_time_error[source]

Gets the run time error from the algorithm, or null if none was encountered.

Returns:

Gets the run time error from the algorithm, or null if none was encountered.

Return type:

Exception

property RunTimeError[source]

Gets the run time error from the algorithm, or null if none was encountered.

Returns:

Gets the run time error from the algorithm, or null if none was encountered.

Return type:

Exception

Machine Learning

Machine Learning

train(date_rule, time_rule, training_code)[source]

Schedules the provided training code to execute immediately

Parameters:
  • date_rule (IDateRule) — Specifies what dates the event should run
  • time_rule (ITimeRule) — Specifies the times on those dates the event should run
  • training_code (Action | PyObject) — The training code to be invoked
Return type:

ScheduledEvent

Train(dateRule, timeRule, trainingCode)[source]

Schedules the provided training code to execute immediately

Parameters:
  • dateRule (IDateRule) — Specifies what dates the event should run
  • timeRule (ITimeRule) — Specifies the times on those dates the event should run
  • trainingCode (Action | PyObject) — The training code to be invoked
Return type:

ScheduledEvent

Modeling

Modeling

on_margin_call(requests)[source]

Margin call event handler. This method is called right before the margin call orders are placed in the market.

Parameters:
  • requests (List[SubmitOrderRequest]) — The orders to be executed to bring this algorithm within margin limits
OnMarginCall(requests)[source]

Margin call event handler. This method is called right before the margin call orders are placed in the market.

Parameters:
  • requests (List<SubmitOrderRequest>) — The orders to be executed to bring this algorithm within margin limits
on_margin_call_warning()[source]

Margin call warning event handler. This method is called when Portfolio.MarginRemaining is under 5% of your Portfolio.TotalPortfolioValue

OnMarginCallWarning()[source]

Margin call warning event handler. This method is called when Portfolio.MarginRemaining is under 5% of your Portfolio.TotalPortfolioValue

set_brokerage_message_handler(handler)[source]

Sets the implementation used to handle messages from the brokerage. The default implementation will forward messages to debug or error and when a Error occurs, the algorithm is stopped.

Parameters:
  • handler (PyObject | IBrokerageMessageHandler) — The message handler to use
SetBrokerageMessageHandler(handler)[source]

Sets the implementation used to handle messages from the brokerage. The default implementation will forward messages to debug or error and when a Error occurs, the algorithm is stopped.

Parameters:
  • handler (PyObject | IBrokerageMessageHandler) — The message handler to use
set_brokerage_model(brokerage, account_type=0)[source]

Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN

Parameters:
  • brokerage (BrokerageName) — The brokerage to emulate
  • account_type (AccountType, optional) — The account type (Cash or Margin)
set_brokerage_model(model)[source]

Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN

Parameters:
  • model (PyObject | IBrokerageModel) — The brokerage model to use
SetBrokerageModel(brokerage, accountType=0)[source]

Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN

Parameters:
  • brokerage (BrokerageName) — The brokerage to emulate
  • accountType (AccountType, optional) — The account type (Cash or Margin)
SetBrokerageModel(model)[source]

Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN

Parameters:
  • model (PyObject | IBrokerageModel) — The brokerage model to use
set_risk_free_interest_rate_model(model)[source]

Sets the risk free interest rate model to be used in the algorithm

Parameters:
  • model (IRiskFreeInterestRateModel | PyObject) — The risk free interest rate model to use
SetRiskFreeInterestRateModel(model)[source]

Sets the risk free interest rate model to be used in the algorithm

Parameters:
  • model (IRiskFreeInterestRateModel | PyObject) — The risk free interest rate model to use
property brokerage_message_handler[source]

Gets the brokerage message handler used to decide what to do with each message sent from the brokerage

Returns:

Gets the brokerage message handler used to decide what to do with each message sent from the brokerage

Return type:

IBrokerageMessageHandler

property BrokerageMessageHandler[source]

Gets the brokerage message handler used to decide what to do with each message sent from the brokerage

Returns:

Gets the brokerage message handler used to decide what to do with each message sent from the brokerage

Return type:

IBrokerageMessageHandler

property brokerage_model[source]

Gets the brokerage model - used to model interactions with specific brokerages.

Returns:

Gets the brokerage model - used to model interactions with specific brokerages.

Return type:

IBrokerageModel

property BrokerageModel[source]

Gets the brokerage model - used to model interactions with specific brokerages.

Returns:

Gets the brokerage model - used to model interactions with specific brokerages.

Return type:

IBrokerageModel

property brokerage_name[source]

Gets the brokerage name.

Returns:

Gets the brokerage name.

Return type:

BrokerageName

property BrokerageName[source]

Gets the brokerage name.

Returns:

Gets the brokerage name.

Return type:

BrokerageName

property risk_free_interest_rate_model[source]

Gets the risk free interest rate model used to get the interest rates

Returns:

Gets the risk free interest rate model used to get the interest rates

Return type:

IRiskFreeInterestRateModel

property RiskFreeInterestRateModel[source]

Gets the risk free interest rate model used to get the interest rates

Returns:

Gets the risk free interest rate model used to get the interest rates

Return type:

IRiskFreeInterestRateModel

Parameter and Optimization

Parameter and Optimization

get_parameter(name, default_value)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • name (str) — The name of the parameter to get
  • default_value (float) — The default value to return
Returns:

The value of the specified parameter, or defaultValue if not found or null if there's no default value

Return type:

float

get_parameter(name, default_value)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • name (str) — The name of the parameter to get
  • default_value (int) — The default value to return
Returns:

The value of the specified parameter, or defaultValue if not found or null if there's no default value

Return type:

int

get_parameter(name, default_value)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • name (str) — The name of the parameter to get
  • default_value (float) — The default value to return
Returns:

The value of the specified parameter, or defaultValue if not found or null if there's no default value

Return type:

float

get_parameter(name, default_value=None)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • name (str) — The name of the parameter to get
  • default_value (str, optional) — The default value to return
Returns:

The value of the specified parameter, or defaultValue if not found or null if there's no default value

Return type:

str

GetParameter(name, defaultValue)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • name (string) — The name of the parameter to get
  • defaultValue (Double) — The default value to return
Returns:

The value of the specified parameter, or defaultValue if not found or null if there's no default value

Return type:

Double

GetParameter(name, defaultValue)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • name (string) — The name of the parameter to get
  • defaultValue (Int32) — The default value to return
Returns:

The value of the specified parameter, or defaultValue if not found or null if there's no default value

Return type:

Int32

GetParameter(name, defaultValue)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • name (string) — The name of the parameter to get
  • defaultValue (decimal) — The default value to return
Returns:

The value of the specified parameter, or defaultValue if not found or null if there's no default value

Return type:

Decimal

GetParameter(name, defaultValue=None)[source]

Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null

Parameters:
  • name (string) — The name of the parameter to get
  • defaultValue (string, optional) — The default value to return
Returns:

The value of the specified parameter, or defaultValue if not found or null if there's no default value

Return type:

String

get_parameters()[source]

Gets a read-only dictionary with all current parameters

Return type:

Dict[str, str]

GetParameters()[source]

Gets a read-only dictionary with all current parameters

Return type:

IReadOnlyDictionary[String, String]

set_parameters(parameters)[source]

Sets the parameters from the dictionary

Parameters:
  • parameters (Dict[str, str]) — Dictionary containing the parameter names to values
SetParameters(parameters)[source]

Sets the parameters from the dictionary

Parameters:
  • parameters (Dictionary<String, String>) — Dictionary containing the parameter names to values

Scheduled Events

Scheduled Events

property date_rules[source]

Gets the date rules helper object to make specifying dates for events easier

Returns:

Gets the date rules helper object to make specifying dates for events easier

Return type:

DateRules

property DateRules[source]

Gets the date rules helper object to make specifying dates for events easier

Returns:

Gets the date rules helper object to make specifying dates for events easier

Return type:

DateRules

property schedule[source]

Gets schedule manager for adding/removing scheduled events

Returns:

Gets schedule manager for adding/removing scheduled events

Return type:

ScheduleManager

property Schedule[source]

Gets schedule manager for adding/removing scheduled events

Returns:

Gets schedule manager for adding/removing scheduled events

Return type:

ScheduleManager

property time_rules[source]

Gets the time rules helper object to make specifying times for events easier

Returns:

Gets the time rules helper object to make specifying times for events easier

Return type:

TimeRules

property TimeRules[source]

Gets the time rules helper object to make specifying times for events easier

Returns:

Gets the time rules helper object to make specifying times for events easier

Return type:

TimeRules

property trading_calendar[source]

Gets trading calendar populated with trading events

Returns:

Gets trading calendar populated with trading events

Return type:

TradingCalendar

property TradingCalendar[source]

Gets trading calendar populated with trading events

Returns:

Gets trading calendar populated with trading events

Return type:

TradingCalendar

Securities and Portfolio

Securities and Portfolio

set_account_currency(account_currency, starting_cash=None)[source]

Sets the account currency cash symbol this algorithm is to manage, as well as the starting cash in this currency if given

Parameters:
  • account_currency (str) — The account currency cash symbol to set
  • starting_cash (float, optional) — The account currency starting cash to set
SetAccountCurrency(accountCurrency, startingCash=None)[source]

Sets the account currency cash symbol this algorithm is to manage, as well as the starting cash in this currency if given

Parameters:
  • accountCurrency (string) — The account currency cash symbol to set
  • startingCash (decimal, optional) — The account currency starting cash to set
set_cash(symbol, starting_cash, conversion_rate=0.0)[source]

Set initial cash for the strategy while backtesting. During live mode this value is ignored and replaced with the actual cash of your brokerage account.

Parameters:
  • symbol (str) — The cash symbol to set
  • starting_cash (int | float) — Decimal cash value of portfolio
  • conversion_rate (float, optional) — The current conversion rate for the
SetCash(symbol, startingCash, conversionRate=0.0)[source]

Set initial cash for the strategy while backtesting. During live mode this value is ignored and replaced with the actual cash of your brokerage account.

Parameters:
  • symbol (string) — The cash symbol to set
  • startingCash (Double | Decimal | Int32) — Decimal cash value of portfolio
  • conversionRate (decimal, optional) — The current conversion rate for the
property account_currency[source]

Gets the account currency

Returns:

Gets the account currency

Return type:

str

property AccountCurrency[source]

Gets the account currency

Returns:

Gets the account currency

Return type:

string

property active_securities[source]

Read-only dictionary containing all active securities. An active security is a security that is currently selected by the universe or has holdings or open orders.

Returns:

Read-only dictionary containing all active securities. An active security is a security that is currently selected by the universe or has holdings or open orders.

Return type:

Dict[Symbol, Security]

property ActiveSecurities[source]

Read-only dictionary containing all active securities. An active security is a security that is currently selected by the universe or has holdings or open orders.

Returns:

Read-only dictionary containing all active securities. An active security is a security that is currently selected by the universe or has holdings or open orders.

Return type:

IReadOnlyDictionary<Symbol, Security>

property portfolio[source]

Portfolio object provieds easy access to the underlying security-holding properties; summed together in a way to make them useful. This saves the user time by providing common portfolio requests in a single

Returns:

Portfolio object provieds easy access to the underlying security-holding properties; summed together in a way to make them useful. This saves the user time by providing common portfolio requests in a single

Return type:

SecurityPortfolioManager

property Portfolio[source]

Portfolio object provieds easy access to the underlying security-holding properties; summed together in a way to make them useful. This saves the user time by providing common portfolio requests in a single

Returns:

Portfolio object provieds easy access to the underlying security-holding properties; summed together in a way to make them useful. This saves the user time by providing common portfolio requests in a single

Return type:

SecurityPortfolioManager

property securities[source]

Security collection is an array of the security objects such as Equities and FOREX. Securities data manages the properties of tradeable assets such as price, open and close time and holdings information.

Returns:

Security collection is an array of the security objects such as Equities and FOREX. Securities data manages the properties of tradeable assets such as price, open and close time and holdings information.

Return type:

SecurityManager

property Securities[source]

Security collection is an array of the security objects such as Equities and FOREX. Securities data manages the properties of tradeable assets such as price, open and close time and holdings information.

Returns:

Security collection is an array of the security objects such as Equities and FOREX. Securities data manages the properties of tradeable assets such as price, open and close time and holdings information.

Return type:

SecurityManager

property signal_export[source]

SignalExport - Allows sending export signals to different 3rd party API's. For example, it allows to send signals to Collective2, CrunchDAO and Numerai API's

Returns:

SignalExport - Allows sending export signals to different 3rd party API's. For example, it allows to send signals to Collective2, CrunchDAO and Numerai API's

Return type:

SignalExportManager

property SignalExport[source]

SignalExport - Allows sending export signals to different 3rd party API's. For example, it allows to send signals to Collective2, CrunchDAO and Numerai API's

Returns:

SignalExport - Allows sending export signals to different 3rd party API's. For example, it allows to send signals to Collective2, CrunchDAO and Numerai API's

Return type:

SignalExportManager

Statistics

Statistics

set_summary_statistic(name, value)[source]

Set a custom summary statistic for the algorithm.

Parameters:
  • name (str) — Name of the custom summary statistic
  • value (int | float | str) — Value of the custom summary statistic
SetSummaryStatistic(name, value)[source]

Set a custom summary statistic for the algorithm.

Parameters:
  • name (string) — Name of the custom summary statistic
  • value (String | Double | Decimal | Int32) — Value of the custom summary statistic
property statistics[source]

The current statistics for the running algorithm.

Returns:

The current statistics for the running algorithm.

Return type:

StatisticsResults

property Statistics[source]

The current statistics for the running algorithm.

Returns:

The current statistics for the running algorithm.

Return type:

StatisticsResults

Trading and Orders

Trading and Orders

buy(strategy, quantity, asynchronous=False, tag=, order_properties=None)[source]

Buy Stock (Alias of Order)

Parameters:
  • strategy (OptionStrategy) — Specification of the strategy to trade
  • quantity (int) — Quantity of the strategy to trade
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

Sequence of order tickets

Return type:

List[OrderTicket]

buy(symbol, quantity)[source]

Buy Stock (Alias of Order)

Parameters:
  • symbol (Symbol) — string Symbol of the asset to trade
  • quantity (int | float) — int Quantity of the asset to trade
Returns:

The order ticket instance.

Return type:

OrderTicket

Buy(strategy, quantity, asynchronous=False, tag=, orderProperties=None)[source]

Buy Stock (Alias of Order)

Parameters:
  • strategy (OptionStrategy) — Specification of the strategy to trade
  • quantity (Int32) — Quantity of the strategy to trade
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

Sequence of order tickets

Return type:

IEnumerable[OrderTicket]

Buy(symbol, quantity)[source]

Buy Stock (Alias of Order)

Parameters:
  • symbol (Symbol) — string Symbol of the asset to trade
  • quantity (Double | Single | Decimal | Int32) — int Quantity of the asset to trade
Returns:

The order ticket instance.

Return type:

OrderTicket

calculate_order_quantity(symbol, target)[source]

Calculate the order quantity to achieve target-percent holdings.

Parameters:
  • symbol (Symbol) — Security object we're asking for
  • target (float) — Target percentage holdings
Returns:

Order quantity to achieve this percentage

Return type:

float

CalculateOrderQuantity(symbol, target)[source]

Calculate the order quantity to achieve target-percent holdings.

Parameters:
  • symbol (Symbol) — Security object we're asking for
  • target (Double | Decimal) — Target percentage holdings
Returns:

Order quantity to achieve this percentage

Return type:

Decimal

combo_leg_limit_order(legs, quantity, tag=, order_properties=None)[source]

Issue a combo leg limit order/trade for multiple assets, each having its own limit price.

Parameters:
  • legs (List[Leg]) — The list of legs the order consists of
  • quantity (int) — The total quantity for the order
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

Sequence of order tickets, one for each leg

Return type:

List[OrderTicket]

ComboLegLimitOrder(legs, quantity, tag=, orderProperties=None)[source]

Issue a combo leg limit order/trade for multiple assets, each having its own limit price.

Parameters:
  • legs (List<Leg>) — The list of legs the order consists of
  • quantity (Int32) — The total quantity for the order
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

Sequence of order tickets, one for each leg

Return type:

List[OrderTicket]

combo_limit_order(legs, quantity, limit_price, tag=, order_properties=None)[source]

Issue a combo limit order/trade for multiple assets. A single limit price is defined for the combo order and will fill only if the sum of the assets price compares properly to the limit price, depending on the direction.

Parameters:
  • legs (List[Leg]) — The list of legs the order consists of
  • quantity (int) — The total quantity for the order
  • limit_price (float) — The compound limit price to use for a ComboLimit order. This limit price will compared to the sum of the assets price in order to fill the order.
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

Sequence of order tickets, one for each leg

Return type:

List[OrderTicket]

ComboLimitOrder(legs, quantity, limitPrice, tag=, orderProperties=None)[source]

Issue a combo limit order/trade for multiple assets. A single limit price is defined for the combo order and will fill only if the sum of the assets price compares properly to the limit price, depending on the direction.

Parameters:
  • legs (List<Leg>) — The list of legs the order consists of
  • quantity (Int32) — The total quantity for the order
  • limitPrice (decimal) — The compound limit price to use for a ComboLimit order. This limit price will compared to the sum of the assets price in order to fill the order.
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

Sequence of order tickets, one for each leg

Return type:

List[OrderTicket]

combo_market_order(legs, quantity, asynchronous=False, tag=, order_properties=None)[source]

Issue a combo market order/trade for multiple assets

Parameters:
  • legs (List[Leg]) — The list of legs the order consists of
  • quantity (int) — The total quantity for the order
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

Sequence of order tickets, one for each leg

Return type:

List[OrderTicket]

ComboMarketOrder(legs, quantity, asynchronous=False, tag=, orderProperties=None)[source]

Issue a combo market order/trade for multiple assets

Parameters:
  • legs (List<Leg>) — The list of legs the order consists of
  • quantity (Int32) — The total quantity for the order
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

Sequence of order tickets, one for each leg

Return type:

List[OrderTicket]

exercise_option(option_symbol, quantity, asynchronous=False, tag=, order_properties=None)[source]

Send an exercise order to the transaction handler

Parameters:
  • option_symbol (Symbol) — String symbol for the option position
  • quantity (int) — Quantity of options contracts
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

ExerciseOption(optionSymbol, quantity, asynchronous=False, tag=, orderProperties=None)[source]

Send an exercise order to the transaction handler

Parameters:
  • optionSymbol (Symbol) — String symbol for the option position
  • quantity (Int32) — Quantity of options contracts
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

is_market_open(symbol)[source]

Determines if the exchange for the specified symbol is open at the current time.

Parameters:
  • symbol (Symbol) — The symbol
Returns:

True if the exchange is considered open at the current time, false otherwise

Return type:

bool

IsMarketOpen(symbol)[source]

Determines if the exchange for the specified symbol is open at the current time.

Parameters:
  • symbol (Symbol) — The symbol
Returns:

True if the exchange is considered open at the current time, false otherwise

Return type:

Boolean

limit_if_touched_order(symbol, quantity, trigger_price, limit_price, tag=, order_properties=None)[source]

Send a limit if touched order to the transaction handler:

Parameters:
  • symbol (Symbol) — String symbol for the asset
  • quantity (int | float) — Quantity of shares for limit order
  • trigger_price (float) — Trigger price for this order
  • limit_price (float) — Limit price to fill this order
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

LimitIfTouchedOrder(symbol, quantity, triggerPrice, limitPrice, tag=, orderProperties=None)[source]

Send a limit if touched order to the transaction handler:

Parameters:
  • symbol (Symbol) — String symbol for the asset
  • quantity (Double | Decimal | Int32) — Quantity of shares for limit order
  • triggerPrice (decimal) — Trigger price for this order
  • limitPrice (decimal) — Limit price to fill this order
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

limit_order(symbol, quantity, limit_price, tag=, order_properties=None)[source]

Send a limit order to the transaction handler:

Parameters:
  • symbol (Symbol) — String symbol for the asset
  • quantity (int | float) — Quantity of shares for limit order
  • limit_price (float) — Limit price to fill this order
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

LimitOrder(symbol, quantity, limitPrice, tag=, orderProperties=None)[source]

Send a limit order to the transaction handler:

Parameters:
  • symbol (Symbol) — String symbol for the asset
  • quantity (Double | Decimal | Int32) — Quantity of shares for limit order
  • limitPrice (decimal) — Limit price to fill this order
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

liquidate(symbol_to_liquidate=None, tag=Liquidated)[source]

Liquidate all holdings and cancel open orders. Called at the end of day for tick-strategies.

Parameters:
  • symbol_to_liquidate (Symbol, optional) — Symbols we wish to liquidate
  • tag (str, optional) — Custom tag to know who is calling this.
Returns:

Array of order ids for liquidated symbols

Return type:

List[int]

Liquidate(symbolToLiquidate=None, tag=Liquidated)[source]

Liquidate all holdings and cancel open orders. Called at the end of day for tick-strategies.

Parameters:
  • symbolToLiquidate (Symbol, optional) — Symbols we wish to liquidate
  • tag (string, optional) — Custom tag to know who is calling this.
Returns:

Array of order ids for liquidated symbols

Return type:

List[Int32]

market_on_close_order(symbol, quantity, tag=, order_properties=None)[source]

Market on close order implementation: Send a market order when the exchange closes

Parameters:
  • symbol (Symbol) — The symbol to be ordered
  • quantity (int | float) — The number of shares to required
  • tag (str, optional) — Place a custom order property or tag (e.g. indicator data).
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

MarketOnCloseOrder(symbol, quantity, tag=, orderProperties=None)[source]

Market on close order implementation: Send a market order when the exchange closes

Parameters:
  • symbol (Symbol) — The symbol to be ordered
  • quantity (Double | Decimal | Int32) — The number of shares to required
  • tag (string, optional) — Place a custom order property or tag (e.g. indicator data).
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

market_on_open_order(symbol, quantity, tag=, order_properties=None)[source]

Market on open order implementation: Send a market order when the exchange opens

Parameters:
  • symbol (Symbol) — The symbol to be ordered
  • quantity (int | float) — The number of shares to required
  • tag (str, optional) — Place a custom order property or tag (e.g. indicator data).
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

MarketOnOpenOrder(symbol, quantity, tag=, orderProperties=None)[source]

Market on open order implementation: Send a market order when the exchange opens

Parameters:
  • symbol (Symbol) — The symbol to be ordered
  • quantity (Double | Decimal | Int32) — The number of shares to required
  • tag (string, optional) — Place a custom order property or tag (e.g. indicator data).
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

market_order(symbol, quantity, asynchronous=False, tag=, order_properties=None)[source]

Market order implementation: Send a market order and wait for it to be filled.

Parameters:
  • symbol (Symbol) — Symbol of the MarketType Required.
  • quantity (int | float) — Number of shares to request.
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (str, optional) — Place a custom order property or tag (e.g. indicator data).
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

market_order(security, quantity, asynchronous=False, tag=, order_properties=None)[source]

Market order implementation: Send a market order and wait for it to be filled.

Parameters:
  • security (Security) — Symbol of the MarketType Required.
  • quantity (float) — Number of shares to request.
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (str, optional) — Place a custom order property or tag (e.g. indicator data).
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

MarketOrder(symbol, quantity, asynchronous=False, tag=, orderProperties=None)[source]

Market order implementation: Send a market order and wait for it to be filled.

Parameters:
  • symbol (Symbol) — Symbol of the MarketType Required.
  • quantity (Double | Decimal | Int32) — Number of shares to request.
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (string, optional) — Place a custom order property or tag (e.g. indicator data).
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

MarketOrder(security, quantity, asynchronous=False, tag=, orderProperties=None)[source]

Market order implementation: Send a market order and wait for it to be filled.

Parameters:
  • security (Security) — Symbol of the MarketType Required.
  • quantity (decimal) — Number of shares to request.
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (string, optional) — Place a custom order property or tag (e.g. indicator data).
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

on_assignment_order_event(assignment_event)[source]

Option assignment event handler. On an option assignment event for short legs the resulting information is passed to this method.

Parameters:
  • assignment_event (OrderEvent) — Option exercise event details containing details of the assignment
OnAssignmentOrderEvent(assignmentEvent)[source]

Option assignment event handler. On an option assignment event for short legs the resulting information is passed to this method.

Parameters:
  • assignmentEvent (OrderEvent) — Option exercise event details containing details of the assignment
on_order_event(order_event)[source]

Order fill event handler. On an order fill update the resulting information is passed to this method.

Parameters:
  • order_event (OrderEvent) — Order event details containing details of the events
OnOrderEvent(orderEvent)[source]

Order fill event handler. On an order fill update the resulting information is passed to this method.

Parameters:
  • orderEvent (OrderEvent) — Order event details containing details of the events
order(strategy, quantity, asynchronous=False, tag=, order_properties=None)[source]

Issue an order/trade for asset: Alias wrapper for Order(string, int);

Parameters:
  • strategy (OptionStrategy) — Specification of the strategy to trade
  • quantity (int) — Quantity of the strategy to trade
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

Sequence of order tickets

Return type:

List[OrderTicket]

order(symbol, quantity, asynchronous=False, tag=, order_properties=None)[source]

Issue an order/trade for asset: Alias wrapper for Order(string, int);

Parameters:
  • symbol (Symbol) — Symbol of the MarketType Required.
  • quantity (int | float) — Number of shares to request.
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (str, optional) — Place a custom order property or tag (e.g. indicator data).
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

Order(strategy, quantity, asynchronous=False, tag=, orderProperties=None)[source]

Issue an order/trade for asset: Alias wrapper for Order(string, int);

Parameters:
  • strategy (OptionStrategy) — Specification of the strategy to trade
  • quantity (Int32) — Quantity of the strategy to trade
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

Sequence of order tickets

Return type:

IEnumerable[OrderTicket]

Order(symbol, quantity, asynchronous=False, tag=, orderProperties=None)[source]

Issue an order/trade for asset: Alias wrapper for Order(string, int);

Parameters:
  • symbol (Symbol) — Symbol of the MarketType Required.
  • quantity (Double | Decimal | Int32) — Number of shares to request.
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (string, optional) — Place a custom order property or tag (e.g. indicator data).
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

sell(strategy, quantity, asynchronous=False, tag=, order_properties=None)[source]

Sell stock (alias of Order)

Parameters:
  • strategy (OptionStrategy) — Specification of the strategy to trade
  • quantity (int) — Quantity of the strategy to trade
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

Sequence of order tickets

Return type:

List[OrderTicket]

sell(symbol, quantity)[source]

Sell stock (alias of Order)

Parameters:
  • symbol (Symbol) — string Symbol of the asset to trade
  • quantity (int | float) — int Quantity of the asset to trade
Returns:

The order ticket instance.

Return type:

OrderTicket

Sell(strategy, quantity, asynchronous=False, tag=, orderProperties=None)[source]

Sell stock (alias of Order)

Parameters:
  • strategy (OptionStrategy) — Specification of the strategy to trade
  • quantity (Int32) — Quantity of the strategy to trade
  • asynchronous (bool, optional) — Send the order asynchronously (false). Otherwise we'll block until it fills
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

Sequence of order tickets

Return type:

IEnumerable[OrderTicket]

Sell(symbol, quantity)[source]

Sell stock (alias of Order)

Parameters:
  • symbol (Symbol) — string Symbol of the asset to trade
  • quantity (Double | Decimal | Int32 | Single) — int Quantity of the asset to trade
Returns:

The order ticket instance.

Return type:

OrderTicket

set_benchmark(benchmark)[source]

Sets the benchmark used for computing statistics of the algorithm to the specified symbol

Parameters:
  • benchmark (Callable[datetime, float] | PyObject) — The benchmark producing function
set_benchmark(ticker)[source]

Sets the benchmark used for computing statistics of the algorithm to the specified symbol

Parameters:
  • ticker (str) — Ticker to use as the benchmark
set_benchmark(symbol)[source]

Sets the benchmark used for computing statistics of the algorithm to the specified symbol

Parameters:
  • symbol (Symbol) — symbol to use as the benchmark
SetBenchmark(benchmark)[source]

Sets the benchmark used for computing statistics of the algorithm to the specified symbol

Parameters:
  • benchmark (Func[DateTime, Decimal] | PyObject) — The benchmark producing function
SetBenchmark(ticker)[source]

Sets the benchmark used for computing statistics of the algorithm to the specified symbol

Parameters:
  • ticker (string) — Ticker to use as the benchmark
SetBenchmark(symbol)[source]

Sets the benchmark used for computing statistics of the algorithm to the specified symbol

Parameters:
  • symbol (Symbol) — symbol to use as the benchmark
set_holdings(symbol, percentage, liquidate_existing_holdings=False, tag=, order_properties=None)[source]

Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin.

Parameters:
  • symbol (Symbol) — string symbol we wish to hold
  • percentage (int | float) — double percentage of holdings desired
  • liquidate_existing_holdings (bool, optional) — liquidate existing holdings if necessary to hold this stock
  • tag (str, optional) — Tag the order with a short string.
  • order_properties (IOrderProperties, optional)
set_holdings(targets, liquidate_existing_holdings=False, tag=, order_properties=None)[source]

Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin.

Parameters:
  • targets (List[PortfolioTarget]) — The portfolio desired quantities as percentages
  • liquidate_existing_holdings (bool, optional) — True will liquidate existing holdings
  • tag (str, optional) — Tag the order with a short string.
  • order_properties (IOrderProperties, optional)
SetHoldings(symbol, percentage, liquidateExistingHoldings=False, tag=, orderProperties=None)[source]

Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin.

Parameters:
  • symbol (Symbol) — string symbol we wish to hold
  • percentage (Double | Decimal | Int32 | Single) — double percentage of holdings desired
  • liquidateExistingHoldings (bool, optional) — liquidate existing holdings if necessary to hold this stock
  • tag (string, optional) — Tag the order with a short string.
  • orderProperties (IOrderProperties, optional)
SetHoldings(targets, liquidateExistingHoldings=False, tag=, orderProperties=None)[source]

Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin.

Parameters:
  • targets (List<PortfolioTarget>) — The portfolio desired quantities as percentages
  • liquidateExistingHoldings (bool, optional) — True will liquidate existing holdings
  • tag (string, optional) — Tag the order with a short string.
  • orderProperties (IOrderProperties, optional)
set_maximum_orders(max)[source]

Maximum number of orders for the algorithm

Parameters:
  • max (int)
SetMaximumOrders(max)[source]

Maximum number of orders for the algorithm

Parameters:
  • max (Int32)
set_trade_builder(trade_builder)[source]

Set the ITradeBuilder implementation to generate trades from executions and market price updates

Parameters:
  • trade_builder (ITradeBuilder)
SetTradeBuilder(tradeBuilder)[source]

Set the ITradeBuilder implementation to generate trades from executions and market price updates

Parameters:
  • tradeBuilder (ITradeBuilder)
shortable(symbol, short_quantity, update_order_id=None)[source]

Determines if the Symbol is shortable at the brokerage

Parameters:
  • symbol (Symbol) — Symbol to check if shortable
  • short_quantity (float) — Order's quantity to check if it is currently shortable, taking into account current holdings and open orders
  • update_order_id (int, optional) — Optionally the id of the order being updated. When updating an order we want to ignore it's submitted short quantity and use the new provided quantity to determine if we can perform the update
Returns:

True if the symbol can be shorted by the requested quantity

Return type:

bool

Shortable(symbol, shortQuantity, updateOrderId=None)[source]

Determines if the Symbol is shortable at the brokerage

Parameters:
  • symbol (Symbol) — Symbol to check if shortable
  • shortQuantity (decimal) — Order's quantity to check if it is currently shortable, taking into account current holdings and open orders
  • updateOrderId (Int32, optional) — Optionally the id of the order being updated. When updating an order we want to ignore it's submitted short quantity and use the new provided quantity to determine if we can perform the update
Returns:

True if the symbol can be shorted by the requested quantity

Return type:

Boolean

shortable_quantity(symbol)[source]

Gets the quantity shortable for the given asset

Parameters:
Returns:

Quantity shortable for the given asset. Zero if not shortable, or a number greater than zero if shortable.

Return type:

int

ShortableQuantity(symbol)[source]

Gets the quantity shortable for the given asset

Parameters:
Returns:

Quantity shortable for the given asset. Zero if not shortable, or a number greater than zero if shortable.

Return type:

Int64

stop_limit_order(symbol, quantity, stop_price, limit_price, tag=, order_properties=None)[source]

Send a stop limit order to the transaction handler:

Parameters:
  • symbol (Symbol) — String symbol for the asset
  • quantity (int | float) — Quantity of shares for limit order
  • stop_price (float) — Stop price for this order
  • limit_price (float) — Limit price to fill this order
  • tag (str, optional) — String tag for the order (optional)
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

StopLimitOrder(symbol, quantity, stopPrice, limitPrice, tag=, orderProperties=None)[source]

Send a stop limit order to the transaction handler:

Parameters:
  • symbol (Symbol) — String symbol for the asset
  • quantity (Double | Decimal | Int32) — Quantity of shares for limit order
  • stopPrice (decimal) — Stop price for this order
  • limitPrice (decimal) — Limit price to fill this order
  • tag (string, optional) — String tag for the order (optional)
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

stop_market_order(symbol, quantity, stop_price, tag=, order_properties=None)[source]

Create a stop market order and return the newly created order id; or negative if the order is invalid

Parameters:
  • symbol (Symbol) — String symbol for the asset we're trading
  • quantity (int | float) — Quantity to be traded
  • stop_price (float) — Price to fill the stop order
  • tag (str, optional) — Optional string data tag for the order
  • order_properties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

StopMarketOrder(symbol, quantity, stopPrice, tag=, orderProperties=None)[source]

Create a stop market order and return the newly created order id; or negative if the order is invalid

Parameters:
  • symbol (Symbol) — String symbol for the asset we're trading
  • quantity (Double | Decimal | Int32) — Quantity to be traded
  • stopPrice (decimal) — Price to fill the stop order
  • tag (string, optional) — Optional string data tag for the order
  • orderProperties (IOrderProperties, optional)
Returns:

The order ticket instance.

Return type:

OrderTicket

submit_order_request(request)[source]

Will submit an order request to the algorithm

Parameters:
Returns:

The order ticket

Return type:

OrderTicket

SubmitOrderRequest(request)[source]

Will submit an order request to the algorithm

Parameters:
Returns:

The order ticket

Return type:

OrderTicket

trailing_stop_order(symbol, quantity, stop_price, trailing_amount, trailing_as_percentage, tag=, order_properties=None)[source]

Create a trailing stop order and return the newly created order id; or negative if the order is invalid. It will calculate the stop price using the trailing amount and the current market price.

Parameters:
  • symbol (Symbol) — Trading asset symbol
  • quantity (int | float) — Quantity to be traded
  • stop_price (float) — Initial stop price at which the order should be triggered
  • trailing_amount (float) — The trailing amount to be used to update the stop price
  • trailing_as_percentage (bool) — is a percentage or an absolute currency value
  • tag (str, optional) — is a percentage or an absolute currency value
  • order_properties (IOrderProperties, optional) — Optional string data tag for the order
Returns:

The order ticket instance.

Return type:

OrderTicket

TrailingStopOrder(symbol, quantity, stopPrice, trailingAmount, trailingAsPercentage, tag=, orderProperties=None)[source]

Create a trailing stop order and return the newly created order id; or negative if the order is invalid. It will calculate the stop price using the trailing amount and the current market price.

Parameters:
  • symbol (Symbol) — Trading asset symbol
  • quantity (Double | Decimal | Int32) — Quantity to be traded
  • stopPrice (decimal) — Initial stop price at which the order should be triggered
  • trailingAmount (decimal) — The trailing amount to be used to update the stop price
  • trailingAsPercentage (bool) — is a percentage or an absolute currency value
  • tag (string, optional) — is a percentage or an absolute currency value
  • orderProperties (IOrderProperties, optional) — Optional string data tag for the order
Returns:

The order ticket instance.

Return type:

OrderTicket

property benchmark[source]

Benchmark

Returns:

Benchmark

Return type:

IBenchmark

property Benchmark[source]

Benchmark

Returns:

Benchmark

Return type:

IBenchmark

property default_order_properties[source]

Gets the default order properties

Returns:

Gets the default order properties

Return type:

IOrderProperties

property DefaultOrderProperties[source]

Gets the default order properties

Returns:

Gets the default order properties

Return type:

IOrderProperties

property trade_builder[source]

Gets the Trade Builder to generate trades from executions

Returns:

Gets the Trade Builder to generate trades from executions

Return type:

ITradeBuilder

property TradeBuilder[source]

Gets the Trade Builder to generate trades from executions

Returns:

Gets the Trade Builder to generate trades from executions

Return type:

ITradeBuilder

property transactions[source]

Transaction Manager - Process transaction fills and order management.

Returns:

Transaction Manager - Process transaction fills and order management.

Return type:

SecurityTransactionManager

property Transactions[source]

Transaction Manager - Process transaction fills and order management.

Returns:

Transaction Manager - Process transaction fills and order management.

Return type:

SecurityTransactionManager

Universes

Universes

add_universe(t, security_type, name, resolution, market, universe_settings, selector)[source]

Adds a new universe selection model

Parameters:
  • t (PyObject) — The data type
  • security_type (SecurityType) — The security type the universe produces
  • name (str) — A unique name for this universe
  • resolution (Optional[Resolution] | Resolution) — The expected resolution of the universe data
  • market (str) — The market for selected symbols
  • universe_settings (UniverseSettings) — The subscription settings to use for newly created subscriptions
  • selector (List[BaseData, Symbol] | List[Fundamental, Symbol] | List[datetime, str] | List[BaseData, str] | PyObject) — Function delegate that performs selection on the universe data
Return type:

Universe

add_universe(data_type, security_type, name, resolution, market, universe_settings, py_selector)[source]

Adds a new universe selection model

Parameters:
  • data_type (Type) — The data type
  • security_type (SecurityType | Optional[SecurityType]) — The security type the universe produces
  • name (str) — A unique name for this universe
  • resolution (Optional[Resolution] | Resolution) — The expected resolution of the universe data
  • market (str) — The market for selected symbols
  • universe_settings (UniverseSettings) — The subscription settings to use for newly created subscriptions
  • py_selector (PyObject) — Function delegate that performs selection on the universe data
Return type:

Universe

add_universe(date_rule, selector)[source]

Adds a new universe selection model

Parameters:
  • date_rule (IDateRule)
  • selector (List[BaseData, Symbol] | List[Fundamental, Symbol] | List[BaseData, str]) — Defines an initial coarse selection
Return type:

Universe

add_universe(coarse_selector, fine_selector)[source]

Adds a new universe selection model

Parameters:
  • coarse_selector (Callable[List[CoarseFundamental], List[Symbol]]) — Defines an initial coarse selection
  • fine_selector (Callable[List[FineFundamental], List[Symbol]]) — Defines a more detailed selection with access to more data
Return type:

Universe

add_universe(universe, fine_selector)[source]

Adds a new universe selection model

Parameters:
  • universe (Universe) — The universe to be filtered with fine fundamental selection
  • fine_selector (Callable[List[Fundamental], List[Symbol]]) — Defines a more detailed selection with access to more data
Return type:

Universe

add_universe(py_object, pyfine)[source]

Adds a new universe selection model

Parameters:
  • py_object (PyObject) — Defines an initial coarse selection or a universe
  • pyfine (PyObject) — Defines a more detailed selection with access to more data
Return type:

Universe

AddUniverse(T, securityType, name, resolution, market, universeSettings, selector)[source]

Adds a new universe selection model

Parameters:
  • T (PyObject) — The data type
  • securityType (SecurityType) — The security type the universe produces
  • name (String) — A unique name for this universe
  • resolution (Nullable[Resolution] | Resolution) — The expected resolution of the universe data
  • market (String) — The market for selected symbols
  • universeSettings (UniverseSettings) — The subscription settings to use for newly created subscriptions
  • selector (IEnumerable[BaseData, String] | IEnumerable[BaseData, Symbol] | IEnumerable[DateTime, String] | IEnumerable[Fundamental, Symbol] | PyObject) — Function delegate that performs selection on the universe data
Return type:

Universe

AddUniverse(dataType, securityType, name, resolution, market, universeSettings, pySelector)[source]

Adds a new universe selection model

Parameters:
  • dataType (Type) — The data type
  • securityType (SecurityType | Nullable[SecurityType]) — The security type the universe produces
  • name (String) — A unique name for this universe
  • resolution (Nullable[Resolution] | Resolution) — The expected resolution of the universe data
  • market (String) — The market for selected symbols
  • universeSettings (UniverseSettings) — The subscription settings to use for newly created subscriptions
  • pySelector (PyObject) — Function delegate that performs selection on the universe data
Return type:

Universe

AddUniverse(dateRule, selector)[source]

Adds a new universe selection model

Parameters:
  • dateRule (IDateRule)
  • selector (IEnumerable[BaseData, Symbol] | IEnumerable[BaseData, String] | IEnumerable[Fundamental, Symbol]) — Defines an initial coarse selection
Return type:

Universe

AddUniverse(coarseSelector, fineSelector)[source]

Adds a new universe selection model

Parameters:
  • coarseSelector (Func<IEnumerable<CoarseFundamental>, IEnumerable<Symbol>>) — Defines an initial coarse selection
  • fineSelector (Func<IEnumerable<FineFundamental>, IEnumerable<Symbol>>) — Defines a more detailed selection with access to more data
Return type:

Universe

AddUniverse(universe, fineSelector)[source]

Adds a new universe selection model

Parameters:
  • universe (Universe) — The universe to be filtered with fine fundamental selection
  • fineSelector (Func<IEnumerable<Fundamental>, IEnumerable<Symbol>>) — Defines a more detailed selection with access to more data
Return type:

Universe

AddUniverse(pyObject, pyfine)[source]

Adds a new universe selection model

Parameters:
  • pyObject (PyObject) — Defines an initial coarse selection or a universe
  • pyfine (PyObject) — Defines a more detailed selection with access to more data
Return type:

Universe

add_universe_options(underlying_symbol, option_filter)[source]

Creates a new universe selection model and adds it to the algorithm. This universe selection model will chain to the security changes of a given Universe selection output and create a new OptionChainUniverse for each of them

Parameters:
  • underlying_symbol (Symbol) — Underlying Symbol to add as an option. For Futures, the option chain constructed will be per-contract, as long as a canonical Symbol is provided.
  • option_filter (Callable[OptionFilterUniverse, OptionFilterUniverse]) — User-defined filter used to select the options we want out of the option chain provided.
add_universe_options(universe, option_filter)[source]

Creates a new universe selection model and adds it to the algorithm. This universe selection model will chain to the security changes of a given Universe selection output and create a new OptionChainUniverse for each of them

Parameters:
  • universe (PyObject | Universe) — The universe we want to chain an option universe selection model too
  • option_filter (Callable[OptionFilterUniverse, OptionFilterUniverse] | PyObject) — The option filter universe to use
AddUniverseOptions(underlyingSymbol, optionFilter)[source]

Creates a new universe selection model and adds it to the algorithm. This universe selection model will chain to the security changes of a given Universe selection output and create a new OptionChainUniverse for each of them

Parameters:
  • underlyingSymbol (Symbol) — Underlying Symbol to add as an option. For Futures, the option chain constructed will be per-contract, as long as a canonical Symbol is provided.
  • optionFilter (Func<OptionFilterUniverse, OptionFilterUniverse>) — User-defined filter used to select the options we want out of the option chain provided.
AddUniverseOptions(universe, optionFilter)[source]

Creates a new universe selection model and adds it to the algorithm. This universe selection model will chain to the security changes of a given Universe selection output and create a new OptionChainUniverse for each of them

Parameters:
  • universe (PyObject | Universe) — The universe we want to chain an option universe selection model too
  • optionFilter (PyObject | Func[OptionFilterUniverse, OptionFilterUniverse]) — The option filter universe to use
property universe[source]

Gets a helper that provides pre-defined universe definitions, such as top dollar volume

Returns:

Gets a helper that provides pre-defined universe definitions, such as top dollar volume

Return type:

UniverseDefinitions

property Universe[source]

Gets a helper that provides pre-defined universe definitions, such as top dollar volume

Returns:

Gets a helper that provides pre-defined universe definitions, such as top dollar volume

Return type:

UniverseDefinitions

property universe_manager[source]

Gets universe manager which holds universes keyed by their symbol

Returns:

Gets universe manager which holds universes keyed by their symbol

Return type:

UniverseManager

property UniverseManager[source]

Gets universe manager which holds universes keyed by their symbol

Returns:

Gets universe manager which holds universes keyed by their symbol

Return type:

UniverseManager

property universe_settings[source]

Gets the universe settings to be used when adding securities via universe selection

Returns:

Gets the universe settings to be used when adding securities via universe selection

Return type:

UniverseSettings

property UniverseSettings[source]

Gets the universe settings to be used when adding securities via universe selection

Returns:

Gets the universe settings to be used when adding securities via universe selection

Return type:

UniverseSettings

Types

AbandonedBaby

class QuantConnect.Indicators.CandlestickPatterns.AbandonedBaby[source]

Abandoned Baby candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

AbandonedBaby

class QuantConnect.Indicators.CandlestickPatterns.AbandonedBaby[source]

Abandoned Baby candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

AccountType

enum QuantConnect.AccountType[source]

Account type: margin or cash

field CASH

Cash account type (1)

Returns:

Cash account type (1)

Return type:

AccountType

field MARGIN

Margin account type (0)

Returns:

Margin account type (0)

Return type:

AccountType

AccountType

enum QuantConnect.AccountType[source]

Account type: margin or cash

field Cash

Cash account type (1)

Returns:

Cash account type (1)

Return type:

AccountType

field Margin

Margin account type (0)

Returns:

Margin account type (0)

Return type:

AccountType

AdvanceBlock

class QuantConnect.Indicators.CandlestickPatterns.AdvanceBlock[source]

Advance Block candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

AdvanceBlock

class QuantConnect.Indicators.CandlestickPatterns.AdvanceBlock[source]

Advance Block candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

AlgorithmMode

enum QuantConnect.AlgorithmMode[source]

Represents the deployment modes of an algorithm

field BACKTESTING

Backtesting (2)

Returns:

Backtesting (2)

Return type:

AlgorithmMode

field LIVE

Live (0)

Returns:

Live (0)

Return type:

AlgorithmMode

field OPTIMIZATION

Optimization (1)

Returns:

Optimization (1)

Return type:

AlgorithmMode

field RESEARCH

Research (3)

Returns:

Research (3)

Return type:

AlgorithmMode

AlgorithmMode

enum QuantConnect.AlgorithmMode[source]

Represents the deployment modes of an algorithm

field Backtesting

Backtesting (2)

Returns:

Backtesting (2)

Return type:

AlgorithmMode

field Live

Live (0)

Returns:

Live (0)

Return type:

AlgorithmMode

field Optimization

Optimization (1)

Returns:

Optimization (1)

Return type:

AlgorithmMode

field Research

Research (3)

Returns:

Research (3)

Return type:

AlgorithmMode

AlgorithmStatus

enum QuantConnect.AlgorithmStatus[source]

States of a live deployment.

field COMPLETED

Algorithm completed running (6)

Returns:

Algorithm completed running (6)

Return type:

AlgorithmStatus

field DELETED

Algorithm has been deleted (5)

Returns:

Algorithm has been deleted (5)

Return type:

AlgorithmStatus

field DEPLOY_ERROR

Error compiling algorithm at start (0)

Returns:

Error compiling algorithm at start (0)

Return type:

AlgorithmStatus

field HISTORY

History status update (11)

Returns:

History status update (11)

Return type:

AlgorithmStatus

field INITIALIZING

The algorithm is initializing (10)

Returns:

The algorithm is initializing (10)

Return type:

AlgorithmStatus

field INVALID

Error in the algorithm id (not used) (8)

Returns:

Error in the algorithm id (not used) (8)

Return type:

AlgorithmStatus

field IN_QUEUE

Waiting for a server (1)

Returns:

Waiting for a server (1)

Return type:

AlgorithmStatus

field LIQUIDATED

Liquidated algorithm (4)

Returns:

Liquidated algorithm (4)

Return type:

AlgorithmStatus

field LOGGING_IN

The algorithm is logging into the brokerage (9)

Returns:

The algorithm is logging into the brokerage (9)

Return type:

AlgorithmStatus

field RUNNING

Running algorithm (2)

Returns:

Running algorithm (2)

Return type:

AlgorithmStatus

field RUNTIME_ERROR

Runtime Error Stoped Algorithm (7)

Returns:

Runtime Error Stoped Algorithm (7)

Return type:

AlgorithmStatus

field STOPPED

Stopped algorithm or exited with runtime errors (3)

Returns:

Stopped algorithm or exited with runtime errors (3)

Return type:

AlgorithmStatus

AlgorithmStatus

enum QuantConnect.AlgorithmStatus[source]

States of a live deployment.

field Completed

Algorithm completed running (6)

Returns:

Algorithm completed running (6)

Return type:

AlgorithmStatus

field Deleted

Algorithm has been deleted (5)

Returns:

Algorithm has been deleted (5)

Return type:

AlgorithmStatus

field DeployError

Error compiling algorithm at start (0)

Returns:

Error compiling algorithm at start (0)

Return type:

AlgorithmStatus

field History

History status update (11)

Returns:

History status update (11)

Return type:

AlgorithmStatus

field InQueue

Waiting for a server (1)

Returns:

Waiting for a server (1)

Return type:

AlgorithmStatus

field Initializing

The algorithm is initializing (10)

Returns:

The algorithm is initializing (10)

Return type:

AlgorithmStatus

field Invalid

Error in the algorithm id (not used) (8)

Returns:

Error in the algorithm id (not used) (8)

Return type:

AlgorithmStatus

field Liquidated

Liquidated algorithm (4)

Returns:

Liquidated algorithm (4)

Return type:

AlgorithmStatus

field LoggingIn

The algorithm is logging into the brokerage (9)

Returns:

The algorithm is logging into the brokerage (9)

Return type:

AlgorithmStatus

field Running

Running algorithm (2)

Returns:

Running algorithm (2)

Return type:

AlgorithmStatus

field RuntimeError

Runtime Error Stoped Algorithm (7)

Returns:

Runtime Error Stoped Algorithm (7)

Return type:

AlgorithmStatus

field Stopped

Stopped algorithm or exited with runtime errors (3)

Returns:

Stopped algorithm or exited with runtime errors (3)

Return type:

AlgorithmStatus

BeltHold

class QuantConnect.Indicators.CandlestickPatterns.BeltHold[source]

Belt-hold candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

BeltHold

class QuantConnect.Indicators.CandlestickPatterns.BeltHold[source]

Belt-hold candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Breakaway

class QuantConnect.Indicators.CandlestickPatterns.Breakaway[source]

Breakaway candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Breakaway

class QuantConnect.Indicators.CandlestickPatterns.Breakaway[source]

Breakaway candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

BrokerageMessageEvent

class QuantConnect.Brokerages.BrokerageMessageEvent[source]

Represents a message received from a brokerage

property code

Gets the brokerage specific code for this message, zero if no code was specified

Returns:

Gets the brokerage specific code for this message, zero if no code was specified

Return type:

str

property message

Gets the message text received from the brokerage

Returns:

Gets the message text received from the brokerage

Return type:

str

property type

Gets the type of brokerage message

Returns:

Gets the type of brokerage message

Return type:

BrokerageMessageType

BrokerageMessageEvent

class QuantConnect.Brokerages.BrokerageMessageEvent[source]

Represents a message received from a brokerage

property Code

Gets the brokerage specific code for this message, zero if no code was specified

Returns:

Gets the brokerage specific code for this message, zero if no code was specified

Return type:

string

property Message

Gets the message text received from the brokerage

Returns:

Gets the message text received from the brokerage

Return type:

string

property Type

Gets the type of brokerage message

Returns:

Gets the type of brokerage message

Return type:

BrokerageMessageType

BrokerageName

enum QuantConnect.Brokerages.BrokerageName[source]

Specifices what transaction model and submit/execution rules to use

field ALPACA

Transaction and submit/execution rules will use alpaca models

Returns:

Transaction and submit/execution rules will use alpaca models

Return type:

BrokerageName

field ALPHA_STREAMS

Transaction and submit/execution rules will use AlphaStream models

Returns:

Transaction and submit/execution rules will use AlphaStream models

Return type:

BrokerageName

field ATREYU

Transaction and submit/execution rules will use atreyu models

Returns:

Transaction and submit/execution rules will use atreyu models

Return type:

BrokerageName

field AXOS

Transaction and submit/execution rules will use Axos models

Returns:

Transaction and submit/execution rules will use Axos models

Return type:

BrokerageName

field BINANCE

Transaction and submit/execution rules will use binance models

Returns:

Transaction and submit/execution rules will use binance models

Return type:

BrokerageName

field BINANCE_COIN_FUTURES

Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.

Returns:

Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.

Return type:

BrokerageName

field BINANCE_FUTURES

Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD

Returns:

Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD

Return type:

BrokerageName

field BINANCE_US

Transaction and submit/execution rules will use Binance.US models

Returns:

Transaction and submit/execution rules will use Binance.US models

Return type:

BrokerageName

field BITFINEX

Transaction and submit/execution rules will use bitfinex models

Returns:

Transaction and submit/execution rules will use bitfinex models

Return type:

BrokerageName

field BYBIT

Transaction and submit/execution rules will use Bybit models

Returns:

Transaction and submit/execution rules will use Bybit models

Return type:

BrokerageName

field COINBASE

Transaction and submit/execution rules will use Coinbase broker's model

Returns:

Transaction and submit/execution rules will use Coinbase broker's model

Return type:

BrokerageName

field DEFAULT

Transaction and submit/execution rules will be the default as initialized

Returns:

Transaction and submit/execution rules will be the default as initialized

Return type:

BrokerageName

field EXANTE

Transaction and submit/execution rules will use Exante models

Returns:

Transaction and submit/execution rules will use Exante models

Return type:

BrokerageName

field EZE

Transaction and submit/execution rules will use Eze models

Returns:

Transaction and submit/execution rules will use Eze models

Return type:

BrokerageName

field FTX

Transaction and submit/execution rules will use ftx models

Returns:

Transaction and submit/execution rules will use ftx models

Return type:

BrokerageName

field FTXUS

Transaction and submit/execution rules will use ftx us models

Returns:

Transaction and submit/execution rules will use ftx us models

Return type:

BrokerageName

field FXCM_BROKERAGE

Transaction and submit/execution rules will use fxcm models

Returns:

Transaction and submit/execution rules will use fxcm models

Return type:

BrokerageName

field INTERACTIVE_BROKERS_BROKERAGE

Transaction and submit/execution rules will use interactive brokers models

Returns:

Transaction and submit/execution rules will use interactive brokers models

Return type:

BrokerageName

field KRAKEN

Transaction and submit/execution rules will use Kraken models

Returns:

Transaction and submit/execution rules will use Kraken models

Return type:

BrokerageName

field OANDA_BROKERAGE

Transaction and submit/execution rules will use oanda models

Returns:

Transaction and submit/execution rules will use oanda models

Return type:

BrokerageName

field QUANT_CONNECT_BROKERAGE

Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage

Returns:

Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage

Return type:

BrokerageName

field RBI

Transaction and submit/execution rules will use RBI models

Returns:

Transaction and submit/execution rules will use RBI models

Return type:

BrokerageName

field SAMCO

Transaction and submit/execution rules will use Samco models

Returns:

Transaction and submit/execution rules will use Samco models

Return type:

BrokerageName

field TD_AMERITRADE

Transaction and submit/execution rules will use TDameritrade models

Returns:

Transaction and submit/execution rules will use TDameritrade models

Return type:

BrokerageName

field TRADIER_BROKERAGE

Transaction and submit/execution rules will use tradier models

Returns:

Transaction and submit/execution rules will use tradier models

Return type:

BrokerageName

field TRADING_TECHNOLOGIES

Transaction and submit/execution rules will use TradingTechnologies models

Returns:

Transaction and submit/execution rules will use TradingTechnologies models

Return type:

BrokerageName

field WOLVERINE

Transaction and submit/execution rules will use Wolverine models

Returns:

Transaction and submit/execution rules will use Wolverine models

Return type:

BrokerageName

field ZERODHA

Transaction and submit/execution rules will use Zerodha models

Returns:

Transaction and submit/execution rules will use Zerodha models

Return type:

BrokerageName

BrokerageName

enum QuantConnect.Brokerages.BrokerageName[source]

Specifices what transaction model and submit/execution rules to use

field Alpaca

Transaction and submit/execution rules will use alpaca models

Returns:

Transaction and submit/execution rules will use alpaca models

Return type:

BrokerageName

field AlphaStreams

Transaction and submit/execution rules will use AlphaStream models

Returns:

Transaction and submit/execution rules will use AlphaStream models

Return type:

BrokerageName

field Atreyu

Transaction and submit/execution rules will use atreyu models

Returns:

Transaction and submit/execution rules will use atreyu models

Return type:

BrokerageName

field Axos

Transaction and submit/execution rules will use Axos models

Returns:

Transaction and submit/execution rules will use Axos models

Return type:

BrokerageName

field Binance

Transaction and submit/execution rules will use binance models

Returns:

Transaction and submit/execution rules will use binance models

Return type:

BrokerageName

field BinanceCoinFutures

Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.

Returns:

Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.

Return type:

BrokerageName

field BinanceFutures

Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD

Returns:

Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD

Return type:

BrokerageName

field BinanceUS

Transaction and submit/execution rules will use Binance.US models

Returns:

Transaction and submit/execution rules will use Binance.US models

Return type:

BrokerageName

field Bitfinex

Transaction and submit/execution rules will use bitfinex models

Returns:

Transaction and submit/execution rules will use bitfinex models

Return type:

BrokerageName

field Bybit

Transaction and submit/execution rules will use Bybit models

Returns:

Transaction and submit/execution rules will use Bybit models

Return type:

BrokerageName

field Coinbase

Transaction and submit/execution rules will use Coinbase broker's model

Returns:

Transaction and submit/execution rules will use Coinbase broker's model

Return type:

BrokerageName

field Default

Transaction and submit/execution rules will be the default as initialized

Returns:

Transaction and submit/execution rules will be the default as initialized

Return type:

BrokerageName

field Exante

Transaction and submit/execution rules will use Exante models

Returns:

Transaction and submit/execution rules will use Exante models

Return type:

BrokerageName

field Eze

Transaction and submit/execution rules will use Eze models

Returns:

Transaction and submit/execution rules will use Eze models

Return type:

BrokerageName

field FTX

Transaction and submit/execution rules will use ftx models

Returns:

Transaction and submit/execution rules will use ftx models

Return type:

BrokerageName

field FTXUS

Transaction and submit/execution rules will use ftx us models

Returns:

Transaction and submit/execution rules will use ftx us models

Return type:

BrokerageName

field FxcmBrokerage

Transaction and submit/execution rules will use fxcm models

Returns:

Transaction and submit/execution rules will use fxcm models

Return type:

BrokerageName

field InteractiveBrokersBrokerage

Transaction and submit/execution rules will use interactive brokers models

Returns:

Transaction and submit/execution rules will use interactive brokers models

Return type:

BrokerageName

field Kraken

Transaction and submit/execution rules will use Kraken models

Returns:

Transaction and submit/execution rules will use Kraken models

Return type:

BrokerageName

field OandaBrokerage

Transaction and submit/execution rules will use oanda models

Returns:

Transaction and submit/execution rules will use oanda models

Return type:

BrokerageName

field QuantConnectBrokerage

Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage

Returns:

Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage

Return type:

BrokerageName

field RBI

Transaction and submit/execution rules will use RBI models

Returns:

Transaction and submit/execution rules will use RBI models

Return type:

BrokerageName

field Samco

Transaction and submit/execution rules will use Samco models

Returns:

Transaction and submit/execution rules will use Samco models

Return type:

BrokerageName

field TDAmeritrade

Transaction and submit/execution rules will use TDameritrade models

Returns:

Transaction and submit/execution rules will use TDameritrade models

Return type:

BrokerageName

field TradierBrokerage

Transaction and submit/execution rules will use tradier models

Returns:

Transaction and submit/execution rules will use tradier models

Return type:

BrokerageName

field TradingTechnologies

Transaction and submit/execution rules will use TradingTechnologies models

Returns:

Transaction and submit/execution rules will use TradingTechnologies models

Return type:

BrokerageName

field Wolverine

Transaction and submit/execution rules will use Wolverine models

Returns:

Transaction and submit/execution rules will use Wolverine models

Return type:

BrokerageName

field Zerodha

Transaction and submit/execution rules will use Zerodha models

Returns:

Transaction and submit/execution rules will use Zerodha models

Return type:

BrokerageName

Cfd

class QuantConnect.Securities.Cfd.Cfd[source]

CFD Security Object Implementation for CFD Assets

clear()

Removes every custom property that had been set.

get_last_data()

Get the last price update set to the security if any else null

Return type:

BaseData

refresh_data_normalization_mode_property()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

set_buying_power_model(buying_power_model)

Sets the buying power model

Parameters:
  • buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)

Sets the buying power model

Parameters:
  • py_object (PyObject)
set_data_filter(py_object)

Set Security Data Filter

Parameters:
  • py_object (PyObject)
set_data_filter(data_filter)

Set Security Data Filter

Parameters:
  • data_filter (ISecurityDataFilter)
set_fee_model(feel_model)

Sets the fee model

Parameters:
  • feel_model (PyObject | IFeeModel)
set_fill_model(fill_model)

Sets the fill model

Parameters:
  • fill_model (PyObject | IFillModel)
set_leverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (float)
set_local_time_keeper(local_time_keeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
set_margin_interest_rate_model(margin_interest_rate_model)

Sets the margin interests rate model

Parameters:
  • margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)

Sets the margin interests rate model

Parameters:
  • py_object (PyObject)
set_margin_model(py_object)

Sets the margin model

Parameters:
  • py_object (PyObject)
set_margin_model(margin_model)

Sets the margin model

Parameters:
  • margin_model (IBuyingPowerModel)
set_market_price(data)

Update any security properties based on the latest market data and time

Parameters:
set_settlement_model(settlement_model)

Sets the settlement model

Parameters:
  • settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)

Set Python Shortable Provider for this Security

Parameters:
  • py_object (PyObject)
set_shortable_provider(shortable_provider)

Set Python Shortable Provider for this Security

Parameters:
set_slippage_model(slippage_model)

Sets the slippage model

Parameters:
  • slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)

Sets the volatility model

Parameters:
  • volatility_model (IVolatilityModel | PyObject)
update(data, data_type, contains_fill_forward_data=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (List[BaseData])
  • data_type (Type)
  • contains_fill_forward_data (bool, optional)
property ask_price

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

float

property ask_size

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

float

property bid_price

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

float

property bid_size

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

float

property buying_power_model

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

float

property contract_multiplier

Gets the contract multiplier for this CFD security

Returns:

Gets the contract multiplier for this CFD security

Return type:

float

property data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property data_filter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property fee_model

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property fill_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property has_data

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property high

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

float

property hold_stock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property is_delisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property is_tradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property item

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

property leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

float

property local_time

Local time for this market

Returns:

Local time for this market

Return type:

datetime

property low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

float

property margin_interest_rate_model

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property margin_model

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property minimum_price_variation

Gets the minimum price variation for this CFD security

Returns:

Gets the minimum price variation for this CFD security

Return type:

float

property open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

float

property open_interest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property portfolio_model

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

float

property price_variation_model

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property quote_currency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property settlement_model

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property shortable_provider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IintableProvider

property slippage_model

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List[SubscriptionDataConfig]

property symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property symbol_properties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property volatility_model

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

float

Cfd

class QuantConnect.Securities.Cfd.Cfd[source]

CFD Security Object Implementation for CFD Assets

Clear()

Removes every custom property that had been set.

GetLastData()

Get the last price update set to the security if any else null

Return type:

BaseData

RefreshDataNormalizationModeProperty()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

SetBuyingPowerModel(buyingPowerModel)

Sets the buying power model

Parameters:
  • buyingPowerModel (IBuyingPowerModel)
SetBuyingPowerModel(pyObject)

Sets the buying power model

Parameters:
  • pyObject (PyObject)
SetDataFilter(pyObject)

Set Security Data Filter

Parameters:
  • pyObject (PyObject)
SetDataFilter(dataFilter)

Set Security Data Filter

Parameters:
  • dataFilter (ISecurityDataFilter)
SetFeeModel(feelModel)

Sets the fee model

Parameters:
  • feelModel (PyObject | IFeeModel)
SetFillModel(fillModel)

Sets the fill model

Parameters:
  • fillModel (PyObject | IFillModel)
SetLeverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (decimal)
SetLocalTimeKeeper(localTimeKeeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
SetMarginInterestRateModel(marginInterestRateModel)

Sets the margin interests rate model

Parameters:
  • marginInterestRateModel (IMarginInterestRateModel)
SetMarginInterestRateModel(pyObject)

Sets the margin interests rate model

Parameters:
  • pyObject (PyObject)
SetMarginModel(pyObject)

Sets the margin model

Parameters:
  • pyObject (PyObject)
SetMarginModel(marginModel)

Sets the margin model

Parameters:
  • marginModel (IBuyingPowerModel)
SetMarketPrice(data)

Update any security properties based on the latest market data and time

Parameters:
SetSettlementModel(settlementModel)

Sets the settlement model

Parameters:
  • settlementModel (ISettlementModel | PyObject)
SetShortableProvider(pyObject)

Set Python Shortable Provider for this Security

Parameters:
  • pyObject (PyObject)
SetShortableProvider(shortableProvider)

Set Python Shortable Provider for this Security

Parameters:
  • shortableProvider (IShortableProvider)
SetSlippageModel(slippageModel)

Sets the slippage model

Parameters:
  • slippageModel (ISlippageModel | PyObject)
SetVolatilityModel(volatilityModel)

Sets the volatility model

Parameters:
  • volatilityModel (IVolatilityModel | PyObject)
Update(data, dataType, containsFillForwardData=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (IReadOnlyList<BaseData>)
  • dataType (Type)
  • containsFillForwardData (Boolean, optional)
property AskPrice

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

decimal

property AskSize

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

decimal

property BidPrice

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

decimal

property BidSize

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

decimal

property BuyingPowerModel

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property Cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property Close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

decimal

property ContractMultiplier

Gets the contract multiplier for this CFD security

Returns:

Gets the contract multiplier for this CFD security

Return type:

decimal

property Data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property DataFilter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property Exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property FeeModel

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property FillModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property Fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property HasData

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property High

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

decimal

property HoldStock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property Holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property Invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property IsDelisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property IsTradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property Leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

decimal

property LocalTime

Local time for this market

Returns:

Local time for this market

Return type:

DateTime

property Low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

decimal

property MarginInterestRateModel

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property MarginModel

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property MinimumPriceVariation

Gets the minimum price variation for this CFD security

Returns:

Gets the minimum price variation for this CFD security

Return type:

decimal

property Open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

decimal

property OpenInterest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property PortfolioModel

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property Price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

decimal

property PriceVariationModel

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property QuoteCurrency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property SettlementModel

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property ShortableProvider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IShortableProvider

property SlippageModel

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property Subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List<SubscriptionDataConfig>

property Symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property SymbolProperties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property Type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property VolatilityModel

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property Volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

decimal

property [System.String]

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

Chart

class QuantConnect.Chart[source]

Single Parent Chart Object for Custom Charting

add_series(series)

Add a reference to this chart series:

Parameters:
clone()

Return a new instance clone of this object

Return type:

Chart

clone_empty()

Return a new empty instance clone of this object

Return type:

Chart

get_updates()

Fetch a chart with only the updates since the last request, Underlying series will save the index position.

Return type:

Chart

try_add_and_get_series(name, template_series, force_add_new=False)

Gets Series if already present in chart, else will add a new series and return it

Parameters:
  • name (str)
  • template_series (BaseSeries)
  • force_add_new (bool, optional)
Return type:

BaseSeries

try_add_and_get_series(name, type, index, unit, color, symbol, force_add_new=False)

Gets Series if already present in chart, else will add a new series and return it

Parameters:
Return type:

Series

property legend_disabled

True to hide this series legend from the chart

Returns:

True to hide this series legend from the chart

Return type:

bool

property symbol

Associated symbol if any, making this an asset plot

Returns:

Associated symbol if any, making this an asset plot

Return type:

Symbol

field name

Name of the Chart

Returns:

Name of the Chart

Return type:

str

field series

List of Series Objects for this Chart:

Returns:

List of Series Objects for this Chart:

Return type:

Dict[str, BaseSeries]

Chart

class QuantConnect.Chart[source]

Single Parent Chart Object for Custom Charting

AddSeries(series)

Add a reference to this chart series:

Parameters:
Clone()

Return a new instance clone of this object

Return type:

Chart

CloneEmpty()

Return a new empty instance clone of this object

Return type:

Chart

GetUpdates()

Fetch a chart with only the updates since the last request, Underlying series will save the index position.

Return type:

Chart

TryAddAndGetSeries(name, templateSeries, forceAddNew=False)

Gets Series if already present in chart, else will add a new series and return it

Parameters:
  • name (string)
  • templateSeries (BaseSeries)
  • forceAddNew (bool, optional)
Return type:

BaseSeries

TryAddAndGetSeries(name, type, index, unit, color, symbol, forceAddNew=False)

Gets Series if already present in chart, else will add a new series and return it

Parameters:
Return type:

Series

property LegendDisabled

True to hide this series legend from the chart

Returns:

True to hide this series legend from the chart

Return type:

bool

property Symbol

Associated symbol if any, making this an asset plot

Returns:

Associated symbol if any, making this an asset plot

Return type:

Symbol

field Name

Name of the Chart

Returns:

Name of the Chart

Return type:

string

field Series

List of Series Objects for this Chart:

Returns:

List of Series Objects for this Chart:

Return type:

Dictionary<String, BaseSeries>

ClosingMarubozu

class QuantConnect.Indicators.CandlestickPatterns.ClosingMarubozu[source]

Closing Marubozu candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ClosingMarubozu

class QuantConnect.Indicators.CandlestickPatterns.ClosingMarubozu[source]

Closing Marubozu candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ConcealedBabySwallow

class QuantConnect.Indicators.CandlestickPatterns.ConcealedBabySwallow[source]

Concealed Baby Swallow candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ConcealedBabySwallow

class QuantConnect.Indicators.CandlestickPatterns.ConcealedBabySwallow[source]

Concealed Baby Swallow candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

CorrelationType

enum QuantConnect.Indicators.CorrelationType[source]

Defines the different types of Correlation

field PEARSON

Pearson Correlation (Product-Moment Correlation): Measures the linear relationship between two datasets. The coefficient ranges from -1 to 1. A value of 1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear relationship. It assumes that both datasets are normally distributed and the relationship is linear. It is sensitive to outliers which can affect the correlation significantly.

Returns:

Pearson Correlation (Product-Moment Correlation): Measures the linear relationship between two datasets. The coefficient ranges from -1 to 1. A value of 1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear relationship. It assumes that both datasets are normally distributed and the relationship is linear. It is sensitive to outliers which can affect the correlation significantly.

Return type:

CorrelationType

field SPEARMAN

Spearman Correlation (Rank Correlation): Measures the strength and direction of the monotonic relationship between two datasets. Instead of calculating the coefficient using raw data, it uses the rank of the data points. This method is non-parametric and does not assume a normal distribution of the datasets. It's useful when the data is not normally distributed or when the relationship is not linear. Spearman's correlation is less sensitive to outliers than Pearson's correlation. The coefficient also ranges from -1 to 1 with similar interpretations for the values, but it reflects monotonic relationships rather than only linear ones.

Returns:

Spearman Correlation (Rank Correlation): Measures the strength and direction of the monotonic relationship between two datasets. Instead of calculating the coefficient using raw data, it uses the rank of the data points. This method is non-parametric and does not assume a normal distribution of the datasets. It's useful when the data is not normally distributed or when the relationship is not linear. Spearman's correlation is less sensitive to outliers than Pearson's correlation. The coefficient also ranges from -1 to 1 with similar interpretations for the values, but it reflects monotonic relationships rather than only linear ones.

Return type:

CorrelationType

CorrelationType

enum QuantConnect.Indicators.CorrelationType[source]

Defines the different types of Correlation

field Pearson

Pearson Correlation (Product-Moment Correlation): Measures the linear relationship between two datasets. The coefficient ranges from -1 to 1. A value of 1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear relationship. It assumes that both datasets are normally distributed and the relationship is linear. It is sensitive to outliers which can affect the correlation significantly.

Returns:

Pearson Correlation (Product-Moment Correlation): Measures the linear relationship between two datasets. The coefficient ranges from -1 to 1. A value of 1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear relationship. It assumes that both datasets are normally distributed and the relationship is linear. It is sensitive to outliers which can affect the correlation significantly.

Return type:

CorrelationType

field Spearman

Spearman Correlation (Rank Correlation): Measures the strength and direction of the monotonic relationship between two datasets. Instead of calculating the coefficient using raw data, it uses the rank of the data points. This method is non-parametric and does not assume a normal distribution of the datasets. It's useful when the data is not normally distributed or when the relationship is not linear. Spearman's correlation is less sensitive to outliers than Pearson's correlation. The coefficient also ranges from -1 to 1 with similar interpretations for the values, but it reflects monotonic relationships rather than only linear ones.

Returns:

Spearman Correlation (Rank Correlation): Measures the strength and direction of the monotonic relationship between two datasets. Instead of calculating the coefficient using raw data, it uses the rank of the data points. This method is non-parametric and does not assume a normal distribution of the datasets. It's useful when the data is not normally distributed or when the relationship is not linear. Spearman's correlation is less sensitive to outliers than Pearson's correlation. The coefficient also ranges from -1 to 1 with similar interpretations for the values, but it reflects monotonic relationships rather than only linear ones.

Return type:

CorrelationType

Counterattack

class QuantConnect.Indicators.CandlestickPatterns.Counterattack[source]

Counterattack candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Counterattack

class QuantConnect.Indicators.CandlestickPatterns.Counterattack[source]

Counterattack candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Crypto

class QuantConnect.Securities.Crypto.Crypto[source]

Crypto Security Object Implementation for Crypto Assets

clear()

Removes every custom property that had been set.

get_last_data()

Get the last price update set to the security if any else null

Return type:

BaseData

refresh_data_normalization_mode_property()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

set_buying_power_model(buying_power_model)

Sets the buying power model

Parameters:
  • buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)

Sets the buying power model

Parameters:
  • py_object (PyObject)
set_data_filter(py_object)

Set Security Data Filter

Parameters:
  • py_object (PyObject)
set_data_filter(data_filter)

Set Security Data Filter

Parameters:
  • data_filter (ISecurityDataFilter)
set_fee_model(feel_model)

Sets the fee model

Parameters:
  • feel_model (PyObject | IFeeModel)
set_fill_model(fill_model)

Sets the fill model

Parameters:
  • fill_model (PyObject | IFillModel)
set_leverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (float)
set_local_time_keeper(local_time_keeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
set_margin_interest_rate_model(margin_interest_rate_model)

Sets the margin interests rate model

Parameters:
  • margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)

Sets the margin interests rate model

Parameters:
  • py_object (PyObject)
set_margin_model(py_object)

Sets the margin model

Parameters:
  • py_object (PyObject)
set_margin_model(margin_model)

Sets the margin model

Parameters:
  • margin_model (IBuyingPowerModel)
set_market_price(data)

Update any security properties based on the latest market data and time

Parameters:
set_settlement_model(settlement_model)

Sets the settlement model

Parameters:
  • settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)

Set Python Shortable Provider for this Security

Parameters:
  • py_object (PyObject)
set_shortable_provider(shortable_provider)

Set Python Shortable Provider for this Security

Parameters:
set_slippage_model(slippage_model)

Sets the slippage model

Parameters:
  • slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)

Sets the volatility model

Parameters:
  • volatility_model (IVolatilityModel | PyObject)
update(data, data_type, contains_fill_forward_data=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (List[BaseData])
  • data_type (Type)
  • contains_fill_forward_data (bool, optional)
property ask_price

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

float

property ask_size

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

float

property base_currency

Gets the currency acquired by going long this currency pair

Returns:

Gets the currency acquired by going long this currency pair

Return type:

Cash

property bid_price

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

float

property bid_size

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

float

property buying_power_model

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

float

property data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property data_filter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property fee_model

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property fill_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property has_data

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property high

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

float

property hold_stock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property is_delisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property is_tradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property item

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

property leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

float

property local_time

Local time for this market

Returns:

Local time for this market

Return type:

datetime

property low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

float

property margin_interest_rate_model

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property margin_model

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

float

property open_interest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property portfolio_model

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

float

property price_variation_model

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property quote_currency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property settlement_model

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property shortable_provider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IintableProvider

property slippage_model

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List[SubscriptionDataConfig]

property symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property symbol_properties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property volatility_model

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

float

Crypto

class QuantConnect.Securities.Crypto.Crypto[source]

Crypto Security Object Implementation for Crypto Assets

Clear()

Removes every custom property that had been set.

GetLastData()

Get the last price update set to the security if any else null

Return type:

BaseData

RefreshDataNormalizationModeProperty()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

SetBuyingPowerModel(buyingPowerModel)

Sets the buying power model

Parameters:
  • buyingPowerModel (IBuyingPowerModel)
SetBuyingPowerModel(pyObject)

Sets the buying power model

Parameters:
  • pyObject (PyObject)
SetDataFilter(pyObject)

Set Security Data Filter

Parameters:
  • pyObject (PyObject)
SetDataFilter(dataFilter)

Set Security Data Filter

Parameters:
  • dataFilter (ISecurityDataFilter)
SetFeeModel(feelModel)

Sets the fee model

Parameters:
  • feelModel (PyObject | IFeeModel)
SetFillModel(fillModel)

Sets the fill model

Parameters:
  • fillModel (PyObject | IFillModel)
SetLeverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (decimal)
SetLocalTimeKeeper(localTimeKeeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
SetMarginInterestRateModel(marginInterestRateModel)

Sets the margin interests rate model

Parameters:
  • marginInterestRateModel (IMarginInterestRateModel)
SetMarginInterestRateModel(pyObject)

Sets the margin interests rate model

Parameters:
  • pyObject (PyObject)
SetMarginModel(pyObject)

Sets the margin model

Parameters:
  • pyObject (PyObject)
SetMarginModel(marginModel)

Sets the margin model

Parameters:
  • marginModel (IBuyingPowerModel)
SetMarketPrice(data)

Update any security properties based on the latest market data and time

Parameters:
SetSettlementModel(settlementModel)

Sets the settlement model

Parameters:
  • settlementModel (ISettlementModel | PyObject)
SetShortableProvider(pyObject)

Set Python Shortable Provider for this Security

Parameters:
  • pyObject (PyObject)
SetShortableProvider(shortableProvider)

Set Python Shortable Provider for this Security

Parameters:
  • shortableProvider (IShortableProvider)
SetSlippageModel(slippageModel)

Sets the slippage model

Parameters:
  • slippageModel (ISlippageModel | PyObject)
SetVolatilityModel(volatilityModel)

Sets the volatility model

Parameters:
  • volatilityModel (IVolatilityModel | PyObject)
Update(data, dataType, containsFillForwardData=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (IReadOnlyList<BaseData>)
  • dataType (Type)
  • containsFillForwardData (Boolean, optional)
property AskPrice

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

decimal

property AskSize

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

decimal

property BaseCurrency

Gets the currency acquired by going long this currency pair

Returns:

Gets the currency acquired by going long this currency pair

Return type:

Cash

property BidPrice

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

decimal

property BidSize

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

decimal

property BuyingPowerModel

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property Cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property Close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

decimal

property Data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property DataFilter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property Exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property FeeModel

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property FillModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property Fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property HasData

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property High

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

decimal

property HoldStock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property Holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property Invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property IsDelisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property IsTradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property Leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

decimal

property LocalTime

Local time for this market

Returns:

Local time for this market

Return type:

DateTime

property Low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

decimal

property MarginInterestRateModel

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property MarginModel

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property Open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

decimal

property OpenInterest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property PortfolioModel

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property Price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

decimal

property PriceVariationModel

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property QuoteCurrency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property SettlementModel

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property ShortableProvider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IShortableProvider

property SlippageModel

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property Subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List<SubscriptionDataConfig>

property Symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property SymbolProperties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property Type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property VolatilityModel

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property Volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

decimal

property [System.String]

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

CryptoFuture

class QuantConnect.Securities.CryptoFuture.CryptoFuture[source]

Crypto Future Security Object Implementation for Crypto Future Assets

clear()

Removes every custom property that had been set.

get_last_data()

Get the last price update set to the security if any else null

Return type:

BaseData

is_crypto_coin_future()

Checks whether the security is a crypto coin future

Return type:

bool

refresh_data_normalization_mode_property()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

set_buying_power_model(buying_power_model)

Sets the buying power model

Parameters:
  • buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)

Sets the buying power model

Parameters:
  • py_object (PyObject)
set_data_filter(py_object)

Set Security Data Filter

Parameters:
  • py_object (PyObject)
set_data_filter(data_filter)

Set Security Data Filter

Parameters:
  • data_filter (ISecurityDataFilter)
set_fee_model(feel_model)

Sets the fee model

Parameters:
  • feel_model (PyObject | IFeeModel)
set_fill_model(fill_model)

Sets the fill model

Parameters:
  • fill_model (PyObject | IFillModel)
set_leverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (float)
set_local_time_keeper(local_time_keeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
set_margin_interest_rate_model(margin_interest_rate_model)

Sets the margin interests rate model

Parameters:
  • margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)

Sets the margin interests rate model

Parameters:
  • py_object (PyObject)
set_margin_model(py_object)

Sets the margin model

Parameters:
  • py_object (PyObject)
set_margin_model(margin_model)

Sets the margin model

Parameters:
  • margin_model (IBuyingPowerModel)
set_market_price(data)

Update any security properties based on the latest market data and time

Parameters:
set_settlement_model(settlement_model)

Sets the settlement model

Parameters:
  • settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)

Set Python Shortable Provider for this Security

Parameters:
  • py_object (PyObject)
set_shortable_provider(shortable_provider)

Set Python Shortable Provider for this Security

Parameters:
set_slippage_model(slippage_model)

Sets the slippage model

Parameters:
  • slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)

Sets the volatility model

Parameters:
  • volatility_model (IVolatilityModel | PyObject)
update(data, data_type, contains_fill_forward_data=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (List[BaseData])
  • data_type (Type)
  • contains_fill_forward_data (bool, optional)
property ask_price

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

float

property ask_size

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

float

property base_currency

Gets the currency acquired by going long this currency pair

Returns:

Gets the currency acquired by going long this currency pair

Return type:

Cash

property bid_price

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

float

property bid_size

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

float

property buying_power_model

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

float

property data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property data_filter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property fee_model

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property fill_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property has_data

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property high

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

float

property hold_stock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property is_delisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property is_tradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property item

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

property leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

float

property local_time

Local time for this market

Returns:

Local time for this market

Return type:

datetime

property low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

float

property margin_interest_rate_model

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property margin_model

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

float

property open_interest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property portfolio_model

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

float

property price_variation_model

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property quote_currency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property settlement_model

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property shortable_provider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IintableProvider

property slippage_model

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List[SubscriptionDataConfig]

property symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property symbol_properties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property volatility_model

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

float

CryptoFuture

class QuantConnect.Securities.CryptoFuture.CryptoFuture[source]

Crypto Future Security Object Implementation for Crypto Future Assets

Clear()

Removes every custom property that had been set.

GetLastData()

Get the last price update set to the security if any else null

Return type:

BaseData

IsCryptoCoinFuture()

Checks whether the security is a crypto coin future

Return type:

Boolean

RefreshDataNormalizationModeProperty()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

SetBuyingPowerModel(buyingPowerModel)

Sets the buying power model

Parameters:
  • buyingPowerModel (IBuyingPowerModel)
SetBuyingPowerModel(pyObject)

Sets the buying power model

Parameters:
  • pyObject (PyObject)
SetDataFilter(pyObject)

Set Security Data Filter

Parameters:
  • pyObject (PyObject)
SetDataFilter(dataFilter)

Set Security Data Filter

Parameters:
  • dataFilter (ISecurityDataFilter)
SetFeeModel(feelModel)

Sets the fee model

Parameters:
  • feelModel (PyObject | IFeeModel)
SetFillModel(fillModel)

Sets the fill model

Parameters:
  • fillModel (PyObject | IFillModel)
SetLeverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (decimal)
SetLocalTimeKeeper(localTimeKeeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
SetMarginInterestRateModel(marginInterestRateModel)

Sets the margin interests rate model

Parameters:
  • marginInterestRateModel (IMarginInterestRateModel)
SetMarginInterestRateModel(pyObject)

Sets the margin interests rate model

Parameters:
  • pyObject (PyObject)
SetMarginModel(pyObject)

Sets the margin model

Parameters:
  • pyObject (PyObject)
SetMarginModel(marginModel)

Sets the margin model

Parameters:
  • marginModel (IBuyingPowerModel)
SetMarketPrice(data)

Update any security properties based on the latest market data and time

Parameters:
SetSettlementModel(settlementModel)

Sets the settlement model

Parameters:
  • settlementModel (ISettlementModel | PyObject)
SetShortableProvider(pyObject)

Set Python Shortable Provider for this Security

Parameters:
  • pyObject (PyObject)
SetShortableProvider(shortableProvider)

Set Python Shortable Provider for this Security

Parameters:
  • shortableProvider (IShortableProvider)
SetSlippageModel(slippageModel)

Sets the slippage model

Parameters:
  • slippageModel (ISlippageModel | PyObject)
SetVolatilityModel(volatilityModel)

Sets the volatility model

Parameters:
  • volatilityModel (IVolatilityModel | PyObject)
Update(data, dataType, containsFillForwardData=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (IReadOnlyList<BaseData>)
  • dataType (Type)
  • containsFillForwardData (Boolean, optional)
property AskPrice

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

decimal

property AskSize

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

decimal

property BaseCurrency

Gets the currency acquired by going long this currency pair

Returns:

Gets the currency acquired by going long this currency pair

Return type:

Cash

property BidPrice

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

decimal

property BidSize

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

decimal

property BuyingPowerModel

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property Cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property Close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

decimal

property Data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property DataFilter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property Exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property FeeModel

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property FillModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property Fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property HasData

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property High

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

decimal

property HoldStock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property Holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property Invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property IsDelisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property IsTradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property Leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

decimal

property LocalTime

Local time for this market

Returns:

Local time for this market

Return type:

DateTime

property Low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

decimal

property MarginInterestRateModel

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property MarginModel

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property Open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

decimal

property OpenInterest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property PortfolioModel

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property Price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

decimal

property PriceVariationModel

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property QuoteCurrency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property SettlementModel

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property ShortableProvider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IShortableProvider

property SlippageModel

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property Subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List<SubscriptionDataConfig>

property Symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property SymbolProperties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property Type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property VolatilityModel

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property Volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

decimal

property [System.String]

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

DarkCloudCover

class QuantConnect.Indicators.CandlestickPatterns.DarkCloudCover[source]

Dark Cloud Cover candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

DarkCloudCover

class QuantConnect.Indicators.CandlestickPatterns.DarkCloudCover[source]

Dark Cloud Cover candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Delistings

class QuantConnect.Data.Market.Delistings[source]

Collections of Delisting keyed by Symbol

add(key, value)

Adds an item to the ICollection.

Parameters:
add(item)

Adds an item to the ICollection.

Parameters:
  • item (Dict[Symbol, Delisting])
clear()

Removes all keys and values from the IExtendedDictionary.

contains(item)

Determines whether the ICollection contains a specific value.

Parameters:
  • item (Dict[Symbol, Delisting])
Return type:

bool

contains_key(key)

Determines whether the IDictionary contains an element with the specified key.

Parameters:
Return type:

bool

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

copy_to(array, array_index)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters:
  • array (Dict)
  • array_index (int)
fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
Return type:

Delisting

get_enumerator()

Returns an enumerator that iterates through the collection.

Return type:

Dict[Symbol, Delisting]

get_value(key)

Gets the value associated with the specified key.

Parameters:
Return type:

Delisting

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
Return type:

Delisting

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

remove(item)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
  • item (Dict[Symbol, Delisting])
Return type:

bool

remove(key)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
Return type:

bool

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
Return type:

Delisting

try_get_value(key, value)

Gets the value associated with the specified key.

Parameters:
Return type:

bool

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property count

Gets the number of elements contained in the ICollection.

Returns:

Gets the number of elements contained in the ICollection.

Return type:

int

property is_read_only

Gets a value indicating whether the ICollection is read-only.

Returns:

Gets a value indicating whether the ICollection is read-only.

Return type:

bool

property item

Gets or sets the Delisting with the specified ticker.

Returns:

Gets or sets the Delisting with the specified ticker.

Return type:

Delisting

property keys

Gets an ICollection containing the keys of the IDictionary.

Returns:

Gets an ICollection containing the keys of the IDictionary.

Return type:

List[Symbol]

property time

Gets or sets the time associated with this collection of data

Returns:

Gets or sets the time associated with this collection of data

Return type:

datetime

property values

Gets an ICollection containing the values in the IDictionary.

Returns:

Gets an ICollection containing the values in the IDictionary.

Return type:

List[Delisting]

Delistings

class QuantConnect.Data.Market.Delistings[source]

Collections of Delisting keyed by Symbol

Add(key, value)

Adds an item to the ICollection.

Parameters:
Add(item)

Adds an item to the ICollection.

Parameters:
  • item (KeyValuePair<Symbol, Delisting>)
Clear()

Removes all items from the ICollection.

Contains(item)

Determines whether the ICollection contains a specific value.

Parameters:
  • item (KeyValuePair<Symbol, Delisting>)
Return type:

Boolean

ContainsKey(key)

Determines whether the IDictionary contains an element with the specified key.

Parameters:
Return type:

Boolean

CopyTo(array, arrayIndex)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters:
  • array (KeyValuePair)
  • arrayIndex (Int32)
GetEnumerator()

Returns an enumerator that iterates through the collection.

Return type:

KeyValuePair[Symbol, Delisting]

GetValue(key)

Gets the value associated with the specified key.

Parameters:
Return type:

Delisting

Remove(item)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
  • item (KeyValuePair<Symbol, Delisting>)
Return type:

Boolean

Remove(key)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
Return type:

Boolean

TryGetValue(key, value)

Gets the value associated with the specified key.

Parameters:
Return type:

Boolean

clear()

Removes all keys and values from the IExtendedDictionary.

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
Return type:

Delisting

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
Return type:

Delisting

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
Return type:

Delisting

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property Count

Gets the number of elements contained in the ICollection.

Returns:

Gets the number of elements contained in the ICollection.

Return type:

Int32

property IsReadOnly

Gets a value indicating whether the ICollection is read-only.

Returns:

Gets a value indicating whether the ICollection is read-only.

Return type:

bool

property Keys

Gets an ICollection containing the keys of the IDictionary.

Returns:

Gets an ICollection containing the keys of the IDictionary.

Return type:

ICollection<Symbol>

property Time

Gets or sets the time associated with this collection of data

Returns:

Gets or sets the time associated with this collection of data

Return type:

DateTime

property Values

Gets an ICollection containing the values in the IDictionary.

Returns:

Gets an ICollection containing the values in the IDictionary.

Return type:

ICollection<Delisting>

property [QuantConnect.Symbol]

Gets or sets the Delisting with the specified Symbol.

Returns:

Gets or sets the Delisting with the specified Symbol.

Return type:

Delisting

property [System.String]

Gets or sets the Delisting with the specified ticker.

Returns:

Gets or sets the Delisting with the specified ticker.

Return type:

Delisting

DeploymentTarget

enum QuantConnect.DeploymentTarget[source]

Represents the types deployment targets for algorithms

field CLOUD_PLATFORM

Cloud Platform (0)

Returns:

Cloud Platform (0)

Return type:

DeploymentTarget

field LOCAL_PLATFORM

Local Platform (1)

Returns:

Local Platform (1)

Return type:

DeploymentTarget

DeploymentTarget

enum QuantConnect.DeploymentTarget[source]

Represents the types deployment targets for algorithms

field CloudPlatform

Cloud Platform (0)

Returns:

Cloud Platform (0)

Return type:

DeploymentTarget

field LocalPlatform

Local Platform (1)

Returns:

Local Platform (1)

Return type:

DeploymentTarget

DerivativeOscillator

class QuantConnect.Indicators.DerivativeOscillator[source]

Represents the Derivative Oscillator Indicator, utilizing a moving average convergence-divergence (MACD) histogram to a double-smoothed relative strength index (RSI).

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, for the indicator to be ready and fully initialized.

Returns:

Required period, in data points, for the indicator to be ready and fully initialized.

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

DerivativeOscillator

class QuantConnect.Indicators.DerivativeOscillator[source]

Represents the Derivative Oscillator Indicator, utilizing a moving average convergence-divergence (MACD) histogram to a double-smoothed relative strength index (RSI).

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, for the indicator to be ready and fully initialized.

Returns:

Required period, in data points, for the indicator to be ready and fully initialized.

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Dividends

class QuantConnect.Data.Market.Dividends[source]

Collection of dividends keyed by Symbol

add(key, value)

Adds an item to the ICollection.

Parameters:
add(item)

Adds an item to the ICollection.

Parameters:
  • item (Dict[Symbol, Dividend])
clear()

Removes all keys and values from the IExtendedDictionary.

contains(item)

Determines whether the ICollection contains a specific value.

Parameters:
  • item (Dict[Symbol, Dividend])
Return type:

bool

contains_key(key)

Determines whether the IDictionary contains an element with the specified key.

Parameters:
Return type:

bool

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

copy_to(array, array_index)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters:
  • array (Dict)
  • array_index (int)
fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
Return type:

Dividend

get_enumerator()

Returns an enumerator that iterates through the collection.

Return type:

Dict[Symbol, Dividend]

get_value(key)

Gets the value associated with the specified key.

Parameters:
Return type:

Dividend

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
Return type:

Dividend

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

remove(item)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
  • item (Dict[Symbol, Dividend])
Return type:

bool

remove(key)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
Return type:

bool

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
Return type:

Dividend

try_get_value(key, value)

Gets the value associated with the specified key.

Parameters:
Return type:

bool

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property count

Gets the number of elements contained in the ICollection.

Returns:

Gets the number of elements contained in the ICollection.

Return type:

int

property is_read_only

Gets a value indicating whether the ICollection is read-only.

Returns:

Gets a value indicating whether the ICollection is read-only.

Return type:

bool

property item

Gets or sets the Dividend with the specified ticker.

Returns:

Gets or sets the Dividend with the specified ticker.

Return type:

Dividend

property keys

Gets an ICollection containing the keys of the IDictionary.

Returns:

Gets an ICollection containing the keys of the IDictionary.

Return type:

List[Symbol]

property time

Gets or sets the time associated with this collection of data

Returns:

Gets or sets the time associated with this collection of data

Return type:

datetime

property values

Gets an ICollection containing the values in the IDictionary.

Returns:

Gets an ICollection containing the values in the IDictionary.

Return type:

List[Dividend]

Dividends

class QuantConnect.Data.Market.Dividends[source]

Collection of dividends keyed by Symbol

Add(key, value)

Adds an item to the ICollection.

Parameters:
Add(item)

Adds an item to the ICollection.

Parameters:
  • item (KeyValuePair<Symbol, Dividend>)
Clear()

Removes all items from the ICollection.

Contains(item)

Determines whether the ICollection contains a specific value.

Parameters:
  • item (KeyValuePair<Symbol, Dividend>)
Return type:

Boolean

ContainsKey(key)

Determines whether the IDictionary contains an element with the specified key.

Parameters:
Return type:

Boolean

CopyTo(array, arrayIndex)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters:
  • array (KeyValuePair)
  • arrayIndex (Int32)
GetEnumerator()

Returns an enumerator that iterates through the collection.

Return type:

KeyValuePair[Symbol, Dividend]

GetValue(key)

Gets the value associated with the specified key.

Parameters:
Return type:

Dividend

Remove(item)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
  • item (KeyValuePair<Symbol, Dividend>)
Return type:

Boolean

Remove(key)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
Return type:

Boolean

TryGetValue(key, value)

Gets the value associated with the specified key.

Parameters:
Return type:

Boolean

clear()

Removes all keys and values from the IExtendedDictionary.

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
Return type:

Dividend

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
Return type:

Dividend

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
Return type:

Dividend

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property Count

Gets the number of elements contained in the ICollection.

Returns:

Gets the number of elements contained in the ICollection.

Return type:

Int32

property IsReadOnly

Gets a value indicating whether the ICollection is read-only.

Returns:

Gets a value indicating whether the ICollection is read-only.

Return type:

bool

property Keys

Gets an ICollection containing the keys of the IDictionary.

Returns:

Gets an ICollection containing the keys of the IDictionary.

Return type:

ICollection<Symbol>

property Time

Gets or sets the time associated with this collection of data

Returns:

Gets or sets the time associated with this collection of data

Return type:

DateTime

property Values

Gets an ICollection containing the values in the IDictionary.

Returns:

Gets an ICollection containing the values in the IDictionary.

Return type:

ICollection<Dividend>

property [QuantConnect.Symbol]

Gets or sets the Dividend with the specified Symbol.

Returns:

Gets or sets the Dividend with the specified Symbol.

Return type:

Dividend

property [System.String]

Gets or sets the Dividend with the specified ticker.

Returns:

Gets or sets the Dividend with the specified ticker.

Return type:

Dividend

Doji

class QuantConnect.Indicators.CandlestickPatterns.Doji[source]

Doji candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Doji

class QuantConnect.Indicators.CandlestickPatterns.Doji[source]

Doji candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

DojiStar

class QuantConnect.Indicators.CandlestickPatterns.DojiStar[source]

Doji Star candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

DojiStar

class QuantConnect.Indicators.CandlestickPatterns.DojiStar[source]

Doji Star candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

DragonflyDoji

class QuantConnect.Indicators.CandlestickPatterns.DragonflyDoji[source]

Dragonfly Doji candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

DragonflyDoji

class QuantConnect.Indicators.CandlestickPatterns.DragonflyDoji[source]

Dragonfly Doji candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Engulfing

class QuantConnect.Indicators.CandlestickPatterns.Engulfing[source]

Engulfing candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Engulfing

class QuantConnect.Indicators.CandlestickPatterns.Engulfing[source]

Engulfing candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Equity

class QuantConnect.Securities.Equity.Equity[source]

Equity Security Type : Extension of the underlying Security class for equity specific behaviours.

clear()

Removes every custom property that had been set.

get_last_data()

Get the last price update set to the security if any else null

Return type:

BaseData

refresh_data_normalization_mode_property()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

set_buying_power_model(buying_power_model)

Sets the buying power model

Parameters:
  • buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)

Sets the buying power model

Parameters:
  • py_object (PyObject)
set_data_filter(py_object)

Set Security Data Filter

Parameters:
  • py_object (PyObject)
set_data_filter(data_filter)

Set Security Data Filter

Parameters:
  • data_filter (ISecurityDataFilter)
set_data_normalization_mode(mode)

Sets the data normalization mode to be used by this security

Parameters:
set_fee_model(feel_model)

Sets the fee model

Parameters:
  • feel_model (PyObject | IFeeModel)
set_fill_model(fill_model)

Sets the fill model

Parameters:
  • fill_model (PyObject | IFillModel)
set_leverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (float)
set_local_time_keeper(local_time_keeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
set_margin_interest_rate_model(margin_interest_rate_model)

Sets the margin interests rate model

Parameters:
  • margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)

Sets the margin interests rate model

Parameters:
  • py_object (PyObject)
set_margin_model(py_object)

Sets the margin model

Parameters:
  • py_object (PyObject)
set_margin_model(margin_model)

Sets the margin model

Parameters:
  • margin_model (IBuyingPowerModel)
set_market_price(data)

Update any security properties based on the latest market data and time

Parameters:
set_settlement_model(settlement_model)

Sets the settlement model

Parameters:
  • settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)

Set Python Shortable Provider for this Security

Parameters:
  • py_object (PyObject)
set_shortable_provider(shortable_provider)

Set Python Shortable Provider for this Security

Parameters:
set_slippage_model(slippage_model)

Sets the slippage model

Parameters:
  • slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)

Sets the volatility model

Parameters:
  • volatility_model (IVolatilityModel | PyObject)
update(data, data_type, contains_fill_forward_data=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (List[BaseData])
  • data_type (Type)
  • contains_fill_forward_data (bool, optional)
property ask_price

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

float

property ask_size

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

float

property bid_price

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

float

property bid_size

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

float

property buying_power_model

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

float

property data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property data_filter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property fee_model

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property fill_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property has_data

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property high

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

float

property hold_stock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property is_delisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property is_tradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property item

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

property leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

float

property local_time

Local time for this market

Returns:

Local time for this market

Return type:

datetime

property low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

float

property margin_interest_rate_model

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property margin_model

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

float

property open_interest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property portfolio_model

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

float

property price_variation_model

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property primary_exchange

Equity primary exchange.

Returns:

Equity primary exchange.

Return type:

Exchange

property quote_currency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property settlement_model

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property shortable

Checks if the equity is a shortable asset. Note that this does not take into account any open orders or existing holdings. To check if the asset is currently shortable, use QCAlgorithm's ShortableQuantity property instead.

Returns:

Checks if the equity is a shortable asset. Note that this does not take into account any open orders or existing holdings. To check if the asset is currently shortable, use QCAlgorithm's ShortableQuantity property instead.

Return type:

bool

property shortable_provider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IintableProvider

property slippage_model

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List[SubscriptionDataConfig]

property symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property symbol_properties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property total_shortable_quantity

Gets the total quantity shortable for this security. This does not take into account any open orders or existing holdings. To check the asset's currently shortable quantity, use QCAlgorithm's ShortableQuantity property instead.

Returns:

Gets the total quantity shortable for this security. This does not take into account any open orders or existing holdings. To check the asset's currently shortable quantity, use QCAlgorithm's ShortableQuantity property instead.

Return type:

int

property type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property volatility_model

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

float

field DEFAULT_SETTLEMENT_DAYS

The default number of days required to settle an equity sale

Returns:

The default number of days required to settle an equity sale

Return type:

int

field DEFAULT_SETTLEMENT_TIME

The default time of day for settlement

Returns:

The default time of day for settlement

Return type:

timedelta

Equity

class QuantConnect.Securities.Equity.Equity[source]

Equity Security Type : Extension of the underlying Security class for equity specific behaviours.

Clear()

Removes every custom property that had been set.

GetLastData()

Get the last price update set to the security if any else null

Return type:

BaseData

RefreshDataNormalizationModeProperty()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

SetBuyingPowerModel(buyingPowerModel)

Sets the buying power model

Parameters:
  • buyingPowerModel (IBuyingPowerModel)
SetBuyingPowerModel(pyObject)

Sets the buying power model

Parameters:
  • pyObject (PyObject)
SetDataFilter(pyObject)

Set Security Data Filter

Parameters:
  • pyObject (PyObject)
SetDataFilter(dataFilter)

Set Security Data Filter

Parameters:
  • dataFilter (ISecurityDataFilter)
SetDataNormalizationMode(mode)

Sets the data normalization mode to be used by this security

Parameters:
SetFeeModel(feelModel)

Sets the fee model

Parameters:
  • feelModel (PyObject | IFeeModel)
SetFillModel(fillModel)

Sets the fill model

Parameters:
  • fillModel (PyObject | IFillModel)
SetLeverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (decimal)
SetLocalTimeKeeper(localTimeKeeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
SetMarginInterestRateModel(marginInterestRateModel)

Sets the margin interests rate model

Parameters:
  • marginInterestRateModel (IMarginInterestRateModel)
SetMarginInterestRateModel(pyObject)

Sets the margin interests rate model

Parameters:
  • pyObject (PyObject)
SetMarginModel(pyObject)

Sets the margin model

Parameters:
  • pyObject (PyObject)
SetMarginModel(marginModel)

Sets the margin model

Parameters:
  • marginModel (IBuyingPowerModel)
SetMarketPrice(data)

Update any security properties based on the latest market data and time

Parameters:
SetSettlementModel(settlementModel)

Sets the settlement model

Parameters:
  • settlementModel (ISettlementModel | PyObject)
SetShortableProvider(pyObject)

Set Python Shortable Provider for this Security

Parameters:
  • pyObject (PyObject)
SetShortableProvider(shortableProvider)

Set Python Shortable Provider for this Security

Parameters:
  • shortableProvider (IShortableProvider)
SetSlippageModel(slippageModel)

Sets the slippage model

Parameters:
  • slippageModel (ISlippageModel | PyObject)
SetVolatilityModel(volatilityModel)

Sets the volatility model

Parameters:
  • volatilityModel (IVolatilityModel | PyObject)
Update(data, dataType, containsFillForwardData=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (IReadOnlyList<BaseData>)
  • dataType (Type)
  • containsFillForwardData (Boolean, optional)
property AskPrice

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

decimal

property AskSize

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

decimal

property BidPrice

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

decimal

property BidSize

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

decimal

property BuyingPowerModel

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property Cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property Close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

decimal

property Data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property DataFilter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property Exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property FeeModel

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property FillModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property Fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property HasData

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property High

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

decimal

property HoldStock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property Holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property Invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property IsDelisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property IsTradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property Leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

decimal

property LocalTime

Local time for this market

Returns:

Local time for this market

Return type:

DateTime

property Low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

decimal

property MarginInterestRateModel

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property MarginModel

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property Open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

decimal

property OpenInterest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property PortfolioModel

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property Price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

decimal

property PriceVariationModel

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property PrimaryExchange

Equity primary exchange.

Returns:

Equity primary exchange.

Return type:

Exchange

property QuoteCurrency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property SettlementModel

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property Shortable

Checks if the equity is a shortable asset. Note that this does not take into account any open orders or existing holdings. To check if the asset is currently shortable, use QCAlgorithm's ShortableQuantity property instead.

Returns:

Checks if the equity is a shortable asset. Note that this does not take into account any open orders or existing holdings. To check if the asset is currently shortable, use QCAlgorithm's ShortableQuantity property instead.

Return type:

bool

property ShortableProvider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IShortableProvider

property SlippageModel

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property Subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List<SubscriptionDataConfig>

property Symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property SymbolProperties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property TotalShortableQuantity

Gets the total quantity shortable for this security. This does not take into account any open orders or existing holdings. To check the asset's currently shortable quantity, use QCAlgorithm's ShortableQuantity property instead.

Returns:

Gets the total quantity shortable for this security. This does not take into account any open orders or existing holdings. To check the asset's currently shortable quantity, use QCAlgorithm's ShortableQuantity property instead.

Return type:

Int64

property Type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property VolatilityModel

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property Volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

decimal

property [System.String]

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

field DefaultSettlementDays

The default number of days required to settle an equity sale

Returns:

The default number of days required to settle an equity sale

Return type:

Int32

field DefaultSettlementTime

The default time of day for settlement

Returns:

The default time of day for settlement

Return type:

TimeSpan

EveningDojiStar

class QuantConnect.Indicators.CandlestickPatterns.EveningDojiStar[source]

Evening Doji Star candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

EveningDojiStar

class QuantConnect.Indicators.CandlestickPatterns.EveningDojiStar[source]

Evening Doji Star candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

EveningStar

class QuantConnect.Indicators.CandlestickPatterns.EveningStar[source]

Evening Star candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

EveningStar

class QuantConnect.Indicators.CandlestickPatterns.EveningStar[source]

Evening Star candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Forex

class QuantConnect.Securities.Forex.Forex[source]

FOREX Security Object Implementation for FOREX Assets

clear()

Removes every custom property that had been set.

get_last_data()

Get the last price update set to the security if any else null

Return type:

BaseData

refresh_data_normalization_mode_property()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

set_buying_power_model(buying_power_model)

Sets the buying power model

Parameters:
  • buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)

Sets the buying power model

Parameters:
  • py_object (PyObject)
set_data_filter(py_object)

Set Security Data Filter

Parameters:
  • py_object (PyObject)
set_data_filter(data_filter)

Set Security Data Filter

Parameters:
  • data_filter (ISecurityDataFilter)
set_fee_model(feel_model)

Sets the fee model

Parameters:
  • feel_model (PyObject | IFeeModel)
set_fill_model(fill_model)

Sets the fill model

Parameters:
  • fill_model (PyObject | IFillModel)
set_leverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (float)
set_local_time_keeper(local_time_keeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
set_margin_interest_rate_model(margin_interest_rate_model)

Sets the margin interests rate model

Parameters:
  • margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)

Sets the margin interests rate model

Parameters:
  • py_object (PyObject)
set_margin_model(py_object)

Sets the margin model

Parameters:
  • py_object (PyObject)
set_margin_model(margin_model)

Sets the margin model

Parameters:
  • margin_model (IBuyingPowerModel)
set_market_price(data)

Update any security properties based on the latest market data and time

Parameters:
set_settlement_model(settlement_model)

Sets the settlement model

Parameters:
  • settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)

Set Python Shortable Provider for this Security

Parameters:
  • py_object (PyObject)
set_shortable_provider(shortable_provider)

Set Python Shortable Provider for this Security

Parameters:
set_slippage_model(slippage_model)

Sets the slippage model

Parameters:
  • slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)

Sets the volatility model

Parameters:
  • volatility_model (IVolatilityModel | PyObject)
update(data, data_type, contains_fill_forward_data=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (List[BaseData])
  • data_type (Type)
  • contains_fill_forward_data (bool, optional)
property ask_price

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

float

property ask_size

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

float

property base_currency

Gets the currency acquired by going long this currency pair

Returns:

Gets the currency acquired by going long this currency pair

Return type:

Cash

property bid_price

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

float

property bid_size

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

float

property buying_power_model

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

float

property data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property data_filter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property fee_model

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property fill_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property has_data

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property high

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

float

property hold_stock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property is_delisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property is_tradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property item

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

property leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

float

property local_time

Local time for this market

Returns:

Local time for this market

Return type:

datetime

property low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

float

property margin_interest_rate_model

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property margin_model

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

float

property open_interest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property portfolio_model

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

float

property price_variation_model

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property quote_currency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property settlement_model

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property shortable_provider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IintableProvider

property slippage_model

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List[SubscriptionDataConfig]

property symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property symbol_properties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property volatility_model

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

float

Forex

class QuantConnect.Securities.Forex.Forex[source]

FOREX Security Object Implementation for FOREX Assets

Clear()

Removes every custom property that had been set.

GetLastData()

Get the last price update set to the security if any else null

Return type:

BaseData

RefreshDataNormalizationModeProperty()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

SetBuyingPowerModel(buyingPowerModel)

Sets the buying power model

Parameters:
  • buyingPowerModel (IBuyingPowerModel)
SetBuyingPowerModel(pyObject)

Sets the buying power model

Parameters:
  • pyObject (PyObject)
SetDataFilter(pyObject)

Set Security Data Filter

Parameters:
  • pyObject (PyObject)
SetDataFilter(dataFilter)

Set Security Data Filter

Parameters:
  • dataFilter (ISecurityDataFilter)
SetFeeModel(feelModel)

Sets the fee model

Parameters:
  • feelModel (PyObject | IFeeModel)
SetFillModel(fillModel)

Sets the fill model

Parameters:
  • fillModel (PyObject | IFillModel)
SetLeverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (decimal)
SetLocalTimeKeeper(localTimeKeeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
SetMarginInterestRateModel(marginInterestRateModel)

Sets the margin interests rate model

Parameters:
  • marginInterestRateModel (IMarginInterestRateModel)
SetMarginInterestRateModel(pyObject)

Sets the margin interests rate model

Parameters:
  • pyObject (PyObject)
SetMarginModel(pyObject)

Sets the margin model

Parameters:
  • pyObject (PyObject)
SetMarginModel(marginModel)

Sets the margin model

Parameters:
  • marginModel (IBuyingPowerModel)
SetMarketPrice(data)

Update any security properties based on the latest market data and time

Parameters:
SetSettlementModel(settlementModel)

Sets the settlement model

Parameters:
  • settlementModel (ISettlementModel | PyObject)
SetShortableProvider(pyObject)

Set Python Shortable Provider for this Security

Parameters:
  • pyObject (PyObject)
SetShortableProvider(shortableProvider)

Set Python Shortable Provider for this Security

Parameters:
  • shortableProvider (IShortableProvider)
SetSlippageModel(slippageModel)

Sets the slippage model

Parameters:
  • slippageModel (ISlippageModel | PyObject)
SetVolatilityModel(volatilityModel)

Sets the volatility model

Parameters:
  • volatilityModel (IVolatilityModel | PyObject)
Update(data, dataType, containsFillForwardData=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (IReadOnlyList<BaseData>)
  • dataType (Type)
  • containsFillForwardData (Boolean, optional)
property AskPrice

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

decimal

property AskSize

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

decimal

property BaseCurrency

Gets the currency acquired by going long this currency pair

Returns:

Gets the currency acquired by going long this currency pair

Return type:

Cash

property BidPrice

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

decimal

property BidSize

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

decimal

property BuyingPowerModel

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property Cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property Close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

decimal

property Data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property DataFilter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property Exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property FeeModel

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property FillModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property Fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property HasData

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property High

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

decimal

property HoldStock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property Holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property Invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property IsDelisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property IsTradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property Leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

decimal

property LocalTime

Local time for this market

Returns:

Local time for this market

Return type:

DateTime

property Low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

decimal

property MarginInterestRateModel

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property MarginModel

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property Open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

decimal

property OpenInterest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property PortfolioModel

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property Price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

decimal

property PriceVariationModel

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property QuoteCurrency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property SettlementModel

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property ShortableProvider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IShortableProvider

property SlippageModel

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property Subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List<SubscriptionDataConfig>

property Symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property SymbolProperties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property Type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property VolatilityModel

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property Volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

decimal

property [System.String]

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

Fundamental

class QuantConnect.Data.Fundamental.Fundamental[source]

Lean fundamental data class

clone(fill_forward)

Return a new instance clone of this object, used in fill forward

Parameters:
  • fill_forward (bool)
Return type:

BaseData

data_time_zone()

Specifies the data time zone for this data type. This is useful for custom data types

Return type:

datetimeZone

default_resolution()

Gets the default resolution for this data and security type

Return type:

Resolution

get_source(config, date, is_live_mode)

Return the URL string source of the file. This will be converted to a stream

Parameters:
Return type:

SubscriptionDataSource

is_sparse_data()

Indicates that the data set is expected to be sparse

Return type:

bool

reader(config, line, date, is_live_mode)

Will read a new instance from the given line

Parameters:
Return type:

BaseData

reader(config, stream, date, is_live_mode)

Reader converts each line of the data source into BaseData objects. Each data type creates its own factory method, and returns a new instance of the object each time it is called. The returned object is assumed to be time stamped in the config.ExchangeTimeZone.

Parameters:
Return type:

BaseData

requires_mapping()

Indicates if there is support for mapping

Return type:

bool

should_cache_to_security()

Indicates whether this contains data that should be stored in the security cache

Return type:

bool

supported_resolutions()

This is a daily data set

Return type:

List[Resolution]

update(last_trade, bid_price, ask_price, volume, bid_size, ask_size)

Updates this base data with a new trade

Parameters:
  • last_trade (float)
  • bid_price (float)
  • ask_price (float)
  • volume (float)
  • bid_size (float)
  • ask_size (float)
update_ask(ask_price, ask_size)

Updates this base data with the new quote ask information

Parameters:
  • ask_price (float)
  • ask_size (float)
update_bid(bid_price, bid_size)

Updates this base data with the new quote bid information

Parameters:
  • bid_price (float)
  • bid_size (float)
update_quote(bid_price, bid_size, ask_price, ask_size)

Updates this base data with new quote information

Parameters:
  • bid_price (float)
  • bid_size (float)
  • ask_price (float)
  • ask_size (float)
update_trade(last_trade, trade_size)

Updates this base data with a new trade

Parameters:
  • last_trade (float)
  • trade_size (float)
property adjusted_price

Gets the split and dividend adjusted price

Returns:

Gets the split and dividend adjusted price

Return type:

float

property asset_classification

The instance of the AssetClassification class

Returns:

The instance of the AssetClassification class

Return type:

AssetClassification

property company_profile

The instance of the CompanyProfile class

Returns:

The instance of the CompanyProfile class

Return type:

CompanyProfile

property company_reference

The instance of the CompanyReference class

Returns:

The instance of the CompanyReference class

Return type:

CompanyReference

property data_type

Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

Returns:

Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

Return type:

MarketDataType

property dollar_volume

Gets the day's dollar volume for this symbol

Returns:

Gets the day's dollar volume for this symbol

Return type:

float

property earning_ratios

The instance of the EarningRatios class

Returns:

The instance of the EarningRatios class

Return type:

EarningRatios

property earning_reports

The instance of the EarningReports class

Returns:

The instance of the EarningReports class

Return type:

EarningReports

property end_time

The end time of this data.

Returns:

The end time of this data.

Return type:

datetime

property financial_statements

The instance of the FinancialStatements class

Returns:

The instance of the FinancialStatements class

Return type:

FinancialStatements

property has_fundamental_data

Returns whether the symbol has fundamental data for the given date

Returns:

Returns whether the symbol has fundamental data for the given date

Return type:

bool

property is_fill_forward

True if this is a fill forward piece of data

Returns:

True if this is a fill forward piece of data

Return type:

bool

property market

Gets the market for this symbol

Returns:

Gets the market for this symbol

Return type:

str

property market_cap

Price * Total SharesOutstanding. The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding. For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).

Returns:

Price * Total SharesOutstanding. The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding. For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).

Return type:

int

property operation_ratios

The instance of the OperationRatios class

Returns:

The instance of the OperationRatios class

Return type:

OperationRatios

property price

Gets the raw price

Returns:

Gets the raw price

Return type:

float

property price_factor

Gets the price factor for the given date

Returns:

Gets the price factor for the given date

Return type:

float

property price_scale_factor

Gets the combined factor used to create adjusted prices from raw prices

Returns:

Gets the combined factor used to create adjusted prices from raw prices

Return type:

float

property security_reference

The instance of the SecurityReference class

Returns:

The instance of the SecurityReference class

Return type:

SecurityReference

property split_factor

Gets the split factor for the given date

Returns:

Gets the split factor for the given date

Return type:

float

property symbol

Symbol representation for underlying Security

Returns:

Symbol representation for underlying Security

Return type:

Symbol

property time

Current time marker of this data packet.

Returns:

Current time marker of this data packet.

Return type:

datetime

property valuation_ratios

The instance of the ValuationRatios class

Returns:

The instance of the ValuationRatios class

Return type:

ValuationRatios

property value

Gets the raw price

Returns:

Gets the raw price

Return type:

float

property volume

Gets the day's total volume

Returns:

Gets the day's total volume

Return type:

int

Fundamental

class QuantConnect.Data.Fundamental.Fundamental[source]

Lean fundamental data class

Clone(fillForward)

Return a new instance clone of this object, used in fill forward

Parameters:
  • fillForward (bool)
Return type:

BaseData

DataTimeZone()

Specifies the data time zone for this data type. This is useful for custom data types

Return type:

DateTimeZone

DefaultResolution()

Gets the default resolution for this data and security type

Return type:

Resolution

GetSource(config, date, isLiveMode)

Return the URL string source of the file. This will be converted to a stream

Parameters:
Return type:

SubscriptionDataSource

IsSparseData()

Indicates that the data set is expected to be sparse

Return type:

Boolean

Reader(config, line, date, isLiveMode)

Will read a new instance from the given line

Parameters:
Return type:

BaseData

Reader(config, stream, date, isLiveMode)

Reader converts each line of the data source into BaseData objects. Each data type creates its own factory method, and returns a new instance of the object each time it is called. The returned object is assumed to be time stamped in the config.ExchangeTimeZone.

Parameters:
Return type:

BaseData

RequiresMapping()

Indicates if there is support for mapping

Return type:

Boolean

ShouldCacheToSecurity()

Indicates whether this contains data that should be stored in the security cache

Return type:

Boolean

SupportedResolutions()

This is a daily data set

Return type:

List[Resolution]

Update(lastTrade, bidPrice, askPrice, volume, bidSize, askSize)

Updates this base data with a new trade

Parameters:
  • lastTrade (decimal)
  • bidPrice (decimal)
  • askPrice (decimal)
  • volume (decimal)
  • bidSize (decimal)
  • askSize (decimal)
UpdateAsk(askPrice, askSize)

Updates this base data with the new quote ask information

Parameters:
  • askPrice (decimal)
  • askSize (decimal)
UpdateBid(bidPrice, bidSize)

Updates this base data with the new quote bid information

Parameters:
  • bidPrice (decimal)
  • bidSize (decimal)
UpdateQuote(bidPrice, bidSize, askPrice, askSize)

Updates this base data with new quote information

Parameters:
  • bidPrice (decimal)
  • bidSize (decimal)
  • askPrice (decimal)
  • askSize (decimal)
UpdateTrade(lastTrade, tradeSize)

Updates this base data with a new trade

Parameters:
  • lastTrade (decimal)
  • tradeSize (decimal)
property AdjustedPrice

Gets the split and dividend adjusted price

Returns:

Gets the split and dividend adjusted price

Return type:

decimal

property AssetClassification

The instance of the AssetClassification class

Returns:

The instance of the AssetClassification class

Return type:

AssetClassification

property CompanyProfile

The instance of the CompanyProfile class

Returns:

The instance of the CompanyProfile class

Return type:

CompanyProfile

property CompanyReference

The instance of the CompanyReference class

Returns:

The instance of the CompanyReference class

Return type:

CompanyReference

property DataType

Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

Returns:

Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

Return type:

MarketDataType

property DollarVolume

Gets the day's dollar volume for this symbol

Returns:

Gets the day's dollar volume for this symbol

Return type:

Double

property EarningRatios

The instance of the EarningRatios class

Returns:

The instance of the EarningRatios class

Return type:

EarningRatios

property EarningReports

The instance of the EarningReports class

Returns:

The instance of the EarningReports class

Return type:

EarningReports

property EndTime

The end time of this data.

Returns:

The end time of this data.

Return type:

DateTime

property FinancialStatements

The instance of the FinancialStatements class

Returns:

The instance of the FinancialStatements class

Return type:

FinancialStatements

property HasFundamentalData

Returns whether the symbol has fundamental data for the given date

Returns:

Returns whether the symbol has fundamental data for the given date

Return type:

bool

property IsFillForward

True if this is a fill forward piece of data

Returns:

True if this is a fill forward piece of data

Return type:

bool

property Market

Gets the market for this symbol

Returns:

Gets the market for this symbol

Return type:

string

property MarketCap

Price * Total SharesOutstanding. The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding. For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).

Returns:

Price * Total SharesOutstanding. The most current market cap for example, would be the most recent closing price x the most recent reported shares outstanding. For ADR share classes, market cap is price * (ordinary shares outstanding / adr ratio).

Return type:

int

property OperationRatios

The instance of the OperationRatios class

Returns:

The instance of the OperationRatios class

Return type:

OperationRatios

property Price

Gets the raw price

Returns:

Gets the raw price

Return type:

decimal

property PriceFactor

Gets the price factor for the given date

Returns:

Gets the price factor for the given date

Return type:

decimal

property PriceScaleFactor

Gets the combined factor used to create adjusted prices from raw prices

Returns:

Gets the combined factor used to create adjusted prices from raw prices

Return type:

decimal

property SecurityReference

The instance of the SecurityReference class

Returns:

The instance of the SecurityReference class

Return type:

SecurityReference

property SplitFactor

Gets the split factor for the given date

Returns:

Gets the split factor for the given date

Return type:

decimal

property Symbol

Symbol representation for underlying Security

Returns:

Symbol representation for underlying Security

Return type:

Symbol

property Time

Current time marker of this data packet.

Returns:

Current time marker of this data packet.

Return type:

DateTime

property ValuationRatios

The instance of the ValuationRatios class

Returns:

The instance of the ValuationRatios class

Return type:

ValuationRatios

property Value

Gets the raw price

Returns:

Gets the raw price

Return type:

decimal

property Volume

Gets the day's total volume

Returns:

Gets the day's total volume

Return type:

int

Future

class QuantConnect.Securities.Future.Future[source]

Futures Security Object Implementation for Futures Assets

clear()

Removes every custom property that had been set.

get_last_data()

Get the last price update set to the security if any else null

Return type:

BaseData

refresh_data_normalization_mode_property()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

set_buying_power_model(buying_power_model)

Sets the buying power model

Parameters:
  • buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)

Sets the buying power model

Parameters:
  • py_object (PyObject)
set_data_filter(py_object)

Set Security Data Filter

Parameters:
  • py_object (PyObject)
set_data_filter(data_filter)

Set Security Data Filter

Parameters:
  • data_filter (ISecurityDataFilter)
set_fee_model(feel_model)

Sets the fee model

Parameters:
  • feel_model (PyObject | IFeeModel)
set_fill_model(fill_model)

Sets the fill model

Parameters:
  • fill_model (PyObject | IFillModel)
set_filter(min_expiry, max_expiry)

Sets the ContractFilter to a new instance of the filter using the specified expiration range values

Parameters:
  • min_expiry (timedelta)
  • max_expiry (timedelta)
set_filter(min_expiry_days, max_expiry_days)

Sets the ContractFilter to a new instance of the filter using the specified expiration range values

Parameters:
  • min_expiry_days (int)
  • max_expiry_days (int)
set_filter(universe_func)

Sets the ContractFilter to a new instance of the filter using the specified expiration range values

Parameters:
  • universe_func (PyObject | Callable[FutureFilterUniverse, FutureFilterUniverse])
set_leverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (float)
set_local_time_keeper(local_time_keeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
set_margin_interest_rate_model(margin_interest_rate_model)

Sets the margin interests rate model

Parameters:
  • margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)

Sets the margin interests rate model

Parameters:
  • py_object (PyObject)
set_margin_model(py_object)

Sets the margin model

Parameters:
  • py_object (PyObject)
set_margin_model(margin_model)

Sets the margin model

Parameters:
  • margin_model (IBuyingPowerModel)
set_market_price(data)

Update any security properties based on the latest market data and time

Parameters:
set_settlement_model(settlement_model)

Sets the settlement model

Parameters:
  • settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)

Set Python Shortable Provider for this Security

Parameters:
  • py_object (PyObject)
set_shortable_provider(shortable_provider)

Set Python Shortable Provider for this Security

Parameters:
set_slippage_model(slippage_model)

Sets the slippage model

Parameters:
  • slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)

Sets the volatility model

Parameters:
  • volatility_model (IVolatilityModel | PyObject)
update(data, data_type, contains_fill_forward_data=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (List[BaseData])
  • data_type (Type)
  • contains_fill_forward_data (bool, optional)
property ask_price

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

float

property ask_size

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

float

property bid_price

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

float

property bid_size

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

float

property buying_power_model

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

float

property contract_filter

Gets or sets the contract filter

Returns:

Gets or sets the contract filter

Return type:

IDerivativeSecurityFilter

property data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property data_filter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property expiry

Gets the expiration date

Returns:

Gets the expiration date

Return type:

datetime

property fee_model

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property fill_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property has_data

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property high

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

float

property hold_stock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property is_delisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property is_future_chain

Returns true if this is the future chain security, false if it is a specific future contract

Returns:

Returns true if this is the future chain security, false if it is a specific future contract

Return type:

bool

property is_future_contract

Returns true if this is a specific future contract security, false if it is the future chain security

Returns:

Returns true if this is a specific future contract security, false if it is the future chain security

Return type:

bool

property is_tradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property item

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

property leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

float

property local_time

Local time for this market

Returns:

Local time for this market

Return type:

datetime

property low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

float

property mapped

Gets or sets the currently mapped symbol for the security

Returns:

Gets or sets the currently mapped symbol for the security

Return type:

Symbol

property margin_interest_rate_model

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property margin_model

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

float

property open_interest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property portfolio_model

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

float

property price_variation_model

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property quote_currency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property settlement_model

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property settlement_type

Specifies if futures contract has physical or cash settlement on settlement

Returns:

Specifies if futures contract has physical or cash settlement on settlement

Return type:

SettlementType

property shortable_provider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IintableProvider

property slippage_model

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List[SubscriptionDataConfig]

property symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property symbol_properties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property underlying

Gets or sets the underlying security object.

Returns:

Gets or sets the underlying security object.

Return type:

Security

property volatility_model

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

float

field DEFAULT_SETTLEMENT_DAYS

The default number of days required to settle a futures sale

Returns:

The default number of days required to settle a futures sale

Return type:

int

field DEFAULT_SETTLEMENT_TIME

The default time of day for settlement

Returns:

The default time of day for settlement

Return type:

timedelta

Future

class QuantConnect.Securities.Future.Future[source]

Futures Security Object Implementation for Futures Assets

Clear()

Removes every custom property that had been set.

GetLastData()

Get the last price update set to the security if any else null

Return type:

BaseData

RefreshDataNormalizationModeProperty()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

SetBuyingPowerModel(buyingPowerModel)

Sets the buying power model

Parameters:
  • buyingPowerModel (IBuyingPowerModel)
SetBuyingPowerModel(pyObject)

Sets the buying power model

Parameters:
  • pyObject (PyObject)
SetDataFilter(pyObject)

Set Security Data Filter

Parameters:
  • pyObject (PyObject)
SetDataFilter(dataFilter)

Set Security Data Filter

Parameters:
  • dataFilter (ISecurityDataFilter)
SetFeeModel(feelModel)

Sets the fee model

Parameters:
  • feelModel (PyObject | IFeeModel)
SetFillModel(fillModel)

Sets the fill model

Parameters:
  • fillModel (PyObject | IFillModel)
SetFilter(minExpiry, maxExpiry)

Sets the ContractFilter to a new instance of the filter using the specified expiration range values

Parameters:
  • minExpiry (TimeSpan)
  • maxExpiry (TimeSpan)
SetFilter(minExpiryDays, maxExpiryDays)

Sets the ContractFilter to a new instance of the filter using the specified expiration range values

Parameters:
  • minExpiryDays (Int32)
  • maxExpiryDays (Int32)
SetFilter(universeFunc)

Sets the ContractFilter to a new instance of the filter using the specified expiration range values

Parameters:
  • universeFunc (PyObject | Func[FutureFilterUniverse, FutureFilterUniverse])
SetLeverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (decimal)
SetLocalTimeKeeper(localTimeKeeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
SetMarginInterestRateModel(marginInterestRateModel)

Sets the margin interests rate model

Parameters:
  • marginInterestRateModel (IMarginInterestRateModel)
SetMarginInterestRateModel(pyObject)

Sets the margin interests rate model

Parameters:
  • pyObject (PyObject)
SetMarginModel(pyObject)

Sets the margin model

Parameters:
  • pyObject (PyObject)
SetMarginModel(marginModel)

Sets the margin model

Parameters:
  • marginModel (IBuyingPowerModel)
SetMarketPrice(data)

Update any security properties based on the latest market data and time

Parameters:
SetSettlementModel(settlementModel)

Sets the settlement model

Parameters:
  • settlementModel (ISettlementModel | PyObject)
SetShortableProvider(pyObject)

Set Python Shortable Provider for this Security

Parameters:
  • pyObject (PyObject)
SetShortableProvider(shortableProvider)

Set Python Shortable Provider for this Security

Parameters:
  • shortableProvider (IShortableProvider)
SetSlippageModel(slippageModel)

Sets the slippage model

Parameters:
  • slippageModel (ISlippageModel | PyObject)
SetVolatilityModel(volatilityModel)

Sets the volatility model

Parameters:
  • volatilityModel (IVolatilityModel | PyObject)
Update(data, dataType, containsFillForwardData=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (IReadOnlyList<BaseData>)
  • dataType (Type)
  • containsFillForwardData (Boolean, optional)
property AskPrice

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

decimal

property AskSize

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

decimal

property BidPrice

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

decimal

property BidSize

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

decimal

property BuyingPowerModel

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property Cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property Close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

decimal

property ContractFilter

Gets or sets the contract filter

Returns:

Gets or sets the contract filter

Return type:

IDerivativeSecurityFilter

property Data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property DataFilter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property Exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property Expiry

Gets the expiration date

Returns:

Gets the expiration date

Return type:

DateTime

property FeeModel

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property FillModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property Fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property HasData

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property High

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

decimal

property HoldStock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property Holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property Invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property IsDelisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property IsFutureChain

Returns true if this is the future chain security, false if it is a specific future contract

Returns:

Returns true if this is the future chain security, false if it is a specific future contract

Return type:

bool

property IsFutureContract

Returns true if this is a specific future contract security, false if it is the future chain security

Returns:

Returns true if this is a specific future contract security, false if it is the future chain security

Return type:

bool

property IsTradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property Leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

decimal

property LocalTime

Local time for this market

Returns:

Local time for this market

Return type:

DateTime

property Low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

decimal

property Mapped

Gets or sets the currently mapped symbol for the security

Returns:

Gets or sets the currently mapped symbol for the security

Return type:

Symbol

property MarginInterestRateModel

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property MarginModel

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property Open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

decimal

property OpenInterest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property PortfolioModel

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property Price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

decimal

property PriceVariationModel

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property QuoteCurrency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property SettlementModel

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property SettlementType

Specifies if futures contract has physical or cash settlement on settlement

Returns:

Specifies if futures contract has physical or cash settlement on settlement

Return type:

SettlementType

property ShortableProvider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IShortableProvider

property SlippageModel

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property Subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List<SubscriptionDataConfig>

property Symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property SymbolProperties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property Type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property Underlying

Gets or sets the underlying security object.

Returns:

Gets or sets the underlying security object.

Return type:

Security

property VolatilityModel

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property Volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

decimal

property [System.String]

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

field DefaultSettlementDays

The default number of days required to settle a futures sale

Returns:

The default number of days required to settle a futures sale

Return type:

Int32

field DefaultSettlementTime

The default time of day for settlement

Returns:

The default time of day for settlement

Return type:

TimeSpan

GapSideBySideWhite

class QuantConnect.Indicators.CandlestickPatterns.GapSideBySideWhite[source]

Up/Down-gap side-by-side white lines candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

GapSideBySideWhite

class QuantConnect.Indicators.CandlestickPatterns.GapSideBySideWhite[source]

Up/Down-gap side-by-side white lines candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

GravestoneDoji

class QuantConnect.Indicators.CandlestickPatterns.GravestoneDoji[source]

Gravestone Doji candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

GravestoneDoji

class QuantConnect.Indicators.CandlestickPatterns.GravestoneDoji[source]

Gravestone Doji candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Hammer

class QuantConnect.Indicators.CandlestickPatterns.Hammer[source]

Hammer candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Hammer

class QuantConnect.Indicators.CandlestickPatterns.Hammer[source]

Hammer candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

HangingMan

class QuantConnect.Indicators.CandlestickPatterns.HangingMan[source]

Hanging Man candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

HangingMan

class QuantConnect.Indicators.CandlestickPatterns.HangingMan[source]

Hanging Man candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Harami

class QuantConnect.Indicators.CandlestickPatterns.Harami[source]

Harami candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Harami

class QuantConnect.Indicators.CandlestickPatterns.Harami[source]

Harami candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

HaramiCross

class QuantConnect.Indicators.CandlestickPatterns.HaramiCross[source]

Harami Cross candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

HaramiCross

class QuantConnect.Indicators.CandlestickPatterns.HaramiCross[source]

Harami Cross candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

HighWaveCandle

class QuantConnect.Indicators.CandlestickPatterns.HighWaveCandle[source]

High-Wave Candle candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

HighWaveCandle

class QuantConnect.Indicators.CandlestickPatterns.HighWaveCandle[source]

High-Wave Candle candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Hikkake

class QuantConnect.Indicators.CandlestickPatterns.Hikkake[source]

Hikkake candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Hikkake

class QuantConnect.Indicators.CandlestickPatterns.Hikkake[source]

Hikkake candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

HikkakeModified

class QuantConnect.Indicators.CandlestickPatterns.HikkakeModified[source]

Hikkake Modified candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

HikkakeModified

class QuantConnect.Indicators.CandlestickPatterns.HikkakeModified[source]

Hikkake Modified candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

HistoryRequest

class QuantConnect.Data.HistoryRequest[source]

Represents a request for historical data

property contract_depth_offset

The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract

Returns:

The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract

Return type:

int

property data_mapping_mode

Gets the data mapping mode used for this subscription

Returns:

Gets the data mapping mode used for this subscription

Return type:

DataMappingMode

property data_normalization_mode

Gets the normalization mode used for this subscription

Returns:

Gets the normalization mode used for this subscription

Return type:

DataNormalizationMode

property data_time_zone

Gets the time zone of the time stamps on the raw input data

Returns:

Gets the time zone of the time stamps on the raw input data

Return type:

datetimeZone

property data_type

Gets the data type used to process the subscription request, this type must derive from BaseData

Returns:

Gets the data type used to process the subscription request, this type must derive from BaseData

Return type:

Type

property end_time_local

Gets the EndTimeUtc in the security's exchange time zone

Returns:

Gets the EndTimeUtc in the security's exchange time zone

Return type:

datetime

property end_time_utc

Gets the end of the requested time interval in UTC

Returns:

Gets the end of the requested time interval in UTC

Return type:

datetime

property exchange_hours

Gets the exchange hours used for processing fill forward requests

Returns:

Gets the exchange hours used for processing fill forward requests

Return type:

SecurityExchangeHours

property fill_forward_resolution

Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.

Returns:

Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.

Return type:

Resolution

property include_extended_market_hours

Gets whether or not to include extended market hours data, set to false for only normal market hours

Returns:

Gets whether or not to include extended market hours data, set to false for only normal market hours

Return type:

bool

property is_custom_data

Gets true if this is a custom data request, false for normal QC data

Returns:

Gets true if this is a custom data request, false for normal QC data

Return type:

bool

property resolution

Gets the requested data resolution

Returns:

Gets the requested data resolution

Return type:

Resolution

property start_time_local

Gets the StartTimeUtc in the security's exchange time zone

Returns:

Gets the StartTimeUtc in the security's exchange time zone

Return type:

datetime

property start_time_utc

Gets the beginning of the requested time interval in UTC

Returns:

Gets the beginning of the requested time interval in UTC

Return type:

datetime

property symbol

Gets the symbol to request data for

Returns:

Gets the symbol to request data for

Return type:

Symbol

property tick_type

TickType of the history request

Returns:

TickType of the history request

Return type:

TickType

property tradable_days_in_data_time_zone

Gets the tradable days specified by this request, in the security's data time zone

Returns:

Gets the tradable days specified by this request, in the security's data time zone

Return type:

List[datetime]

HistoryRequest

class QuantConnect.Data.HistoryRequest[source]

Represents a request for historical data

property ContractDepthOffset

The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract

Returns:

The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract

Return type:

UInt32

property DataMappingMode

Gets the data mapping mode used for this subscription

Returns:

Gets the data mapping mode used for this subscription

Return type:

DataMappingMode

property DataNormalizationMode

Gets the normalization mode used for this subscription

Returns:

Gets the normalization mode used for this subscription

Return type:

DataNormalizationMode

property DataTimeZone

Gets the time zone of the time stamps on the raw input data

Returns:

Gets the time zone of the time stamps on the raw input data

Return type:

DateTimeZone

property DataType

Gets the data type used to process the subscription request, this type must derive from BaseData

Returns:

Gets the data type used to process the subscription request, this type must derive from BaseData

Return type:

Type

property EndTimeLocal

Gets the EndTimeUtc in the security's exchange time zone

Returns:

Gets the EndTimeUtc in the security's exchange time zone

Return type:

DateTime

property EndTimeUtc

Gets the end of the requested time interval in UTC

Returns:

Gets the end of the requested time interval in UTC

Return type:

DateTime

property ExchangeHours

Gets the exchange hours used for processing fill forward requests

Returns:

Gets the exchange hours used for processing fill forward requests

Return type:

SecurityExchangeHours

property FillForwardResolution

Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.

Returns:

Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.

Return type:

Resolution

property IncludeExtendedMarketHours

Gets whether or not to include extended market hours data, set to false for only normal market hours

Returns:

Gets whether or not to include extended market hours data, set to false for only normal market hours

Return type:

bool

property IsCustomData

Gets true if this is a custom data request, false for normal QC data

Returns:

Gets true if this is a custom data request, false for normal QC data

Return type:

bool

property Resolution

Gets the requested data resolution

Returns:

Gets the requested data resolution

Return type:

Resolution

property StartTimeLocal

Gets the StartTimeUtc in the security's exchange time zone

Returns:

Gets the StartTimeUtc in the security's exchange time zone

Return type:

DateTime

property StartTimeUtc

Gets the beginning of the requested time interval in UTC

Returns:

Gets the beginning of the requested time interval in UTC

Return type:

DateTime

property Symbol

Gets the symbol to request data for

Returns:

Gets the symbol to request data for

Return type:

Symbol

property TickType

TickType of the history request

Returns:

TickType of the history request

Return type:

TickType

property TradableDaysInDataTimeZone

Gets the tradable days specified by this request, in the security's data time zone

Returns:

Gets the tradable days specified by this request, in the security's data time zone

Return type:

List<DateTime>

HomingPigeon

class QuantConnect.Indicators.CandlestickPatterns.HomingPigeon[source]

Homing Pigeon candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

HomingPigeon

class QuantConnect.Indicators.CandlestickPatterns.HomingPigeon[source]

Homing Pigeon candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

IdenticalThreeCrows

class QuantConnect.Indicators.CandlestickPatterns.IdenticalThreeCrows[source]

Identical Three Crows candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

IdenticalThreeCrows

class QuantConnect.Indicators.CandlestickPatterns.IdenticalThreeCrows[source]

Identical Three Crows candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

InNeck

class QuantConnect.Indicators.CandlestickPatterns.InNeck[source]

In-Neck candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

InNeck

class QuantConnect.Indicators.CandlestickPatterns.InNeck[source]

In-Neck candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Index

class QuantConnect.Securities.Index.Index[source]

INDEX Security Object Implementation for INDEX Assets

clear()

Removes every custom property that had been set.

get_last_data()

Get the last price update set to the security if any else null

Return type:

BaseData

refresh_data_normalization_mode_property()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

set_buying_power_model(buying_power_model)

Sets the buying power model

Parameters:
  • buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)

Sets the buying power model

Parameters:
  • py_object (PyObject)
set_data_filter(py_object)

Set Security Data Filter

Parameters:
  • py_object (PyObject)
set_data_filter(data_filter)

Set Security Data Filter

Parameters:
  • data_filter (ISecurityDataFilter)
set_fee_model(feel_model)

Sets the fee model

Parameters:
  • feel_model (PyObject | IFeeModel)
set_fill_model(fill_model)

Sets the fill model

Parameters:
  • fill_model (PyObject | IFillModel)
set_leverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (float)
set_local_time_keeper(local_time_keeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
set_margin_interest_rate_model(margin_interest_rate_model)

Sets the margin interests rate model

Parameters:
  • margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)

Sets the margin interests rate model

Parameters:
  • py_object (PyObject)
set_margin_model(py_object)

Sets the margin model

Parameters:
  • py_object (PyObject)
set_margin_model(margin_model)

Sets the margin model

Parameters:
  • margin_model (IBuyingPowerModel)
set_market_price(data)

Update any security properties based on the latest market data and time

Parameters:
set_settlement_model(settlement_model)

Sets the settlement model

Parameters:
  • settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)

Set Python Shortable Provider for this Security

Parameters:
  • py_object (PyObject)
set_shortable_provider(shortable_provider)

Set Python Shortable Provider for this Security

Parameters:
set_slippage_model(slippage_model)

Sets the slippage model

Parameters:
  • slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)

Sets the volatility model

Parameters:
  • volatility_model (IVolatilityModel | PyObject)
update(data, data_type, contains_fill_forward_data=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (List[BaseData])
  • data_type (Type)
  • contains_fill_forward_data (bool, optional)
property ask_price

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

float

property ask_size

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

float

property bid_price

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

float

property bid_size

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

float

property buying_power_model

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

float

property data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property data_filter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property fee_model

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property fill_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property has_data

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property high

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

float

property hold_stock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property is_delisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property is_tradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property item

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

property leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

float

property local_time

Local time for this market

Returns:

Local time for this market

Return type:

datetime

property low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

float

property margin_interest_rate_model

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property margin_model

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

float

property open_interest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property portfolio_model

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

float

property price_variation_model

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property quote_currency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property settlement_model

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property shortable_provider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IintableProvider

property slippage_model

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List[SubscriptionDataConfig]

property symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property symbol_properties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property volatility_model

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

float

Index

class QuantConnect.Securities.Index.Index[source]

INDEX Security Object Implementation for INDEX Assets

Clear()

Removes every custom property that had been set.

GetLastData()

Get the last price update set to the security if any else null

Return type:

BaseData

RefreshDataNormalizationModeProperty()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

SetBuyingPowerModel(buyingPowerModel)

Sets the buying power model

Parameters:
  • buyingPowerModel (IBuyingPowerModel)
SetBuyingPowerModel(pyObject)

Sets the buying power model

Parameters:
  • pyObject (PyObject)
SetDataFilter(pyObject)

Set Security Data Filter

Parameters:
  • pyObject (PyObject)
SetDataFilter(dataFilter)

Set Security Data Filter

Parameters:
  • dataFilter (ISecurityDataFilter)
SetFeeModel(feelModel)

Sets the fee model

Parameters:
  • feelModel (PyObject | IFeeModel)
SetFillModel(fillModel)

Sets the fill model

Parameters:
  • fillModel (PyObject | IFillModel)
SetLeverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (decimal)
SetLocalTimeKeeper(localTimeKeeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
SetMarginInterestRateModel(marginInterestRateModel)

Sets the margin interests rate model

Parameters:
  • marginInterestRateModel (IMarginInterestRateModel)
SetMarginInterestRateModel(pyObject)

Sets the margin interests rate model

Parameters:
  • pyObject (PyObject)
SetMarginModel(pyObject)

Sets the margin model

Parameters:
  • pyObject (PyObject)
SetMarginModel(marginModel)

Sets the margin model

Parameters:
  • marginModel (IBuyingPowerModel)
SetMarketPrice(data)

Update any security properties based on the latest market data and time

Parameters:
SetSettlementModel(settlementModel)

Sets the settlement model

Parameters:
  • settlementModel (ISettlementModel | PyObject)
SetShortableProvider(pyObject)

Set Python Shortable Provider for this Security

Parameters:
  • pyObject (PyObject)
SetShortableProvider(shortableProvider)

Set Python Shortable Provider for this Security

Parameters:
  • shortableProvider (IShortableProvider)
SetSlippageModel(slippageModel)

Sets the slippage model

Parameters:
  • slippageModel (ISlippageModel | PyObject)
SetVolatilityModel(volatilityModel)

Sets the volatility model

Parameters:
  • volatilityModel (IVolatilityModel | PyObject)
Update(data, dataType, containsFillForwardData=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (IReadOnlyList<BaseData>)
  • dataType (Type)
  • containsFillForwardData (Boolean, optional)
property AskPrice

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

decimal

property AskSize

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

decimal

property BidPrice

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

decimal

property BidSize

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

decimal

property BuyingPowerModel

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property Cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property Close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

decimal

property Data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property DataFilter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property Exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property FeeModel

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property FillModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property Fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property HasData

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property High

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

decimal

property HoldStock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property Holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property Invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property IsDelisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property IsTradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property Leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

decimal

property LocalTime

Local time for this market

Returns:

Local time for this market

Return type:

DateTime

property Low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

decimal

property MarginInterestRateModel

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property MarginModel

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property Open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

decimal

property OpenInterest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property PortfolioModel

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property Price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

decimal

property PriceVariationModel

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property QuoteCurrency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property SettlementModel

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property ShortableProvider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IShortableProvider

property SlippageModel

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property Subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List<SubscriptionDataConfig>

property Symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property SymbolProperties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property Type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property VolatilityModel

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property Volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

decimal

property [System.String]

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

Insight

class QuantConnect.Algorithm.Framework.Alphas.Insight[source]

Defines a alpha prediction for a single symbol generated by the algorithm

cancel(utc_time)

Cancel this insight

Parameters:
  • utc_time (datetime)
clone()

Creates a deep clone of this insight instance

Return type:

Insight

expire(utc_time)

Expire this insight

Parameters:
  • utc_time (datetime)
is_active(utc_time)

Determines whether or not this insight is considered active at the specified utcTime

Parameters:
  • utc_time (datetime)
Return type:

bool

is_expired(utc_time)

Determines whether or not this insight is considered expired at the specified utcTime

Parameters:
  • utc_time (datetime)
Return type:

bool

set_period_and_close_time(exchange_hours)

Sets the insight period and close times if they have not already been set.

Parameters:
short_to_string()

Returns a short string that represents the current object.

Return type:

str

property close_time_utc

Gets the insight's prediction end time. This is the time when this insight prediction is expected to be fulfilled. This time takes into account market hours, weekends, as well as the symbol's data resolution

Returns:

Gets the insight's prediction end time. This is the time when this insight prediction is expected to be fulfilled. This time takes into account market hours, weekends, as well as the symbol's data resolution

Return type:

datetime

property confidence

Gets the confidence in this insight

Returns:

Gets the confidence in this insight

Return type:

float

property direction

Gets the predicted direction, down, flat or up

Returns:

Gets the predicted direction, down, flat or up

Return type:

InsightDirection

property estimated_value

Gets the estimated value of this insight in the account currency

Returns:

Gets the estimated value of this insight in the account currency

Return type:

float

property generated_time_utc

Gets the utc time this insight was generated

Returns:

Gets the utc time this insight was generated

Return type:

datetime

property group_id

Gets the group id this insight belongs to, null if not in a group

Returns:

Gets the group id this insight belongs to, null if not in a group

Return type:

Guid

property id

Gets the unique identifier for this insight

Returns:

Gets the unique identifier for this insight

Return type:

Guid

property magnitude

Gets the predicted percent change in the insight type (price/volatility)

Returns:

Gets the predicted percent change in the insight type (price/volatility)

Return type:

float

property period

Gets the period over which this insight is expected to come to fruition

Returns:

Gets the period over which this insight is expected to come to fruition

Return type:

timedelta

property reference_value

Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType

Returns:

Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType

Return type:

float

property reference_value_final

Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType

Returns:

Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType

Return type:

float

property score

Gets the most recent scores for this insight

Returns:

Gets the most recent scores for this insight

Return type:

InsightScore

property source_model

Gets an identifier for the source model that generated this insight.

Returns:

Gets an identifier for the source model that generated this insight.

Return type:

str

property symbol

Gets the symbol this insight is for

Returns:

Gets the symbol this insight is for

Return type:

Symbol

property tag

The insight's tag containing additional information

Returns:

The insight's tag containing additional information

Return type:

str

property type

Gets the type of insight, for example, price insight or volatility insight

Returns:

Gets the type of insight, for example, price insight or volatility insight

Return type:

InsightType

property weight

Gets the portfolio weight of this insight

Returns:

Gets the portfolio weight of this insight

Return type:

float

Insight

class QuantConnect.Algorithm.Framework.Alphas.Insight[source]

Defines a alpha prediction for a single symbol generated by the algorithm

Cancel(utcTime)

Cancel this insight

Parameters:
  • utcTime (DateTime)
Clone()

Creates a deep clone of this insight instance

Return type:

Insight

Expire(utcTime)

Expire this insight

Parameters:
  • utcTime (DateTime)
IsActive(utcTime)

Determines whether or not this insight is considered active at the specified utcTime

Parameters:
  • utcTime (DateTime)
Return type:

Boolean

IsExpired(utcTime)

Determines whether or not this insight is considered expired at the specified utcTime

Parameters:
  • utcTime (DateTime)
Return type:

Boolean

SetPeriodAndCloseTime(exchangeHours)

Sets the insight period and close times if they have not already been set.

Parameters:
ShortToString()

Returns a short string that represents the current object.

Return type:

String

property CloseTimeUtc

Gets the insight's prediction end time. This is the time when this insight prediction is expected to be fulfilled. This time takes into account market hours, weekends, as well as the symbol's data resolution

Returns:

Gets the insight's prediction end time. This is the time when this insight prediction is expected to be fulfilled. This time takes into account market hours, weekends, as well as the symbol's data resolution

Return type:

DateTime

property Confidence

Gets the confidence in this insight

Returns:

Gets the confidence in this insight

Return type:

Double

property Direction

Gets the predicted direction, down, flat or up

Returns:

Gets the predicted direction, down, flat or up

Return type:

InsightDirection

property EstimatedValue

Gets the estimated value of this insight in the account currency

Returns:

Gets the estimated value of this insight in the account currency

Return type:

decimal

property GeneratedTimeUtc

Gets the utc time this insight was generated

Returns:

Gets the utc time this insight was generated

Return type:

DateTime

property GroupId

Gets the group id this insight belongs to, null if not in a group

Returns:

Gets the group id this insight belongs to, null if not in a group

Return type:

Guid

property Id

Gets the unique identifier for this insight

Returns:

Gets the unique identifier for this insight

Return type:

Guid

property Magnitude

Gets the predicted percent change in the insight type (price/volatility)

Returns:

Gets the predicted percent change in the insight type (price/volatility)

Return type:

Double

property Period

Gets the period over which this insight is expected to come to fruition

Returns:

Gets the period over which this insight is expected to come to fruition

Return type:

TimeSpan

property ReferenceValue

Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType

Returns:

Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType

Return type:

decimal

property ReferenceValueFinal

Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType

Returns:

Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType

Return type:

decimal

property Score

Gets the most recent scores for this insight

Returns:

Gets the most recent scores for this insight

Return type:

InsightScore

property SourceModel

Gets an identifier for the source model that generated this insight.

Returns:

Gets an identifier for the source model that generated this insight.

Return type:

string

property Symbol

Gets the symbol this insight is for

Returns:

Gets the symbol this insight is for

Return type:

Symbol

property Tag

The insight's tag containing additional information

Returns:

The insight's tag containing additional information

Return type:

string

property Type

Gets the type of insight, for example, price insight or volatility insight

Returns:

Gets the type of insight, for example, price insight or volatility insight

Return type:

InsightType

property Weight

Gets the portfolio weight of this insight

Returns:

Gets the portfolio weight of this insight

Return type:

Double

InvertedHammer

class QuantConnect.Indicators.CandlestickPatterns.InvertedHammer[source]

Inverted Hammer candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

InvertedHammer

class QuantConnect.Indicators.CandlestickPatterns.InvertedHammer[source]

Inverted Hammer candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Kicking

class QuantConnect.Indicators.CandlestickPatterns.Kicking[source]

Kicking candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Kicking

class QuantConnect.Indicators.CandlestickPatterns.Kicking[source]

Kicking candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

KickingByLength

class QuantConnect.Indicators.CandlestickPatterns.KickingByLength[source]

Kicking (bull/bear determined by the longer marubozu) candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

KickingByLength

class QuantConnect.Indicators.CandlestickPatterns.KickingByLength[source]

Kicking (bull/bear determined by the longer marubozu) candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

LadderBottom

class QuantConnect.Indicators.CandlestickPatterns.LadderBottom[source]

Ladder Bottom candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

LadderBottom

class QuantConnect.Indicators.CandlestickPatterns.LadderBottom[source]

Ladder Bottom candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

LongLeggedDoji

class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji[source]

Long Legged Doji candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

LongLeggedDoji

class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji[source]

Long Legged Doji candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

LongLineCandle

class QuantConnect.Indicators.CandlestickPatterns.LongLineCandle[source]

Long Line Candle candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

LongLineCandle

class QuantConnect.Indicators.CandlestickPatterns.LongLineCandle[source]

Long Line Candle candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Marubozu

class QuantConnect.Indicators.CandlestickPatterns.Marubozu[source]

Marubozu candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Marubozu

class QuantConnect.Indicators.CandlestickPatterns.Marubozu[source]

Marubozu candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

MatHold

class QuantConnect.Indicators.CandlestickPatterns.MatHold[source]

Mat Hold candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

MatHold

class QuantConnect.Indicators.CandlestickPatterns.MatHold[source]

Mat Hold candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

MatchingLow

class QuantConnect.Indicators.CandlestickPatterns.MatchingLow[source]

Matching Low candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

MatchingLow

class QuantConnect.Indicators.CandlestickPatterns.MatchingLow[source]

Matching Low candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

MorningDojiStar

class QuantConnect.Indicators.CandlestickPatterns.MorningDojiStar[source]

Morning Doji Star candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

MorningDojiStar

class QuantConnect.Indicators.CandlestickPatterns.MorningDojiStar[source]

Morning Doji Star candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

MorningStar

class QuantConnect.Indicators.CandlestickPatterns.MorningStar[source]

Morning Star candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

MorningStar

class QuantConnect.Indicators.CandlestickPatterns.MorningStar[source]

Morning Star candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

MovingAverageType

enum QuantConnect.Indicators.MovingAverageType[source]

Defines the different types of moving averages

field ALMA

The Arnaud Legoux Moving Average (10)

Returns:

The Arnaud Legoux Moving Average (10)

Return type:

MovingAverageType

field DOUBLE_EXPONENTIAL

The double exponential moving average (4)

Returns:

The double exponential moving average (4)

Return type:

MovingAverageType

field EXPONENTIAL

The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)

Returns:

The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)

Return type:

MovingAverageType

field HULL

The Hull Moving Average (9)

Returns:

The Hull Moving Average (9)

Return type:

MovingAverageType

field KAMA

The Kaufman Adaptive Moving Average (8)

Returns:

The Kaufman Adaptive Moving Average (8)

Return type:

MovingAverageType

field LINEAR_WEIGHTED_MOVING_AVERAGE

A weighted moving average type (3)

Returns:

A weighted moving average type (3)

Return type:

MovingAverageType

field SIMPLE

An unweighted, arithmetic mean (0)

Returns:

An unweighted, arithmetic mean (0)

Return type:

MovingAverageType

field TRIANGULAR

The triangular moving average (6)

Returns:

The triangular moving average (6)

Return type:

MovingAverageType

field TRIPLE_EXPONENTIAL

The triple exponential moving average (5)

Returns:

The triple exponential moving average (5)

Return type:

MovingAverageType

field T_3

The T3 moving average (7)

Returns:

The T3 moving average (7)

Return type:

MovingAverageType

field WILDERS

An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)

Returns:

An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)

Return type:

MovingAverageType

MovingAverageType

enum QuantConnect.Indicators.MovingAverageType[source]

Defines the different types of moving averages

field Alma

The Arnaud Legoux Moving Average (10)

Returns:

The Arnaud Legoux Moving Average (10)

Return type:

MovingAverageType

field DoubleExponential

The double exponential moving average (4)

Returns:

The double exponential moving average (4)

Return type:

MovingAverageType

field Exponential

The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)

Returns:

The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)

Return type:

MovingAverageType

field Hull

The Hull Moving Average (9)

Returns:

The Hull Moving Average (9)

Return type:

MovingAverageType

field Kama

The Kaufman Adaptive Moving Average (8)

Returns:

The Kaufman Adaptive Moving Average (8)

Return type:

MovingAverageType

field LinearWeightedMovingAverage

A weighted moving average type (3)

Returns:

A weighted moving average type (3)

Return type:

MovingAverageType

field Simple

An unweighted, arithmetic mean (0)

Returns:

An unweighted, arithmetic mean (0)

Return type:

MovingAverageType

field T3

The T3 moving average (7)

Returns:

The T3 moving average (7)

Return type:

MovingAverageType

field Triangular

The triangular moving average (6)

Returns:

The triangular moving average (6)

Return type:

MovingAverageType

field TripleExponential

The triple exponential moving average (5)

Returns:

The triple exponential moving average (5)

Return type:

MovingAverageType

field Wilders

An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)

Returns:

An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)

Return type:

MovingAverageType

OnNeck

class QuantConnect.Indicators.CandlestickPatterns.OnNeck[source]

On-Neck candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

OnNeck

class QuantConnect.Indicators.CandlestickPatterns.OnNeck[source]

On-Neck candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Option

class QuantConnect.Securities.Option.Option[source]

Option Security Object Implementation for Option Assets

clear()

Removes every custom property that had been set.

evaluate_price_model(slice, contract)

For this option security object, evaluates the specified option contract to compute a theoretical price, IV and greeks

Parameters:
Return type:

OptionPriceModelResult

get_aggregate_exercise_amount()

Aggregate exercise amount or aggregate contract value. It is the total amount of cash one will pay (or receive) for the shares of the underlying stock if he/she decides to exercise (or is assigned an exercise notice). This amount is not the premium paid or received for an equity option.

Return type:

float

get_exercise_quantity(exercise_order_quantity)

Returns the directional quantity of underlying shares that are going to change hands on exercise/assignment of all contracts held by this account, taking into account the contract's Right as well as the contract's current ContractUnitOfTrade, which may have recently changed due to a split/reverse split in the underlying security.

Parameters:
  • exercise_order_quantity (float)
Return type:

float

get_intrinsic_value(underlying_price)

Intrinsic value function of the option

Parameters:
  • underlying_price (float)
Return type:

float

get_last_data()

Get the last price update set to the security if any else null

Return type:

BaseData

get_pay_off(underlying_price)

Option payoff function at expiration time

Parameters:
  • underlying_price (float)
Return type:

float

is_auto_exercised(underlying_price)

Checks if option is eligible for automatic exercise on expiration

Parameters:
  • underlying_price (float)
Return type:

bool

out_of_the_money_amount(underlying_price)

Option out of the money function

Parameters:
  • underlying_price (float)
Return type:

float

refresh_data_normalization_mode_property()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

set_buying_power_model(buying_power_model)

Sets the buying power model

Parameters:
  • buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)

Sets the buying power model

Parameters:
  • py_object (PyObject)
set_data_filter(py_object)

Set Security Data Filter

Parameters:
  • py_object (PyObject)
set_data_filter(data_filter)

Set Security Data Filter

Parameters:
  • data_filter (ISecurityDataFilter)
set_data_normalization_mode(mode)

Sets the data normalization mode to be used by this security

Parameters:
set_fee_model(feel_model)

Sets the fee model

Parameters:
  • feel_model (PyObject | IFeeModel)
set_fill_model(fill_model)

Sets the fill model

Parameters:
  • fill_model (PyObject | IFillModel)
set_filter(min_strike, max_strike, min_expiry, max_expiry)

Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

Parameters:
  • min_strike (int)
  • max_strike (int)
  • min_expiry (timedelta)
  • max_expiry (timedelta)
set_filter(min_strike, max_strike, min_expiry_days, max_expiry_days)

Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

Parameters:
  • min_strike (int)
  • max_strike (int)
  • min_expiry_days (int)
  • max_expiry_days (int)
set_filter(universe_func)

Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

Parameters:
  • universe_func (Callable[OptionFilterUniverse, OptionFilterUniverse] | PyObject)
set_leverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (float)
set_local_time_keeper(local_time_keeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
set_margin_interest_rate_model(margin_interest_rate_model)

Sets the margin interests rate model

Parameters:
  • margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)

Sets the margin interests rate model

Parameters:
  • py_object (PyObject)
set_margin_model(py_object)

Sets the margin model

Parameters:
  • py_object (PyObject)
set_margin_model(margin_model)

Sets the margin model

Parameters:
  • margin_model (IBuyingPowerModel)
set_market_price(data)

Update any security properties based on the latest market data and time

Parameters:
set_option_assignment_model(py_object)

Sets the automatic option assignment model

Parameters:
  • py_object (PyObject)
set_option_assignment_model(option_assignment_model)

Sets the automatic option assignment model

Parameters:
  • option_assignment_model (IOptionAssignmentModel)
set_option_exercise_model(py_object)

Sets the option exercise model

Parameters:
  • py_object (PyObject)
set_option_exercise_model(option_exercise_model)

Sets the option exercise model

Parameters:
  • option_exercise_model (IOptionExerciseModel)
set_settlement_model(settlement_model)

Sets the settlement model

Parameters:
  • settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)

Set Python Shortable Provider for this Security

Parameters:
  • py_object (PyObject)
set_shortable_provider(shortable_provider)

Set Python Shortable Provider for this Security

Parameters:
set_slippage_model(slippage_model)

Sets the slippage model

Parameters:
  • slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)

Sets the volatility model

Parameters:
  • volatility_model (IVolatilityModel | PyObject)
update(data, data_type, contains_fill_forward_data=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (List[BaseData])
  • data_type (Type)
  • contains_fill_forward_data (bool, optional)
property ask_price

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

float

property ask_size

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

float

property bid_price

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

float

property bid_size

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

float

property buying_power_model

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

float

property contract_filter

Gets or sets the contract filter

Returns:

Gets or sets the contract filter

Return type:

IDerivativeSecurityFilter

property contract_multiplier

The contract multiplier for the option security

Returns:

The contract multiplier for the option security

Return type:

int

property contract_unit_of_trade

When the holder of an equity option exercises one contract, or when the writer of an equity option is assigned an exercise notice on one contract, this unit of trade, usually 100 shares of the underlying security, changes hands.

Returns:

When the holder of an equity option exercises one contract, or when the writer of an equity option is assigned an exercise notice on one contract, this unit of trade, usually 100 shares of the underlying security, changes hands.

Return type:

int

property data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property data_filter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property exercise_settlement

Specifies if option contract has physical or cash settlement on exercise

Returns:

Specifies if option contract has physical or cash settlement on exercise

Return type:

SettlementType

property expiry

Gets the expiration date

Returns:

Gets the expiration date

Return type:

datetime

property fee_model

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property fill_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property has_data

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property high

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

float

property hold_stock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property is_delisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property is_option_chain

Returns true if this is the option chain security, false if it is a specific option contract

Returns:

Returns true if this is the option chain security, false if it is a specific option contract

Return type:

bool

property is_option_contract

Returns true if this is a specific option contract security, false if it is the option chain security

Returns:

Returns true if this is a specific option contract security, false if it is the option chain security

Return type:

bool

property is_tradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property item

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

property leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

float

property local_time

Local time for this market

Returns:

Local time for this market

Return type:

datetime

property low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

float

property margin_interest_rate_model

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property margin_model

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

float

property open_interest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property option_assignment_model

The automatic option assignment model

Returns:

The automatic option assignment model

Return type:

IOptionAssignmentModel

property option_exercise_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IOptionExerciseModel

property portfolio_model

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

float

property price_model

Gets or sets the price model for this option security

Returns:

Gets or sets the price model for this option security

Return type:

IOptionPriceModel

property price_variation_model

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property quote_currency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property right

Gets the right being purchased (call [right to buy] or put [right to sell])

Returns:

Gets the right being purchased (call [right to buy] or put [right to sell])

Return type:

OptionRight

property scaled_strike_price

Gets the strike price multiplied by the strike multiplier

Returns:

Gets the strike price multiplied by the strike multiplier

Return type:

float

property settlement_model

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property shortable_provider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IintableProvider

property slippage_model

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property strike_price

Gets the strike price

Returns:

Gets the strike price

Return type:

float

property style

Gets the option style

Returns:

Gets the option style

Return type:

OptionStyle

property subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List[SubscriptionDataConfig]

property symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property symbol_properties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property underlying

Gets or sets the underlying security object.

Returns:

Gets or sets the underlying security object.

Return type:

Security

property volatility_model

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

float

field DEFAULT_SETTLEMENT_DAYS

The default number of days required to settle an equity sale

Returns:

The default number of days required to settle an equity sale

Return type:

int

field DEFAULT_SETTLEMENT_TIME

The default time of day for settlement

Returns:

The default time of day for settlement

Return type:

timedelta

Option

class QuantConnect.Securities.Option.Option[source]

Option Security Object Implementation for Option Assets

Clear()

Removes every custom property that had been set.

EvaluatePriceModel(slice, contract)

For this option security object, evaluates the specified option contract to compute a theoretical price, IV and greeks

Parameters:
Return type:

OptionPriceModelResult

GetAggregateExerciseAmount()

Aggregate exercise amount or aggregate contract value. It is the total amount of cash one will pay (or receive) for the shares of the underlying stock if he/she decides to exercise (or is assigned an exercise notice). This amount is not the premium paid or received for an equity option.

Return type:

Decimal

GetExerciseQuantity(exerciseOrderQuantity)

Returns the directional quantity of underlying shares that are going to change hands on exercise/assignment of all contracts held by this account, taking into account the contract's Right as well as the contract's current ContractUnitOfTrade, which may have recently changed due to a split/reverse split in the underlying security.

Parameters:
  • exerciseOrderQuantity (decimal)
Return type:

Decimal

GetIntrinsicValue(underlyingPrice)

Intrinsic value function of the option

Parameters:
  • underlyingPrice (decimal)
Return type:

Decimal

GetLastData()

Get the last price update set to the security if any else null

Return type:

BaseData

GetPayOff(underlyingPrice)

Option payoff function at expiration time

Parameters:
  • underlyingPrice (decimal)
Return type:

Decimal

IsAutoExercised(underlyingPrice)

Checks if option is eligible for automatic exercise on expiration

Parameters:
  • underlyingPrice (decimal)
Return type:

Boolean

OutOfTheMoneyAmount(underlyingPrice)

Option out of the money function

Parameters:
  • underlyingPrice (decimal)
Return type:

Decimal

RefreshDataNormalizationModeProperty()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

SetBuyingPowerModel(buyingPowerModel)

Sets the buying power model

Parameters:
  • buyingPowerModel (IBuyingPowerModel)
SetBuyingPowerModel(pyObject)

Sets the buying power model

Parameters:
  • pyObject (PyObject)
SetDataFilter(pyObject)

Set Security Data Filter

Parameters:
  • pyObject (PyObject)
SetDataFilter(dataFilter)

Set Security Data Filter

Parameters:
  • dataFilter (ISecurityDataFilter)
SetDataNormalizationMode(mode)

Sets the data normalization mode to be used by this security

Parameters:
SetFeeModel(feelModel)

Sets the fee model

Parameters:
  • feelModel (PyObject | IFeeModel)
SetFillModel(fillModel)

Sets the fill model

Parameters:
  • fillModel (PyObject | IFillModel)
SetFilter(minStrike, maxStrike, minExpiry, maxExpiry)

Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

Parameters:
  • minStrike (Int32)
  • maxStrike (Int32)
  • minExpiry (TimeSpan)
  • maxExpiry (TimeSpan)
SetFilter(minStrike, maxStrike, minExpiryDays, maxExpiryDays)

Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

Parameters:
  • minStrike (Int32)
  • maxStrike (Int32)
  • minExpiryDays (Int32)
  • maxExpiryDays (Int32)
SetFilter(universeFunc)

Sets the ContractFilter to a new instance of the filter using the specified min and max strike values. Contracts with expirations further than 35 days out will also be filtered.

Parameters:
  • universeFunc (PyObject | Func[OptionFilterUniverse, OptionFilterUniverse])
SetLeverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (decimal)
SetLocalTimeKeeper(localTimeKeeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
SetMarginInterestRateModel(marginInterestRateModel)

Sets the margin interests rate model

Parameters:
  • marginInterestRateModel (IMarginInterestRateModel)
SetMarginInterestRateModel(pyObject)

Sets the margin interests rate model

Parameters:
  • pyObject (PyObject)
SetMarginModel(pyObject)

Sets the margin model

Parameters:
  • pyObject (PyObject)
SetMarginModel(marginModel)

Sets the margin model

Parameters:
  • marginModel (IBuyingPowerModel)
SetMarketPrice(data)

Update any security properties based on the latest market data and time

Parameters:
SetOptionAssignmentModel(pyObject)

Sets the automatic option assignment model

Parameters:
  • pyObject (PyObject)
SetOptionAssignmentModel(optionAssignmentModel)

Sets the automatic option assignment model

Parameters:
  • optionAssignmentModel (IOptionAssignmentModel)
SetOptionExerciseModel(pyObject)

Sets the option exercise model

Parameters:
  • pyObject (PyObject)
SetOptionExerciseModel(optionExerciseModel)

Sets the option exercise model

Parameters:
  • optionExerciseModel (IOptionExerciseModel)
SetSettlementModel(settlementModel)

Sets the settlement model

Parameters:
  • settlementModel (ISettlementModel | PyObject)
SetShortableProvider(pyObject)

Set Python Shortable Provider for this Security

Parameters:
  • pyObject (PyObject)
SetShortableProvider(shortableProvider)

Set Python Shortable Provider for this Security

Parameters:
  • shortableProvider (IShortableProvider)
SetSlippageModel(slippageModel)

Sets the slippage model

Parameters:
  • slippageModel (ISlippageModel | PyObject)
SetVolatilityModel(volatilityModel)

Sets the volatility model

Parameters:
  • volatilityModel (IVolatilityModel | PyObject)
Update(data, dataType, containsFillForwardData=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (IReadOnlyList<BaseData>)
  • dataType (Type)
  • containsFillForwardData (Boolean, optional)
property AskPrice

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

decimal

property AskSize

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

decimal

property BidPrice

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

decimal

property BidSize

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

decimal

property BuyingPowerModel

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property Cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property Close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

decimal

property ContractFilter

Gets or sets the contract filter

Returns:

Gets or sets the contract filter

Return type:

IDerivativeSecurityFilter

property ContractMultiplier

The contract multiplier for the option security

Returns:

The contract multiplier for the option security

Return type:

Int32

property ContractUnitOfTrade

When the holder of an equity option exercises one contract, or when the writer of an equity option is assigned an exercise notice on one contract, this unit of trade, usually 100 shares of the underlying security, changes hands.

Returns:

When the holder of an equity option exercises one contract, or when the writer of an equity option is assigned an exercise notice on one contract, this unit of trade, usually 100 shares of the underlying security, changes hands.

Return type:

Int32

property Data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property DataFilter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property Exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property ExerciseSettlement

Specifies if option contract has physical or cash settlement on exercise

Returns:

Specifies if option contract has physical or cash settlement on exercise

Return type:

SettlementType

property Expiry

Gets the expiration date

Returns:

Gets the expiration date

Return type:

DateTime

property FeeModel

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property FillModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property Fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property HasData

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property High

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

decimal

property HoldStock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property Holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property Invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property IsDelisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property IsOptionChain

Returns true if this is the option chain security, false if it is a specific option contract

Returns:

Returns true if this is the option chain security, false if it is a specific option contract

Return type:

bool

property IsOptionContract

Returns true if this is a specific option contract security, false if it is the option chain security

Returns:

Returns true if this is a specific option contract security, false if it is the option chain security

Return type:

bool

property IsTradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property Leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

decimal

property LocalTime

Local time for this market

Returns:

Local time for this market

Return type:

DateTime

property Low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

decimal

property MarginInterestRateModel

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property MarginModel

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property Open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

decimal

property OpenInterest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property OptionAssignmentModel

The automatic option assignment model

Returns:

The automatic option assignment model

Return type:

IOptionAssignmentModel

property OptionExerciseModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IOptionExerciseModel

property PortfolioModel

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property Price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

decimal

property PriceModel

Gets or sets the price model for this option security

Returns:

Gets or sets the price model for this option security

Return type:

IOptionPriceModel

property PriceVariationModel

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property QuoteCurrency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property Right

Gets the right being purchased (call [right to buy] or put [right to sell])

Returns:

Gets the right being purchased (call [right to buy] or put [right to sell])

Return type:

OptionRight

property ScaledStrikePrice

Gets the strike price multiplied by the strike multiplier

Returns:

Gets the strike price multiplied by the strike multiplier

Return type:

decimal

property SettlementModel

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property ShortableProvider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IShortableProvider

property SlippageModel

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property StrikePrice

Gets the strike price

Returns:

Gets the strike price

Return type:

decimal

property Style

Gets the option style

Returns:

Gets the option style

Return type:

OptionStyle

property Subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List<SubscriptionDataConfig>

property Symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property SymbolProperties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property Type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property Underlying

Gets or sets the underlying security object.

Returns:

Gets or sets the underlying security object.

Return type:

Security

property VolatilityModel

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property Volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

decimal

property [System.String]

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

field DefaultSettlementDays

The default number of days required to settle an equity sale

Returns:

The default number of days required to settle an equity sale

Return type:

Int32

field DefaultSettlementTime

The default time of day for settlement

Returns:

The default time of day for settlement

Return type:

TimeSpan

OptionPricingModelType

enum QuantConnect.Indicators.OptionPricingModelType[source]

Defines different types of option pricing model

field BINOMIAL_COX_ROSS_RUBINSTEIN

The Cox-Ross-Rubinstein binomial tree model (CRR model)

Returns:

The Cox-Ross-Rubinstein binomial tree model (CRR model)

Return type:

OptionPricingModelType

field BLACK_SCHOLES

Vanilla Black Scholes Model

Returns:

Vanilla Black Scholes Model

Return type:

OptionPricingModelType

field FORWARD_TREE

The forward binomial tree model, or Cox-Ross-Rubinstein with drift model

Returns:

The forward binomial tree model, or Cox-Ross-Rubinstein with drift model

Return type:

OptionPricingModelType

OptionPricingModelType

enum QuantConnect.Indicators.OptionPricingModelType[source]

Defines different types of option pricing model

field BinomialCoxRossRubinstein

The Cox-Ross-Rubinstein binomial tree model (CRR model)

Returns:

The Cox-Ross-Rubinstein binomial tree model (CRR model)

Return type:

OptionPricingModelType

field BlackScholes

Vanilla Black Scholes Model

Returns:

Vanilla Black Scholes Model

Return type:

OptionPricingModelType

field ForwardTree

The forward binomial tree model, or Cox-Ross-Rubinstein with drift model

Returns:

The forward binomial tree model, or Cox-Ross-Rubinstein with drift model

Return type:

OptionPricingModelType

OptionStrategy

class QuantConnect.Securities.Option.OptionStrategy[source]

Option strategy specification class. Describes option strategy and its parameters for trading.

property canonical_option

The canonical Option symbol of the strategy

Returns:

The canonical Option symbol of the strategy

Return type:

Symbol

property name

Option strategy name

Returns:

Option strategy name

Return type:

str

property option_legs

Option strategy legs

Returns:

Option strategy legs

Return type:

List[OptionLegData]

property underlying

Underlying symbol of the strategy

Returns:

Underlying symbol of the strategy

Return type:

Symbol

property underlying_legs

Option strategy underlying legs (usually 0 or 1 legs)

Returns:

Option strategy underlying legs (usually 0 or 1 legs)

Return type:

List[UnderlyingLegData]

OptionStrategy

class QuantConnect.Securities.Option.OptionStrategy[source]

Option strategy specification class. Describes option strategy and its parameters for trading.

property CanonicalOption

The canonical Option symbol of the strategy

Returns:

The canonical Option symbol of the strategy

Return type:

Symbol

property Name

Option strategy name

Returns:

Option strategy name

Return type:

string

property OptionLegs

Option strategy legs

Returns:

Option strategy legs

Return type:

List<OptionLegData>

property Underlying

Underlying symbol of the strategy

Returns:

Underlying symbol of the strategy

Return type:

Symbol

property UnderlyingLegs

Option strategy underlying legs (usually 0 or 1 legs)

Returns:

Option strategy underlying legs (usually 0 or 1 legs)

Return type:

List<UnderlyingLegData>

OrderEvent

class QuantConnect.Orders.OrderEvent[source]

Order Event - Messaging class signifying a change in an order state and record the change in the user's algorithm portfolio

clone()

Returns a clone of the current object.

Return type:

OrderEvent

short_to_string()

Returns a short string that represents the current object.

Return type:

str

property absolute_fill_quantity

Public Property Absolute Getter of Quantity -Filled

Returns:

Public Property Absolute Getter of Quantity -Filled

Return type:

float

property direction

Order direction.

Returns:

Order direction.

Return type:

OrderDirection

property fill_price

Fill price information about the order

Returns:

Fill price information about the order

Return type:

float

property fill_price_currency

Currency for the fill price

Returns:

Currency for the fill price

Return type:

str

property fill_quantity

Number of shares of the order that was filled in this event.

Returns:

Number of shares of the order that was filled in this event.

Return type:

float

property id

The unique order event id for each order

Returns:

The unique order event id for each order

Return type:

int

property is_assignment

True if the order event is an assignment

Returns:

True if the order event is an assignment

Return type:

bool

property is_in_the_money

True if the order event's option is In-The-Money (ITM)

Returns:

True if the order event's option is In-The-Money (ITM)

Return type:

bool

property limit_price

The current limit price

Returns:

The current limit price

Return type:

float

property message

Any message from the exchange.

Returns:

Any message from the exchange.

Return type:

str

property order_fee

The fee associated with the order

Returns:

The fee associated with the order

Return type:

OrderFee

property order_id

Id of the order this event comes from.

Returns:

Id of the order this event comes from.

Return type:

int

property quantity

The current order quantity

Returns:

The current order quantity

Return type:

float

property status

Status message of the order.

Returns:

Status message of the order.

Return type:

OrderStatus

property stop_price

The current stop price

Returns:

The current stop price

Return type:

float

property symbol

Easy access to the order symbol associated with this event.

Returns:

Easy access to the order symbol associated with this event.

Return type:

Symbol

property ticket

The order ticket associated to the order

Returns:

The order ticket associated to the order

Return type:

OrderTicket

property trailing_amount

The trailing stop amount

Returns:

The trailing stop amount

Return type:

float

property trailing_as_percentage

Whether the TrailingAmount is a percentage or an absolute currency value

Returns:

Whether the TrailingAmount is a percentage or an absolute currency value

Return type:

bool

property trigger_price

The current trigger price

Returns:

The current trigger price

Return type:

float

property utc_time

The date and time of this event (UTC).

Returns:

The date and time of this event (UTC).

Return type:

datetime

OrderEvent

class QuantConnect.Orders.OrderEvent[source]

Order Event - Messaging class signifying a change in an order state and record the change in the user's algorithm portfolio

Clone()

Returns a clone of the current object.

Return type:

OrderEvent

ShortToString()

Returns a short string that represents the current object.

Return type:

String

property AbsoluteFillQuantity

Public Property Absolute Getter of Quantity -Filled

Returns:

Public Property Absolute Getter of Quantity -Filled

Return type:

decimal

property Direction

Order direction.

Returns:

Order direction.

Return type:

OrderDirection

property FillPrice

Fill price information about the order

Returns:

Fill price information about the order

Return type:

decimal

property FillPriceCurrency

Currency for the fill price

Returns:

Currency for the fill price

Return type:

string

property FillQuantity

Number of shares of the order that was filled in this event.

Returns:

Number of shares of the order that was filled in this event.

Return type:

decimal

property Id

The unique order event id for each order

Returns:

The unique order event id for each order

Return type:

Int32

property IsAssignment

True if the order event is an assignment

Returns:

True if the order event is an assignment

Return type:

bool

property IsInTheMoney

True if the order event's option is In-The-Money (ITM)

Returns:

True if the order event's option is In-The-Money (ITM)

Return type:

bool

property LimitPrice

The current limit price

Returns:

The current limit price

Return type:

decimal

property Message

Any message from the exchange.

Returns:

Any message from the exchange.

Return type:

string

property OrderFee

The fee associated with the order

Returns:

The fee associated with the order

Return type:

OrderFee

property OrderId

Id of the order this event comes from.

Returns:

Id of the order this event comes from.

Return type:

Int32

property Quantity

The current order quantity

Returns:

The current order quantity

Return type:

decimal

property Status

Status message of the order.

Returns:

Status message of the order.

Return type:

OrderStatus

property StopPrice

The current stop price

Returns:

The current stop price

Return type:

decimal

property Symbol

Easy access to the order symbol associated with this event.

Returns:

Easy access to the order symbol associated with this event.

Return type:

Symbol

property Ticket

The order ticket associated to the order

Returns:

The order ticket associated to the order

Return type:

OrderTicket

property TrailingAmount

The trailing stop amount

Returns:

The trailing stop amount

Return type:

decimal

property TrailingAsPercentage

Whether the TrailingAmount is a percentage or an absolute currency value

Returns:

Whether the TrailingAmount is a percentage or an absolute currency value

Return type:

Boolean

property TriggerPrice

The current trigger price

Returns:

The current trigger price

Return type:

decimal

property UtcTime

The date and time of this event (UTC).

Returns:

The date and time of this event (UTC).

Return type:

DateTime

OrderTicket

class QuantConnect.Orders.OrderTicket[source]

Provides a single reference to an order for the algorithm to maintain. As the order gets updated this ticket will also get updated

cancel(tag=None)

Submits a new request to cancel this order

Parameters:
  • tag (str, optional)
Return type:

OrderResponse

get(field)

Gets the specified field from the ticket

Parameters:
get(field)

Gets the specified field from the ticket

Parameters:
Return type:

float

get_most_recent_order_request()

Gets the most recent OrderRequest for this ticket

Return type:

OrderRequest

get_most_recent_order_response()

Gets the most recent OrderResponse for this ticket

Return type:

OrderResponse

update(fields)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with data specified in fields

Parameters:
Return type:

OrderResponse

update_limit_price(limit_price, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with limit price specified in limitPrice and with tag specified in tag

Parameters:
  • limit_price (float)
  • tag (str, optional)
Return type:

OrderResponse

update_quantity(quantity, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with quantity specified in quantity and with tag specified in quantity

Parameters:
  • quantity (float)
  • tag (str, optional)
Return type:

OrderResponse

update_stop_price(stop_price, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with stop price specified in stopPrice and with tag specified in tag

Parameters:
  • stop_price (float)
  • tag (str, optional)
Return type:

OrderResponse

update_stop_trailing_amount(trailing_amount, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with stop trailing amount specified in trailingAmount and with tag specified in tag

Parameters:
  • trailing_amount (float)
  • tag (str, optional)
Return type:

OrderResponse

update_tag(tag)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with tag specified in tag

Parameters:
  • tag (str)
Return type:

OrderResponse

update_trigger_price(trigger_price, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with trigger price specified in triggerPrice and with tag specified in tag

Parameters:
  • trigger_price (float)
  • tag (str, optional)
Return type:

OrderResponse

property average_fill_price

Gets the average fill price for this ticket. If no fills have been processed then this will return a value of zero.

Returns:

Gets the average fill price for this ticket. If no fills have been processed then this will return a value of zero.

Return type:

float

property cancel_request

Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null

Returns:

Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null

Return type:

CancelOrderRequest

property has_order

Returns true if the order has been set for this ticket

Returns:

Returns true if the order has been set for this ticket

Return type:

bool

property order_closed

Gets a wait handle that can be used to wait until this order has filled

Returns:

Gets a wait handle that can be used to wait until this order has filled

Return type:

WaitHandle

property order_events

Gets a list of all order events for this ticket

Returns:

Gets a list of all order events for this ticket

Return type:

List[OrderEvent]

property order_id

Gets the order id of this ticket

Returns:

Gets the order id of this ticket

Return type:

int

property order_set

Gets a wait handle that can be used to wait until the order has been set

Returns:

Gets a wait handle that can be used to wait until the order has been set

Return type:

WaitHandle

property order_type

Gets the type of order

Returns:

Gets the type of order

Return type:

OrderType

property quantity

Gets the number of units ordered

Returns:

Gets the number of units ordered

Return type:

float

property quantity_filled

Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.

Returns:

Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.

Return type:

float

property security_type

Gets the Symbol's SecurityType

Returns:

Gets the Symbol's SecurityType

Return type:

SecurityType

property status

Gets the current status of this order ticket

Returns:

Gets the current status of this order ticket

Return type:

OrderStatus

property submit_request

Gets the SubmitOrderRequest that initiated this order

Returns:

Gets the SubmitOrderRequest that initiated this order

Return type:

SubmitOrderRequest

property symbol

Gets the symbol being ordered

Returns:

Gets the symbol being ordered

Return type:

Symbol

property tag

Gets the order's current tag

Returns:

Gets the order's current tag

Return type:

str

property time

Gets the time this order was last updated

Returns:

Gets the time this order was last updated

Return type:

datetime

property update_requests

Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id

Returns:

Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id

Return type:

List[UpdateOrderRequest]

OrderTicket

class QuantConnect.Orders.OrderTicket[source]

Provides a single reference to an order for the algorithm to maintain. As the order gets updated this ticket will also get updated

Cancel(tag=None)

Submits a new request to cancel this order

Parameters:
  • tag (string, optional)
Return type:

OrderResponse

Get(field)

Gets the specified field from the ticket

Parameters:
Get(field)

Gets the specified field from the ticket

Parameters:
Return type:

Decimal

GetMostRecentOrderRequest()

Gets the most recent OrderRequest for this ticket

Return type:

OrderRequest

GetMostRecentOrderResponse()

Gets the most recent OrderResponse for this ticket

Return type:

OrderResponse

Update(fields)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with data specified in fields

Parameters:
Return type:

OrderResponse

UpdateLimitPrice(limitPrice, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with limit price specified in limitPrice and with tag specified in tag

Parameters:
  • limitPrice (decimal)
  • tag (string, optional)
Return type:

OrderResponse

UpdateQuantity(quantity, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with quantity specified in quantity and with tag specified in quantity

Parameters:
  • quantity (decimal)
  • tag (string, optional)
Return type:

OrderResponse

UpdateStopPrice(stopPrice, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with stop price specified in stopPrice and with tag specified in tag

Parameters:
  • stopPrice (decimal)
  • tag (string, optional)
Return type:

OrderResponse

UpdateStopTrailingAmount(trailingAmount, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with stop trailing amount specified in trailingAmount and with tag specified in tag

Parameters:
  • trailingAmount (decimal)
  • tag (string, optional)
Return type:

OrderResponse

UpdateTag(tag)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with tag specified in tag

Parameters:
  • tag (string)
Return type:

OrderResponse

UpdateTriggerPrice(triggerPrice, tag=None)

Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticker with trigger price specified in triggerPrice and with tag specified in tag

Parameters:
  • triggerPrice (decimal)
  • tag (string, optional)
Return type:

OrderResponse

property AverageFillPrice

Gets the average fill price for this ticket. If no fills have been processed then this will return a value of zero.

Returns:

Gets the average fill price for this ticket. If no fills have been processed then this will return a value of zero.

Return type:

decimal

property CancelRequest

Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null

Returns:

Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null

Return type:

CancelOrderRequest

property HasOrder

Returns true if the order has been set for this ticket

Returns:

Returns true if the order has been set for this ticket

Return type:

bool

property OrderClosed

Gets a wait handle that can be used to wait until this order has filled

Returns:

Gets a wait handle that can be used to wait until this order has filled

Return type:

WaitHandle

property OrderEvents

Gets a list of all order events for this ticket

Returns:

Gets a list of all order events for this ticket

Return type:

IReadOnlyList<OrderEvent>

property OrderId

Gets the order id of this ticket

Returns:

Gets the order id of this ticket

Return type:

Int32

property OrderSet

Gets a wait handle that can be used to wait until the order has been set

Returns:

Gets a wait handle that can be used to wait until the order has been set

Return type:

WaitHandle

property OrderType

Gets the type of order

Returns:

Gets the type of order

Return type:

OrderType

property Quantity

Gets the number of units ordered

Returns:

Gets the number of units ordered

Return type:

decimal

property QuantityFilled

Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.

Returns:

Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.

Return type:

decimal

property SecurityType

Gets the Symbol's SecurityType

Returns:

Gets the Symbol's SecurityType

Return type:

SecurityType

property Status

Gets the current status of this order ticket

Returns:

Gets the current status of this order ticket

Return type:

OrderStatus

property SubmitRequest

Gets the SubmitOrderRequest that initiated this order

Returns:

Gets the SubmitOrderRequest that initiated this order

Return type:

SubmitOrderRequest

property Symbol

Gets the symbol being ordered

Returns:

Gets the symbol being ordered

Return type:

Symbol

property Tag

Gets the order's current tag

Returns:

Gets the order's current tag

Return type:

string

property Time

Gets the time this order was last updated

Returns:

Gets the time this order was last updated

Return type:

DateTime

property UpdateRequests

Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id

Returns:

Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id

Return type:

IReadOnlyList<UpdateOrderRequest>

Piercing

class QuantConnect.Indicators.CandlestickPatterns.Piercing[source]

Piercing candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Piercing

class QuantConnect.Indicators.CandlestickPatterns.Piercing[source]

Piercing candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Resolution

enum QuantConnect.Resolution[source]

Resolution of data requested.

field DAILY

Daily Resolution (4)

Returns:

Daily Resolution (4)

Return type:

Resolution

field HOUR

Hour Resolution (3)

Returns:

Hour Resolution (3)

Return type:

Resolution

field MINUTE

Minute Resolution (2)

Returns:

Minute Resolution (2)

Return type:

Resolution

field SECOND

Second Resolution (1)

Returns:

Second Resolution (1)

Return type:

Resolution

field TICK

Tick Resolution (0)

Returns:

Tick Resolution (0)

Return type:

Resolution

Resolution

enum QuantConnect.Resolution[source]

Resolution of data requested.

field Daily

Daily Resolution (4)

Returns:

Daily Resolution (4)

Return type:

Resolution

field Hour

Hour Resolution (3)

Returns:

Hour Resolution (3)

Return type:

Resolution

field Minute

Minute Resolution (2)

Returns:

Minute Resolution (2)

Return type:

Resolution

field Second

Second Resolution (1)

Returns:

Second Resolution (1)

Return type:

Resolution

field Tick

Tick Resolution (0)

Returns:

Tick Resolution (0)

Return type:

Resolution

RickshawMan

class QuantConnect.Indicators.CandlestickPatterns.RickshawMan[source]

Rickshaw Man candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

RickshawMan

class QuantConnect.Indicators.CandlestickPatterns.RickshawMan[source]

Rickshaw Man candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

RiseFallThreeMethods

class QuantConnect.Indicators.CandlestickPatterns.RiseFallThreeMethods[source]

Rising/Falling Three Methods candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

RiseFallThreeMethods

class QuantConnect.Indicators.CandlestickPatterns.RiseFallThreeMethods[source]

Rising/Falling Three Methods candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ScheduledEvent

class QuantConnect.Scheduling.ScheduledEvent[source]

Real time self scheduling event

property enabled

Gets or sets whether this event is enabled

Returns:

Gets or sets whether this event is enabled

Return type:

bool

property name

Gets an identifier for this event

Returns:

Gets an identifier for this event

Return type:

str

property next_event_utc_time

Gets the next time this scheduled event will fire in UTC

Returns:

Gets the next time this scheduled event will fire in UTC

Return type:

datetime

field ALGORITHM_END_OF_DAY_DELTA

Gets the default time before midnight end of day events will fire

Returns:

Gets the default time before midnight end of day events will fire

Return type:

timedelta

field SECURITY_END_OF_DAY_DELTA

Gets the default time before market close end of trading day events will fire

Returns:

Gets the default time before market close end of trading day events will fire

Return type:

timedelta

ScheduledEvent

class QuantConnect.Scheduling.ScheduledEvent[source]

Real time self scheduling event

property Enabled

Gets or sets whether this event is enabled

Returns:

Gets or sets whether this event is enabled

Return type:

bool

property Name

Gets an identifier for this event

Returns:

Gets an identifier for this event

Return type:

string

property NextEventUtcTime

Gets the next time this scheduled event will fire in UTC

Returns:

Gets the next time this scheduled event will fire in UTC

Return type:

DateTime

field AlgorithmEndOfDayDelta

Gets the default time before midnight end of day events will fire

Returns:

Gets the default time before midnight end of day events will fire

Return type:

TimeSpan

field SecurityEndOfDayDelta

Gets the default time before market close end of trading day events will fire

Returns:

Gets the default time before market close end of trading day events will fire

Return type:

TimeSpan

Security

class QuantConnect.Securities.Security[source]

A base vehicle properties class for providing a common interface to all assets in QuantConnect.

clear()

Removes every custom property that had been set.

get_last_data()

Get the last price update set to the security if any else null

Return type:

BaseData

refresh_data_normalization_mode_property()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

set_buying_power_model(buying_power_model)

Sets the buying power model

Parameters:
  • buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)

Sets the buying power model

Parameters:
  • py_object (PyObject)
set_data_filter(py_object)

Set Security Data Filter

Parameters:
  • py_object (PyObject)
set_data_filter(data_filter)

Set Security Data Filter

Parameters:
  • data_filter (ISecurityDataFilter)
set_fee_model(feel_model)

Sets the fee model

Parameters:
  • feel_model (PyObject | IFeeModel)
set_fill_model(fill_model)

Sets the fill model

Parameters:
  • fill_model (PyObject | IFillModel)
set_leverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (float)
set_local_time_keeper(local_time_keeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
set_margin_interest_rate_model(margin_interest_rate_model)

Sets the margin interests rate model

Parameters:
  • margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)

Sets the margin interests rate model

Parameters:
  • py_object (PyObject)
set_margin_model(py_object)

Sets the margin model

Parameters:
  • py_object (PyObject)
set_margin_model(margin_model)

Sets the margin model

Parameters:
  • margin_model (IBuyingPowerModel)
set_market_price(data)

Update any security properties based on the latest market data and time

Parameters:
set_settlement_model(settlement_model)

Sets the settlement model

Parameters:
  • settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)

Set Python Shortable Provider for this Security

Parameters:
  • py_object (PyObject)
set_shortable_provider(shortable_provider)

Set Python Shortable Provider for this Security

Parameters:
set_slippage_model(slippage_model)

Sets the slippage model

Parameters:
  • slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)

Sets the volatility model

Parameters:
  • volatility_model (IVolatilityModel | PyObject)
update(data, data_type, contains_fill_forward_data=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (List[BaseData])
  • data_type (Type)
  • contains_fill_forward_data (bool, optional)
property ask_price

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

float

property ask_size

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

float

property bid_price

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

float

property bid_size

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

float

property buying_power_model

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

float

property data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property data_filter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property fee_model

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property fill_model

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property has_data

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property high

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

float

property hold_stock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property is_delisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property is_tradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property item

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

property leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

float

property local_time

Local time for this market

Returns:

Local time for this market

Return type:

datetime

property low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

float

property margin_interest_rate_model

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property margin_model

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

float

property open_interest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property portfolio_model

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

float

property price_variation_model

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property quote_currency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property settlement_model

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property shortable_provider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IintableProvider

property slippage_model

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List[SubscriptionDataConfig]

property symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property symbol_properties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property volatility_model

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

float

field NULL_LEVERAGE

A null security leverage value

Returns:

A null security leverage value

Return type:

float

Security

class QuantConnect.Securities.Security[source]

A base vehicle properties class for providing a common interface to all assets in QuantConnect.

Clear()

Removes every custom property that had been set.

GetLastData()

Get the last price update set to the security if any else null

Return type:

BaseData

RefreshDataNormalizationModeProperty()

This method will refresh the value of the DataNormalizationMode property. This is required for backward-compatibility. TODO: to be deleted with the DataNormalizationMode property

SetBuyingPowerModel(buyingPowerModel)

Sets the buying power model

Parameters:
  • buyingPowerModel (IBuyingPowerModel)
SetBuyingPowerModel(pyObject)

Sets the buying power model

Parameters:
  • pyObject (PyObject)
SetDataFilter(pyObject)

Set Security Data Filter

Parameters:
  • pyObject (PyObject)
SetDataFilter(dataFilter)

Set Security Data Filter

Parameters:
  • dataFilter (ISecurityDataFilter)
SetFeeModel(feelModel)

Sets the fee model

Parameters:
  • feelModel (PyObject | IFeeModel)
SetFillModel(fillModel)

Sets the fill model

Parameters:
  • fillModel (PyObject | IFillModel)
SetLeverage(leverage)

Set the leverage parameter for this security

Parameters:
  • leverage (decimal)
SetLocalTimeKeeper(localTimeKeeper)

Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.

Parameters:
SetMarginInterestRateModel(marginInterestRateModel)

Sets the margin interests rate model

Parameters:
  • marginInterestRateModel (IMarginInterestRateModel)
SetMarginInterestRateModel(pyObject)

Sets the margin interests rate model

Parameters:
  • pyObject (PyObject)
SetMarginModel(pyObject)

Sets the margin model

Parameters:
  • pyObject (PyObject)
SetMarginModel(marginModel)

Sets the margin model

Parameters:
  • marginModel (IBuyingPowerModel)
SetMarketPrice(data)

Update any security properties based on the latest market data and time

Parameters:
SetSettlementModel(settlementModel)

Sets the settlement model

Parameters:
  • settlementModel (ISettlementModel | PyObject)
SetShortableProvider(pyObject)

Set Python Shortable Provider for this Security

Parameters:
  • pyObject (PyObject)
SetShortableProvider(shortableProvider)

Set Python Shortable Provider for this Security

Parameters:
  • shortableProvider (IShortableProvider)
SetSlippageModel(slippageModel)

Sets the slippage model

Parameters:
  • slippageModel (ISlippageModel | PyObject)
SetVolatilityModel(volatilityModel)

Sets the volatility model

Parameters:
  • volatilityModel (IVolatilityModel | PyObject)
Update(data, dataType, containsFillForwardData=None)

Updates all of the security properties, such as price/OHLCV/bid/ask based on the data provided. Data is also stored into the security's data cache

Parameters:
  • data (IReadOnlyList<BaseData>)
  • dataType (Type)
  • containsFillForwardData (Boolean, optional)
property AskPrice

Gets the most recent ask price if available

Returns:

Gets the most recent ask price if available

Return type:

decimal

property AskSize

Gets the most recent ask size if available

Returns:

Gets the most recent ask size if available

Return type:

decimal

property BidPrice

Gets the most recent bid price if available

Returns:

Gets the most recent bid price if available

Return type:

decimal

property BidSize

Gets the most recent bid size if available

Returns:

Gets the most recent bid size if available

Return type:

decimal

property BuyingPowerModel

Gets the buying power model used for this security

Returns:

Gets the buying power model used for this security

Return type:

IBuyingPowerModel

property Cache

Data cache for the security to store previous price information.

Returns:

Data cache for the security to store previous price information.

Return type:

SecurityCache

property Close

If this uses tradebar data, return the most recent close.

Returns:

If this uses tradebar data, return the most recent close.

Return type:

decimal

property Data

Provides dynamic access to data in the cache

Returns:

Provides dynamic access to data in the cache

Return type:

object

property DataFilter

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Returns:

Customizable data filter to filter outlier ticks before they are passed into user event handlers. By default all ticks are passed into the user algorithms.

Return type:

ISecurityDataFilter

property Exchange

Exchange class contains the market opening hours, along with pre-post market hours.

Returns:

Exchange class contains the market opening hours, along with pre-post market hours.

Return type:

SecurityExchange

property FeeModel

Fee model used to compute order fees for this security

Returns:

Fee model used to compute order fees for this security

Return type:

IFeeModel

property FillModel

Fill model used to produce fill events for this security

Returns:

Fill model used to produce fill events for this security

Return type:

IFillModel

property Fundamentals

Gets the fundamental data associated with the security if there is any, otherwise null.

Returns:

Gets the fundamental data associated with the security if there is any, otherwise null.

Return type:

Fundamental

property HasData

There has been at least one datapoint since our algorithm started running for us to determine price.

Returns:

There has been at least one datapoint since our algorithm started running for us to determine price.

Return type:

bool

property High

If this uses tradebar data, return the most recent high.

Returns:

If this uses tradebar data, return the most recent high.

Return type:

decimal

property HoldStock

Read only property that checks if we currently own stock in the company.

Returns:

Read only property that checks if we currently own stock in the company.

Return type:

bool

property Holdings

Holdings class contains the portfolio, cash and processes order fills.

Returns:

Holdings class contains the portfolio, cash and processes order fills.

Return type:

SecurityHolding

property Invested

Alias for HoldStock - Do we have any of this security

Returns:

Alias for HoldStock - Do we have any of this security

Return type:

bool

property IsDelisted

True if the security has been delisted from exchanges and is no longer tradable

Returns:

True if the security has been delisted from exchanges and is no longer tradable

Return type:

bool

property IsTradable

Gets or sets whether or not this security should be considered tradable

Returns:

Gets or sets whether or not this security should be considered tradable

Return type:

bool

property Leverage

Leverage for this Security.

Returns:

Leverage for this Security.

Return type:

decimal

property LocalTime

Local time for this market

Returns:

Local time for this market

Return type:

DateTime

property Low

If this uses tradebar data, return the most recent low.

Returns:

If this uses tradebar data, return the most recent low.

Return type:

decimal

property MarginInterestRateModel

Gets or sets the margin interest rate model

Returns:

Gets or sets the margin interest rate model

Return type:

IMarginInterestRateModel

property MarginModel

Gets the buying power model used for this security, an alias for BuyingPowerModel

Returns:

Gets the buying power model used for this security, an alias for BuyingPowerModel

Return type:

IBuyingPowerModel

property Open

If this uses tradebar data, return the most recent open.

Returns:

If this uses tradebar data, return the most recent open.

Return type:

decimal

property OpenInterest

Access to the open interest of the security today

Returns:

Access to the open interest of the security today

Return type:

int

property PortfolioModel

Gets the portfolio model used by this security

Returns:

Gets the portfolio model used by this security

Return type:

ISecurityPortfolioModel

property Price

Get the current value of the security.

Returns:

Get the current value of the security.

Return type:

decimal

property PriceVariationModel

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Returns:

Customizable price variation model used to define the minimum price variation of this security. By default minimum price variation is a constant find in the symbol-properties-database.

Return type:

IPriceVariationModel

property QuoteCurrency

Gets the Cash object used for converting the quote currency to the account currency

Returns:

Gets the Cash object used for converting the quote currency to the account currency

Return type:

Cash

property SettlementModel

Gets the settlement model used for this security

Returns:

Gets the settlement model used for this security

Return type:

ISettlementModel

property ShortableProvider

This securities IShortableProvider

Returns:

This securities IShortableProvider

Return type:

IShortableProvider

property SlippageModel

Slippage model use to compute slippage of market orders

Returns:

Slippage model use to compute slippage of market orders

Return type:

ISlippageModel

property Subscriptions

Gets all the subscriptions for this security

Returns:

Gets all the subscriptions for this security

Return type:

List<SubscriptionDataConfig>

property Symbol

Symbol for the asset.

Returns:

Symbol for the asset.

Return type:

Symbol

property SymbolProperties

Gets the symbol properties for this security

Returns:

Gets the symbol properties for this security

Return type:

SymbolProperties

property Type

Type of the security.

Returns:

Type of the security.

Return type:

SecurityType

property VolatilityModel

Gets the volatility model used for this security

Returns:

Gets the volatility model used for this security

Return type:

IVolatilityModel

property Volume

Access to the volume of the equity today

Returns:

Access to the volume of the equity today

Return type:

decimal

property [System.String]

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Returns:

Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.

Return type:

object

field NullLeverage

A null security leverage value

Returns:

A null security leverage value

Return type:

decimal

SecurityChanges

class QuantConnect.Data.UniverseSelection.SecurityChanges[source]

Defines the additions and subtractions to the algorithm's security subscriptions

property added_securities

Gets the symbols that were added by universe selection

Returns:

Gets the symbols that were added by universe selection

Return type:

List[Security]

property count

Gets the total count of added and removed securities

Returns:

Gets the total count of added and removed securities

Return type:

int

property filter_custom_securities

True will filter out custom securities from the AddedSecurities and RemovedSecurities properties

Returns:

True will filter out custom securities from the AddedSecurities and RemovedSecurities properties

Return type:

bool

property filter_internal_securities

True will filter out internal securities from the AddedSecurities and RemovedSecurities properties

Returns:

True will filter out internal securities from the AddedSecurities and RemovedSecurities properties

Return type:

bool

property removed_securities

Gets the symbols that were removed by universe selection. This list may include symbols that were removed, but are still receiving data due to existing holdings or open orders

Returns:

Gets the symbols that were removed by universe selection. This list may include symbols that were removed, but are still receiving data due to existing holdings or open orders

Return type:

List[Security]

field NONE

Gets an instance that represents no changes have been made

Returns:

Gets an instance that represents no changes have been made

Return type:

SecurityChanges

SecurityChanges

class QuantConnect.Data.UniverseSelection.SecurityChanges[source]

Defines the additions and subtractions to the algorithm's security subscriptions

property AddedSecurities

Gets the symbols that were added by universe selection

Returns:

Gets the symbols that were added by universe selection

Return type:

IReadOnlyList<Security>

property Count

Gets the total count of added and removed securities

Returns:

Gets the total count of added and removed securities

Return type:

Int32

property FilterCustomSecurities

True will filter out custom securities from the AddedSecurities and RemovedSecurities properties

Returns:

True will filter out custom securities from the AddedSecurities and RemovedSecurities properties

Return type:

bool

property FilterInternalSecurities

True will filter out internal securities from the AddedSecurities and RemovedSecurities properties

Returns:

True will filter out internal securities from the AddedSecurities and RemovedSecurities properties

Return type:

bool

property RemovedSecurities

Gets the symbols that were removed by universe selection. This list may include symbols that were removed, but are still receiving data due to existing holdings or open orders

Returns:

Gets the symbols that were removed by universe selection. This list may include symbols that were removed, but are still receiving data due to existing holdings or open orders

Return type:

IReadOnlyList<Security>

field None

Gets an instance that represents no changes have been made

Returns:

Gets an instance that represents no changes have been made

Return type:

SecurityChanges

SecurityExchangeHours

class QuantConnect.Securities.SecurityExchangeHours[source]

Represents the schedule of a security exchange. This includes daily regular and extended market hours as well as holidays, early closes and late opens.

get_market_hours(local_date_time)

Helper to access the market hours field based on the day of week

Parameters:
  • local_date_time (datetime)
Return type:

LocalMarketHours

get_next_market_close(local_date_time, extended_market_hours)

Gets the local date time corresponding to the next market close following the specified time

Parameters:
  • local_date_time (datetime)
  • extended_market_hours (bool)
Return type:

datetime

get_next_market_open(local_date_time, extended_market_hours)

Gets the local date time corresponding to the next market open following the specified time

Parameters:
  • local_date_time (datetime)
  • extended_market_hours (bool)
Return type:

datetime

get_next_trading_day(date)

Gets the next trading day

Parameters:
  • date (datetime)
Return type:

datetime

get_previous_market_open(local_date_time, extended_market_hours)

Gets the local date time corresponding to the previous market open to the specified time

Parameters:
  • local_date_time (datetime)
  • extended_market_hours (bool)
Return type:

datetime

get_previous_trading_day(local_date)

Gets the previous trading day

Parameters:
  • local_date (datetime)
Return type:

datetime

is_date_open(local_date_time)

Determines if the exchange will be open on the date specified by the local date time

Parameters:
  • local_date_time (datetime)
Return type:

bool

is_open(start_local_date_time, end_local_date_time, extended_market_hours)

Determines if the exchange is open at the specified local date time.

Parameters:
  • start_local_date_time (datetime)
  • end_local_date_time (datetime)
  • extended_market_hours (bool)
Return type:

bool

is_open(local_date_time, extended_market_hours)

Determines if the exchange is open at the specified local date time.

Parameters:
  • local_date_time (datetime)
  • extended_market_hours (bool)
Return type:

bool

property early_closes

Gets the early closes for this exchange

Returns:

Gets the early closes for this exchange

Return type:

Dict[datetime, timedelta]

property holidays

Gets the holidays for the exchange

Returns:

Gets the holidays for the exchange

Return type:

HashSet[datetime]

property is_market_always_open

Checks whether the market is always open or not

Returns:

Checks whether the market is always open or not

Return type:

bool

property late_opens

Gets the late opens for this exchange

Returns:

Gets the late opens for this exchange

Return type:

Dict[datetime, timedelta]

property market_hours

Gets the market hours for this exchange

Returns:

Gets the market hours for this exchange

Return type:

Dict[DayOfWeek, LocalMarketHours]

property regular_market_duration

Gets the most common tradable time during the market week. For a normal US equity trading day this is 6.5 hours. This does NOT account for extended market hours and only considers Market

Returns:

Gets the most common tradable time during the market week. For a normal US equity trading day this is 6.5 hours. This does NOT account for extended market hours and only considers Market

Return type:

timedelta

property time_zone

Gets the time zone this exchange resides in

Returns:

Gets the time zone this exchange resides in

Return type:

datetimeZone

SecurityExchangeHours

class QuantConnect.Securities.SecurityExchangeHours[source]

Represents the schedule of a security exchange. This includes daily regular and extended market hours as well as holidays, early closes and late opens.

GetMarketHours(localDateTime)

Helper to access the market hours field based on the day of week

Parameters:
  • localDateTime (DateTime)
Return type:

LocalMarketHours

GetNextMarketClose(localDateTime, extendedMarketHours)

Gets the local date time corresponding to the next market close following the specified time

Parameters:
  • localDateTime (DateTime)
  • extendedMarketHours (bool)
Return type:

DateTime

GetNextMarketOpen(localDateTime, extendedMarketHours)

Gets the local date time corresponding to the next market open following the specified time

Parameters:
  • localDateTime (DateTime)
  • extendedMarketHours (bool)
Return type:

DateTime

GetNextTradingDay(date)

Gets the next trading day

Parameters:
  • date (DateTime)
Return type:

DateTime

GetPreviousMarketOpen(localDateTime, extendedMarketHours)

Gets the local date time corresponding to the previous market open to the specified time

Parameters:
  • localDateTime (DateTime)
  • extendedMarketHours (bool)
Return type:

DateTime

GetPreviousTradingDay(localDate)

Gets the previous trading day

Parameters:
  • localDate (DateTime)
Return type:

DateTime

IsDateOpen(localDateTime)

Determines if the exchange will be open on the date specified by the local date time

Parameters:
  • localDateTime (DateTime)
Return type:

Boolean

IsOpen(startLocalDateTime, endLocalDateTime, extendedMarketHours)

Determines if the exchange is open at the specified local date time.

Parameters:
  • startLocalDateTime (DateTime)
  • endLocalDateTime (DateTime)
  • extendedMarketHours (bool)
Return type:

Boolean

IsOpen(localDateTime, extendedMarketHours)

Determines if the exchange is open at the specified local date time.

Parameters:
  • localDateTime (DateTime)
  • extendedMarketHours (bool)
Return type:

Boolean

property EarlyCloses

Gets the early closes for this exchange

Returns:

Gets the early closes for this exchange

Return type:

IReadOnlyDictionary<DateTime, TimeSpan>

property Holidays

Gets the holidays for the exchange

Returns:

Gets the holidays for the exchange

Return type:

HashSet<DateTime>

property IsMarketAlwaysOpen

Checks whether the market is always open or not

Returns:

Checks whether the market is always open or not

Return type:

bool

property LateOpens

Gets the late opens for this exchange

Returns:

Gets the late opens for this exchange

Return type:

IReadOnlyDictionary<DateTime, TimeSpan>

property MarketHours

Gets the market hours for this exchange

Returns:

Gets the market hours for this exchange

Return type:

IReadOnlyDictionary<DayOfWeek, LocalMarketHours>

property RegularMarketDuration

Gets the most common tradable time during the market week. For a normal US equity trading day this is 6.5 hours. This does NOT account for extended market hours and only considers Market

Returns:

Gets the most common tradable time during the market week. For a normal US equity trading day this is 6.5 hours. This does NOT account for extended market hours and only considers Market

Return type:

TimeSpan

property TimeZone

Gets the time zone this exchange resides in

Returns:

Gets the time zone this exchange resides in

Return type:

DateTimeZone

SecurityType

enum QuantConnect.SecurityType[source]

Type of tradable security / underlying asset

field BASE

Base class for all security types (0)

Returns:

Base class for all security types (0)

Return type:

SecurityType

field CFD

Contract For a Difference Security Type (6)

Returns:

Contract For a Difference Security Type (6)

Return type:

SecurityType

field COMMODITY

Commodity Security Type (3)

Returns:

Commodity Security Type (3)

Return type:

SecurityType

field CRYPTO

Cryptocurrency Security Type (7)

Returns:

Cryptocurrency Security Type (7)

Return type:

SecurityType

field CRYPTO_FUTURE

Crypto Future Type (11)

Returns:

Crypto Future Type (11)

Return type:

SecurityType

field EQUITY

US Equity Security (1)

Returns:

US Equity Security (1)

Return type:

SecurityType

field FOREX

FOREX Security (4)

Returns:

FOREX Security (4)

Return type:

SecurityType

field FUTURE

Future Security Type (5)

Returns:

Future Security Type (5)

Return type:

SecurityType

field FUTURE_OPTION

Futures Options Security Type (8)

Returns:

Futures Options Security Type (8)

Return type:

SecurityType

field INDEX

Index Security Type (9)

Returns:

Index Security Type (9)

Return type:

SecurityType

field INDEX_OPTION

Index Option Security Type (10)

Returns:

Index Option Security Type (10)

Return type:

SecurityType

field OPTION

Option Security Type (2)

Returns:

Option Security Type (2)

Return type:

SecurityType

SecurityType

enum QuantConnect.SecurityType[source]

Type of tradable security / underlying asset

field Base

Base class for all security types (0)

Returns:

Base class for all security types (0)

Return type:

SecurityType

field Cfd

Contract For a Difference Security Type (6)

Returns:

Contract For a Difference Security Type (6)

Return type:

SecurityType

field Commodity

Commodity Security Type (3)

Returns:

Commodity Security Type (3)

Return type:

SecurityType

field Crypto

Cryptocurrency Security Type (7)

Returns:

Cryptocurrency Security Type (7)

Return type:

SecurityType

field CryptoFuture

Crypto Future Type (11)

Returns:

Crypto Future Type (11)

Return type:

SecurityType

field Equity

US Equity Security (1)

Returns:

US Equity Security (1)

Return type:

SecurityType

field Forex

FOREX Security (4)

Returns:

FOREX Security (4)

Return type:

SecurityType

field Future

Future Security Type (5)

Returns:

Future Security Type (5)

Return type:

SecurityType

field FutureOption

Futures Options Security Type (8)

Returns:

Futures Options Security Type (8)

Return type:

SecurityType

field Index

Index Security Type (9)

Returns:

Index Security Type (9)

Return type:

SecurityType

field IndexOption

Index Option Security Type (10)

Returns:

Index Option Security Type (10)

Return type:

SecurityType

field Option

Option Security Type (2)

Returns:

Option Security Type (2)

Return type:

SecurityType

SeparatingLines

class QuantConnect.Indicators.CandlestickPatterns.SeparatingLines[source]

Separating Lines candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

SeparatingLines

class QuantConnect.Indicators.CandlestickPatterns.SeparatingLines[source]

Separating Lines candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

SeriesType

enum QuantConnect.SeriesType[source]

Available types of chart series

field BAR

Bar chart (3)

Returns:

Bar chart (3)

Return type:

SeriesType

field CANDLE

Charts (2)

Returns:

Charts (2)

Return type:

SeriesType

field FLAG

Flag indicators (4)

Returns:

Flag indicators (4)

Return type:

SeriesType

field HEATMAP

Heatmap Plot (9) -- NOTE: 8 is reserved

Returns:

Heatmap Plot (9) -- NOTE: 8 is reserved

Return type:

SeriesType

field LINE

Line Plot for Value Types (0)

Returns:

Line Plot for Value Types (0)

Return type:

SeriesType

field PIE

Pie chart (6)

Returns:

Pie chart (6)

Return type:

SeriesType

field SCATTER

Scatter Plot for Chart Distinct Types (1)

Returns:

Scatter Plot for Chart Distinct Types (1)

Return type:

SeriesType

field SCATTER_3D

Scatter 3D Plot (10)

Returns:

Scatter 3D Plot (10)

Return type:

SeriesType

field STACKED_AREA

100% area chart showing relative proportions of series values at each time index (5)

Returns:

100% area chart showing relative proportions of series values at each time index (5)

Return type:

SeriesType

field TREEMAP

Treemap Plot (7)

Returns:

Treemap Plot (7)

Return type:

SeriesType

SeriesType

enum QuantConnect.SeriesType[source]

Available types of chart series

field Bar

Bar chart (3)

Returns:

Bar chart (3)

Return type:

SeriesType

field Candle

Charts (2)

Returns:

Charts (2)

Return type:

SeriesType

field Flag

Flag indicators (4)

Returns:

Flag indicators (4)

Return type:

SeriesType

field Heatmap

Heatmap Plot (9) -- NOTE: 8 is reserved

Returns:

Heatmap Plot (9) -- NOTE: 8 is reserved

Return type:

SeriesType

field Line

Line Plot for Value Types (0)

Returns:

Line Plot for Value Types (0)

Return type:

SeriesType

field Pie

Pie chart (6)

Returns:

Pie chart (6)

Return type:

SeriesType

field Scatter

Scatter Plot for Chart Distinct Types (1)

Returns:

Scatter Plot for Chart Distinct Types (1)

Return type:

SeriesType

field Scatter3d

Scatter 3D Plot (10)

Returns:

Scatter 3D Plot (10)

Return type:

SeriesType

field StackedArea

100% area chart showing relative proportions of series values at each time index (5)

Returns:

100% area chart showing relative proportions of series values at each time index (5)

Return type:

SeriesType

field Treemap

Treemap Plot (7)

Returns:

Treemap Plot (7)

Return type:

SeriesType

ShootingStar

class QuantConnect.Indicators.CandlestickPatterns.ShootingStar[source]

Shooting Star candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ShootingStar

class QuantConnect.Indicators.CandlestickPatterns.ShootingStar[source]

Shooting Star candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ShortLineCandle

class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle[source]

Short Line Candle candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ShortLineCandle

class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle[source]

Short Line Candle candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Slice

class QuantConnect.Data.Slice[source]

Provides a data structure for all of an algorithm's data at a single time step

clear()

Removes all keys and values from the IExtendedDictionary.

contains_key(symbol)

Determines whether this instance contains data for the specified symbol

Parameters:
Return type:

bool

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get()

Gets the DataDictionary for all data of the specified type

get(symbol)

Gets the DataDictionary for all data of the specified type

Parameters:
get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
  • symbol (Symbol)
  • value (object)
Return type:

Object

get(type)

Gets the DataDictionary for all data of the specified type

Parameters:
  • type (Type)
Return type:

Object

get_enumerator()

Returns an enumerator that iterates through the collection.

Return type:

Dict[Symbol, BaseData]

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

merge_slice(input_slice)

Merge two slice with same Time

Parameters:
pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
  • symbol (Symbol)
  • default_value (object)
Return type:

Object

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

remove(symbol)

Removes the value with the specified Symbol

Parameters:
Return type:

bool

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
  • symbol (Symbol)
  • default_value (object)
Return type:

Object

try_get_value(symbol, data)

Gets the data associated with the specified symbol

Parameters:
  • symbol (Symbol)
  • data (Object&)
Return type:

bool

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property all_data

All the data hold in this slice

Returns:

All the data hold in this slice

Return type:

List[BaseData]

property bars

Gets the TradeBars for this slice of data

Returns:

Gets the TradeBars for this slice of data

Return type:

TradeBars

property count

Gets the number of symbols held in this slice

Returns:

Gets the number of symbols held in this slice

Return type:

int

property delistings

Gets the Delistings for this slice of data

Returns:

Gets the Delistings for this slice of data

Return type:

Delistings

property dividends

Gets the Dividends for this slice of data

Returns:

Gets the Dividends for this slice of data

Return type:

Dividends

property future_chains

Gets the FuturesChains for this slice of data

Returns:

Gets the FuturesChains for this slice of data

Return type:

FuturesChains

property futures_chains

Gets the FuturesChains for this slice of data

Returns:

Gets the FuturesChains for this slice of data

Return type:

FuturesChains

property has_data

Gets whether or not this slice has data

Returns:

Gets whether or not this slice has data

Return type:

bool

property is_read_only

Gets a value indicating whether the IDictionary object is read-only.

Returns:

Gets a value indicating whether the IDictionary object is read-only.

Return type:

bool

property item

Gets the data corresponding to the specified symbol. If the requested data is of Tick, then a List will be returned, otherwise, it will be the subscribed type, for example, TradeBar or event UnlinkedData for custom data.

Returns:

Gets the data corresponding to the specified symbol. If the requested data is of Tick, then a List will be returned, otherwise, it will be the subscribed type, for example, TradeBar or event UnlinkedData for custom data.

Return type:

object

property keys

Gets all the symbols in this slice

Returns:

Gets all the symbols in this slice

Return type:

List[Symbol]

property margin_interest_rates

Gets the MarginInterestRates for this slice of data

Returns:

Gets the MarginInterestRates for this slice of data

Return type:

MarginInterestRates

property option_chains

Gets the OptionChains for this slice of data

Returns:

Gets the OptionChains for this slice of data

Return type:

OptionChains

property quote_bars

Gets the QuoteBars for this slice of data

Returns:

Gets the QuoteBars for this slice of data

Return type:

QuoteBars

property splits

Gets the Splits for this slice of data

Returns:

Gets the Splits for this slice of data

Return type:

Splits

property symbol_changed_events

Gets the SymbolChangedEvents for this slice of data

Returns:

Gets the SymbolChangedEvents for this slice of data

Return type:

SymbolChangedEvents

property ticks

Gets the Ticks for this slice of data

Returns:

Gets the Ticks for this slice of data

Return type:

Ticks

property time

Gets the timestamp for this slice of data

Returns:

Gets the timestamp for this slice of data

Return type:

datetime

property utc_time

Gets the timestamp for this slice of data in UTC

Returns:

Gets the timestamp for this slice of data in UTC

Return type:

datetime

property values

Gets a list of all the data in this slice

Returns:

Gets a list of all the data in this slice

Return type:

List[BaseData]

Slice

class QuantConnect.Data.Slice[source]

Provides a data structure for all of an algorithm's data at a single time step

Clear()

Removes all items from the ICollection.

ContainsKey(symbol)

Determines whether this instance contains data for the specified symbol

Parameters:
Return type:

Boolean

Get()

Gets the DataDictionary for all data of the specified type

Get(symbol)

Gets the DataDictionary for all data of the specified type

Parameters:
Get(type)

Gets the DataDictionary for all data of the specified type

Parameters:
  • type (Type)
Return type:

Object

GetEnumerator()

Returns an enumerator that iterates through the collection.

Return type:

KeyValuePair[Symbol, BaseData]

MergeSlice(inputSlice)

Merge two slice with same Time

Parameters:
Remove(symbol)

Removes the value with the specified Symbol

Parameters:
Return type:

Boolean

TryGetValue(symbol, data)

Gets the data associated with the specified symbol

Parameters:
  • symbol (Symbol)
  • data (Object&)
Return type:

Boolean

clear()

Removes all keys and values from the IExtendedDictionary.

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
  • symbol (Symbol)
  • value (object)
Return type:

Object

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
  • symbol (Symbol)
  • default_value (object)
Return type:

Object

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
  • symbol (Symbol)
  • default_value (object)
Return type:

Object

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property AllData

All the data hold in this slice

Returns:

All the data hold in this slice

Return type:

List<BaseData>

property Bars

Gets the TradeBars for this slice of data

Returns:

Gets the TradeBars for this slice of data

Return type:

TradeBars

property Count

Gets the number of symbols held in this slice

Returns:

Gets the number of symbols held in this slice

Return type:

Int32

property Delistings

Gets the Delistings for this slice of data

Returns:

Gets the Delistings for this slice of data

Return type:

Delistings

property Dividends

Gets the Dividends for this slice of data

Returns:

Gets the Dividends for this slice of data

Return type:

Dividends

property FutureChains

Gets the FuturesChains for this slice of data

Returns:

Gets the FuturesChains for this slice of data

Return type:

FuturesChains

property FuturesChains

Gets the FuturesChains for this slice of data

Returns:

Gets the FuturesChains for this slice of data

Return type:

FuturesChains

property HasData

Gets whether or not this slice has data

Returns:

Gets whether or not this slice has data

Return type:

bool

property IsReadOnly

Gets a value indicating whether the IDictionary object is read-only.

Returns:

Gets a value indicating whether the IDictionary object is read-only.

Return type:

bool

property Keys

Gets all the symbols in this slice

Returns:

Gets all the symbols in this slice

Return type:

IReadOnlyList<Symbol>

property MarginInterestRates

Gets the MarginInterestRates for this slice of data

Returns:

Gets the MarginInterestRates for this slice of data

Return type:

MarginInterestRates

property OptionChains

Gets the OptionChains for this slice of data

Returns:

Gets the OptionChains for this slice of data

Return type:

OptionChains

property QuoteBars

Gets the QuoteBars for this slice of data

Returns:

Gets the QuoteBars for this slice of data

Return type:

QuoteBars

property Splits

Gets the Splits for this slice of data

Returns:

Gets the Splits for this slice of data

Return type:

Splits

property SymbolChangedEvents

Gets the SymbolChangedEvents for this slice of data

Returns:

Gets the SymbolChangedEvents for this slice of data

Return type:

SymbolChangedEvents

property Ticks

Gets the Ticks for this slice of data

Returns:

Gets the Ticks for this slice of data

Return type:

Ticks

property Time

Gets the timestamp for this slice of data

Returns:

Gets the timestamp for this slice of data

Return type:

DateTime

property UtcTime

Gets the timestamp for this slice of data in UTC

Returns:

Gets the timestamp for this slice of data in UTC

Return type:

DateTime

property Values

Gets a list of all the data in this slice

Returns:

Gets a list of all the data in this slice

Return type:

IReadOnlyList<BaseData>

property [QuantConnect.Symbol]

Gets the data corresponding to the specified symbol. If the requested data is of Tick, then a List will be returned, otherwise, it will be the subscribed type, for example, TradeBar or event UnlinkedData for custom data.

Returns:

Gets the data corresponding to the specified symbol. If the requested data is of Tick, then a List will be returned, otherwise, it will be the subscribed type, for example, TradeBar or event UnlinkedData for custom data.

Return type:

object

property [System.String]

Indexer method for the base dictioanry to access the objects by their symbol.

Returns:

Indexer method for the base dictioanry to access the objects by their symbol.

Return type:

object

SpinningTop

class QuantConnect.Indicators.CandlestickPatterns.SpinningTop[source]

Spinning Top candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

SpinningTop

class QuantConnect.Indicators.CandlestickPatterns.SpinningTop[source]

Spinning Top candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Splits

class QuantConnect.Data.Market.Splits[source]

Collection of splits keyed by Symbol

add(key, value)

Adds an item to the ICollection.

Parameters:
add(item)

Adds an item to the ICollection.

Parameters:
  • item (Dict[Symbol, Split])
clear()

Removes all keys and values from the IExtendedDictionary.

contains(item)

Determines whether the ICollection contains a specific value.

Parameters:
  • item (Dict[Symbol, Split])
Return type:

bool

contains_key(key)

Determines whether the IDictionary contains an element with the specified key.

Parameters:
Return type:

bool

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

copy_to(array, array_index)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters:
  • array (Dict)
  • array_index (int)
fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
Return type:

Split

get_enumerator()

Returns an enumerator that iterates through the collection.

Return type:

Dict[Symbol, Split]

get_value(key)

Gets the value associated with the specified key.

Parameters:
Return type:

Split

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
Return type:

Split

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

remove(item)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
  • item (Dict[Symbol, Split])
Return type:

bool

remove(key)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
Return type:

bool

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
Return type:

Split

try_get_value(key, value)

Gets the value associated with the specified key.

Parameters:
Return type:

bool

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property count

Gets the number of elements contained in the ICollection.

Returns:

Gets the number of elements contained in the ICollection.

Return type:

int

property is_read_only

Gets a value indicating whether the ICollection is read-only.

Returns:

Gets a value indicating whether the ICollection is read-only.

Return type:

bool

property item

Gets or sets the Split with the specified ticker.

Returns:

Gets or sets the Split with the specified ticker.

Return type:

Split

property keys

Gets an ICollection containing the keys of the IDictionary.

Returns:

Gets an ICollection containing the keys of the IDictionary.

Return type:

List[Symbol]

property time

Gets or sets the time associated with this collection of data

Returns:

Gets or sets the time associated with this collection of data

Return type:

datetime

property values

Gets an ICollection containing the values in the IDictionary.

Returns:

Gets an ICollection containing the values in the IDictionary.

Return type:

List[Split]

Splits

class QuantConnect.Data.Market.Splits[source]

Collection of splits keyed by Symbol

Add(key, value)

Adds an item to the ICollection.

Parameters:
Add(item)

Adds an item to the ICollection.

Parameters:
  • item (KeyValuePair<Symbol, Split>)
Clear()

Removes all items from the ICollection.

Contains(item)

Determines whether the ICollection contains a specific value.

Parameters:
  • item (KeyValuePair<Symbol, Split>)
Return type:

Boolean

ContainsKey(key)

Determines whether the IDictionary contains an element with the specified key.

Parameters:
Return type:

Boolean

CopyTo(array, arrayIndex)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters:
  • array (KeyValuePair)
  • arrayIndex (Int32)
GetEnumerator()

Returns an enumerator that iterates through the collection.

Return type:

KeyValuePair[Symbol, Split]

GetValue(key)

Gets the value associated with the specified key.

Parameters:
Return type:

Split

Remove(item)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
  • item (KeyValuePair<Symbol, Split>)
Return type:

Boolean

Remove(key)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
Return type:

Boolean

TryGetValue(key, value)

Gets the value associated with the specified key.

Parameters:
Return type:

Boolean

clear()

Removes all keys and values from the IExtendedDictionary.

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
Return type:

Split

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
Return type:

Split

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
Return type:

Split

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property Count

Gets the number of elements contained in the ICollection.

Returns:

Gets the number of elements contained in the ICollection.

Return type:

Int32

property IsReadOnly

Gets a value indicating whether the ICollection is read-only.

Returns:

Gets a value indicating whether the ICollection is read-only.

Return type:

bool

property Keys

Gets an ICollection containing the keys of the IDictionary.

Returns:

Gets an ICollection containing the keys of the IDictionary.

Return type:

ICollection<Symbol>

property Time

Gets or sets the time associated with this collection of data

Returns:

Gets or sets the time associated with this collection of data

Return type:

DateTime

property Values

Gets an ICollection containing the values in the IDictionary.

Returns:

Gets an ICollection containing the values in the IDictionary.

Return type:

ICollection<Split>

property [QuantConnect.Symbol]

Gets or sets the Split with the specified Symbol.

Returns:

Gets or sets the Split with the specified Symbol.

Return type:

Split

property [System.String]

Gets or sets the Split with the specified ticker.

Returns:

Gets or sets the Split with the specified ticker.

Return type:

Split

StalledPattern

class QuantConnect.Indicators.CandlestickPatterns.StalledPattern[source]

Stalled Pattern candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

StalledPattern

class QuantConnect.Indicators.CandlestickPatterns.StalledPattern[source]

Stalled Pattern candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

StickSandwich

class QuantConnect.Indicators.CandlestickPatterns.StickSandwich[source]

Stick Sandwich candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

StickSandwich

class QuantConnect.Indicators.CandlestickPatterns.StickSandwich[source]

Stick Sandwich candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

SubmitOrderRequest

class QuantConnect.Orders.SubmitOrderRequest[source]

Defines a request to submit a new order

set_response(response, status=3)

Sets the Response for this request

Parameters:
property group_order_manager

Gets the manager for the combo order. If null, the order is not a combo order.

Returns:

Gets the manager for the combo order. If null, the order is not a combo order.

Return type:

GroupOrderManager

property limit_price

Gets the limit price of the order, zero if not a limit order

Returns:

Gets the limit price of the order, zero if not a limit order

Return type:

float

property order_id

Gets the order id the request acts on

Returns:

Gets the order id the request acts on

Return type:

int

property order_properties

Gets the order properties for this request

Returns:

Gets the order properties for this request

Return type:

IOrderProperties

property order_request_type

Gets Submit

Returns:

Gets Submit

Return type:

OrderRequestType

property order_type

Gets the order type od the order

Returns:

Gets the order type od the order

Return type:

OrderType

property quantity

Gets the quantity of the order

Returns:

Gets the quantity of the order

Return type:

float

property response

Gets the response for this request. If this request was never processed then this will equal Unprocessed. This value is never equal to null.

Returns:

Gets the response for this request. If this request was never processed then this will equal Unprocessed. This value is never equal to null.

Return type:

OrderResponse

property security_type

Gets the security type of the symbol

Returns:

Gets the security type of the symbol

Return type:

SecurityType

property status

Gets the status of this request

Returns:

Gets the status of this request

Return type:

OrderRequestStatus

property stop_price

Gets the stop price of the order, zero if not a stop order

Returns:

Gets the stop price of the order, zero if not a stop order

Return type:

float

property symbol

Gets the symbol to be traded

Returns:

Gets the symbol to be traded

Return type:

Symbol

property tag

Gets a tag for this request

Returns:

Gets a tag for this request

Return type:

str

property time

Gets the UTC time the request was created

Returns:

Gets the UTC time the request was created

Return type:

datetime

property trailing_amount

Trailing amount for a trailing stop order

Returns:

Trailing amount for a trailing stop order

Return type:

float

property trailing_as_percentage

Determines whether the TrailingAmount is a percentage or an absolute currency value

Returns:

Determines whether the TrailingAmount is a percentage or an absolute currency value

Return type:

bool

property trigger_price

Price which must first be reached before a limit order can be submitted.

Returns:

Price which must first be reached before a limit order can be submitted.

Return type:

float

SubmitOrderRequest

class QuantConnect.Orders.SubmitOrderRequest[source]

Defines a request to submit a new order

SetResponse(response, status=3)

Sets the Response for this request

Parameters:
property GroupOrderManager

Gets the manager for the combo order. If null, the order is not a combo order.

Returns:

Gets the manager for the combo order. If null, the order is not a combo order.

Return type:

GroupOrderManager

property LimitPrice

Gets the limit price of the order, zero if not a limit order

Returns:

Gets the limit price of the order, zero if not a limit order

Return type:

decimal

property OrderId

Gets the order id the request acts on

Returns:

Gets the order id the request acts on

Return type:

Int32

property OrderProperties

Gets the order properties for this request

Returns:

Gets the order properties for this request

Return type:

IOrderProperties

property OrderRequestType

Gets Submit

Returns:

Gets Submit

Return type:

OrderRequestType

property OrderType

Gets the order type od the order

Returns:

Gets the order type od the order

Return type:

OrderType

property Quantity

Gets the quantity of the order

Returns:

Gets the quantity of the order

Return type:

decimal

property Response

Gets the response for this request. If this request was never processed then this will equal Unprocessed. This value is never equal to null.

Returns:

Gets the response for this request. If this request was never processed then this will equal Unprocessed. This value is never equal to null.

Return type:

OrderResponse

property SecurityType

Gets the security type of the symbol

Returns:

Gets the security type of the symbol

Return type:

SecurityType

property Status

Gets the status of this request

Returns:

Gets the status of this request

Return type:

OrderRequestStatus

property StopPrice

Gets the stop price of the order, zero if not a stop order

Returns:

Gets the stop price of the order, zero if not a stop order

Return type:

decimal

property Symbol

Gets the symbol to be traded

Returns:

Gets the symbol to be traded

Return type:

Symbol

property Tag

Gets a tag for this request

Returns:

Gets a tag for this request

Return type:

string

property Time

Gets the UTC time the request was created

Returns:

Gets the UTC time the request was created

Return type:

DateTime

property TrailingAmount

Trailing amount for a trailing stop order

Returns:

Trailing amount for a trailing stop order

Return type:

decimal

property TrailingAsPercentage

Determines whether the TrailingAmount is a percentage or an absolute currency value

Returns:

Determines whether the TrailingAmount is a percentage or an absolute currency value

Return type:

bool

property TriggerPrice

Price which must first be reached before a limit order can be submitted.

Returns:

Price which must first be reached before a limit order can be submitted.

Return type:

decimal

SwissArmyKnifeTool

enum QuantConnect.Indicators.SwissArmyKnifeTool[source]

The tools of the Swiss Army Knife. Some of the tools lend well to chaining with the "Of" Method, others may be treated as moving averages

field BAND_PASS

BandPass Filter (4)

Returns:

BandPass Filter (4)

Return type:

SwissArmyKnifeTool

field BUTTER

Two Pole Butterworth Filter (1)

Returns:

Two Pole Butterworth Filter (1)

Return type:

SwissArmyKnifeTool

field GAUSS

Two Pole Gaussian Filter (0)

Returns:

Two Pole Gaussian Filter (0)

Return type:

SwissArmyKnifeTool

field HIGH_PASS

High Pass Filter (2)

Returns:

High Pass Filter (2)

Return type:

SwissArmyKnifeTool

field TWO_POLE_HIGH_PASS

Two Pole High Pass Filter (3)

Returns:

Two Pole High Pass Filter (3)

Return type:

SwissArmyKnifeTool

SwissArmyKnifeTool

enum QuantConnect.Indicators.SwissArmyKnifeTool[source]

The tools of the Swiss Army Knife. Some of the tools lend well to chaining with the "Of" Method, others may be treated as moving averages

field BandPass

BandPass Filter (4)

Returns:

BandPass Filter (4)

Return type:

SwissArmyKnifeTool

field Butter

Two Pole Butterworth Filter (1)

Returns:

Two Pole Butterworth Filter (1)

Return type:

SwissArmyKnifeTool

field Gauss

Two Pole Gaussian Filter (0)

Returns:

Two Pole Gaussian Filter (0)

Return type:

SwissArmyKnifeTool

field HighPass

High Pass Filter (2)

Returns:

High Pass Filter (2)

Return type:

SwissArmyKnifeTool

field TwoPoleHighPass

Two Pole High Pass Filter (3)

Returns:

Two Pole High Pass Filter (3)

Return type:

SwissArmyKnifeTool

Symbol

class QuantConnect.Symbol[source]

Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security

has_canonical()

Determines whether the symbol has a canonical representation

Return type:

bool

has_underlying_symbol(symbol)

Determines if the specified symbol is an underlying of this symbol instance

Parameters:
Return type:

bool

is_canonical()

Method returns true, if symbol is a derivative canonical symbol

Return type:

bool

update_mapped_symbol(mapped_symbol, contract_depth_offset=0)

Creates new symbol with updated mapped symbol. Symbol Mapping: When symbols change over time (e.g. CHASE-> JPM) need to update the symbol requested. Method returns newly created symbol

Parameters:
  • mapped_symbol (str)
  • contract_depth_offset (int, optional)
Return type:

Symbol

property canonical

Get's the canonical representation of this symbol

Returns:

Get's the canonical representation of this symbol

Return type:

Symbol

property cik

The Central Index Key number (CIK) corresponding to this Symbol

Returns:

The Central Index Key number (CIK) corresponding to this Symbol

Return type:

int

property composite_figi

The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol

Returns:

The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol

Return type:

str

property cusip

The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol

Returns:

The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol

Return type:

str

property has_underlying

Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property

Returns:

Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property

Return type:

bool

property id

Gets the security identifier for this symbol

Returns:

Gets the security identifier for this symbol

Return type:

SecurityIdentifier

property isin

The International Securities Identification Number (ISIN) corresponding to this Symbol

Returns:

The International Securities Identification Number (ISIN) corresponding to this Symbol

Return type:

str

property security_type

Gets the security type of the symbol

Returns:

Gets the security type of the symbol

Return type:

SecurityType

property sedol

The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol

Returns:

The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol

Return type:

str

property underlying

Gets the security underlying symbol, if any

Returns:

Gets the security underlying symbol, if any

Return type:

Symbol

property value

Gets the current symbol for this ticker

Returns:

Gets the current symbol for this ticker

Return type:

str

field EMPTY

Represents an unassigned symbol. This is intended to be used as an uninitialized, default value

Returns:

Represents an unassigned symbol. This is intended to be used as an uninitialized, default value

Return type:

Symbol

field NONE

Represents no symbol. This is intended to be used when no symbol is explicitly intended

Returns:

Represents no symbol. This is intended to be used when no symbol is explicitly intended

Return type:

Symbol

Symbol

class QuantConnect.Symbol[source]

Represents a unique security identifier. This is made of two components, the unique SID and the Value. The value is the current ticker symbol while the SID is constant over the life of a security

HasCanonical()

Determines whether the symbol has a canonical representation

Return type:

Boolean

HasUnderlyingSymbol(symbol)

Determines if the specified symbol is an underlying of this symbol instance

Parameters:
Return type:

Boolean

IsCanonical()

Method returns true, if symbol is a derivative canonical symbol

Return type:

Boolean

UpdateMappedSymbol(mappedSymbol, contractDepthOffset=0)

Creates new symbol with updated mapped symbol. Symbol Mapping: When symbols change over time (e.g. CHASE-> JPM) need to update the symbol requested. Method returns newly created symbol

Parameters:
  • mappedSymbol (string)
  • contractDepthOffset (UInt32, optional)
Return type:

Symbol

property CIK

The Central Index Key number (CIK) corresponding to this Symbol

Returns:

The Central Index Key number (CIK) corresponding to this Symbol

Return type:

Int32

property CUSIP

The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol

Returns:

The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol

Return type:

string

property Canonical

Get's the canonical representation of this symbol

Returns:

Get's the canonical representation of this symbol

Return type:

Symbol

property CompositeFIGI

The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol

Returns:

The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol

Return type:

string

property HasUnderlying

Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property

Returns:

Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property

Return type:

bool

property ID

Gets the security identifier for this symbol

Returns:

Gets the security identifier for this symbol

Return type:

SecurityIdentifier

property ISIN

The International Securities Identification Number (ISIN) corresponding to this Symbol

Returns:

The International Securities Identification Number (ISIN) corresponding to this Symbol

Return type:

string

property SEDOL

The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol

Returns:

The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol

Return type:

string

property SecurityType

Gets the security type of the symbol

Returns:

Gets the security type of the symbol

Return type:

SecurityType

property Underlying

Gets the security underlying symbol, if any

Returns:

Gets the security underlying symbol, if any

Return type:

Symbol

property Value

Gets the current symbol for this ticker

Returns:

Gets the current symbol for this ticker

Return type:

string

field Empty

Represents an unassigned symbol. This is intended to be used as an uninitialized, default value

Returns:

Represents an unassigned symbol. This is intended to be used as an uninitialized, default value

Return type:

Symbol

field None

Represents no symbol. This is intended to be used when no symbol is explicitly intended

Returns:

Represents no symbol. This is intended to be used when no symbol is explicitly intended

Return type:

Symbol

SymbolChangedEvents

class QuantConnect.Data.Market.SymbolChangedEvents[source]

Collection of SymbolChangedEvent keyed by the original, requested symbol

add(key, value)

Adds an item to the ICollection.

Parameters:
add(item)

Adds an item to the ICollection.

Parameters:
  • item (Dict[Symbol, SymbolChangedEvent])
clear()

Removes all keys and values from the IExtendedDictionary.

contains(item)

Determines whether the ICollection contains a specific value.

Parameters:
  • item (Dict[Symbol, SymbolChangedEvent])
Return type:

bool

contains_key(key)

Determines whether the IDictionary contains an element with the specified key.

Parameters:
Return type:

bool

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

copy_to(array, array_index)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters:
  • array (Dict)
  • array_index (int)
fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
Return type:

SymbolChangedEvent

get_enumerator()

Returns an enumerator that iterates through the collection.

Return type:

Dict[Symbol, SymbolChangedEvent]

get_value(key)

Gets the value associated with the specified key.

Parameters:
Return type:

SymbolChangedEvent

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
Return type:

SymbolChangedEvent

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

remove(item)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
  • item (Dict[Symbol, SymbolChangedEvent])
Return type:

bool

remove(key)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
Return type:

bool

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
Return type:

SymbolChangedEvent

try_get_value(key, value)

Gets the value associated with the specified key.

Parameters:
Return type:

bool

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property count

Gets the number of elements contained in the ICollection.

Returns:

Gets the number of elements contained in the ICollection.

Return type:

int

property is_read_only

Gets a value indicating whether the ICollection is read-only.

Returns:

Gets a value indicating whether the ICollection is read-only.

Return type:

bool

property item

Gets or sets the SymbolChangedEvent with the specified ticker.

Returns:

Gets or sets the SymbolChangedEvent with the specified ticker.

Return type:

SymbolChangedEvent

property keys

Gets an ICollection containing the keys of the IDictionary.

Returns:

Gets an ICollection containing the keys of the IDictionary.

Return type:

List[Symbol]

property time

Gets or sets the time associated with this collection of data

Returns:

Gets or sets the time associated with this collection of data

Return type:

datetime

property values

Gets an ICollection containing the values in the IDictionary.

Returns:

Gets an ICollection containing the values in the IDictionary.

Return type:

List[SymbolChangedEvent]

SymbolChangedEvents

class QuantConnect.Data.Market.SymbolChangedEvents[source]

Collection of SymbolChangedEvent keyed by the original, requested symbol

Add(key, value)

Adds an item to the ICollection.

Parameters:
Add(item)

Adds an item to the ICollection.

Parameters:
  • item (KeyValuePair<Symbol, SymbolChangedEvent>)
Clear()

Removes all items from the ICollection.

Contains(item)

Determines whether the ICollection contains a specific value.

Parameters:
  • item (KeyValuePair<Symbol, SymbolChangedEvent>)
Return type:

Boolean

ContainsKey(key)

Determines whether the IDictionary contains an element with the specified key.

Parameters:
Return type:

Boolean

CopyTo(array, arrayIndex)

Copies the elements of the ICollection to an Array, starting at a particular Array index.

Parameters:
  • array (KeyValuePair)
  • arrayIndex (Int32)
GetEnumerator()

Returns an enumerator that iterates through the collection.

Return type:

KeyValuePair[Symbol, SymbolChangedEvent]

GetValue(key)

Gets the value associated with the specified key.

Parameters:
Return type:

SymbolChangedEvent

Remove(item)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
  • item (KeyValuePair<Symbol, SymbolChangedEvent>)
Return type:

Boolean

Remove(key)

Removes the first occurrence of a specific object from the ICollection.

Parameters:
Return type:

Boolean

TryGetValue(key, value)

Gets the value associated with the specified key.

Parameters:
Return type:

Boolean

clear()

Removes all keys and values from the IExtendedDictionary.

copy()

Creates a shallow copy of the IExtendedDictionary.

Return type:

PyDict

fromkeys(sequence, value)

Creates a new dictionary from the given sequence of elements.

Parameters:
Return type:

PyDict

get(symbol, value)

Returns the value for the specified Symbol if Symbol is in dictionary.

Parameters:
Return type:

SymbolChangedEvent

items()

Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.

Return type:

PyList

keys()

Returns a view object that displays a list of all the Symbol objects in the dictionary

Return type:

PyList

pop(symbol, default_value)

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Parameters:
Return type:

SymbolChangedEvent

popitem()

Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.

Return type:

PyTuple

setdefault(symbol, default_value)

Returns the value of a Symbol (if the Symbol is in dictionary). If not, it inserts Symbol with a value to the dictionary.

Parameters:
Return type:

SymbolChangedEvent

update(other)

Updates the dictionary with the elements from the another dictionary object or from an iterable of Symbol/value pairs. The update() method adds element(s) to the dictionary if the Symbol is not in the dictionary.If the Symbol is in the dictionary, it updates the Symbol with the new value.

Parameters:
  • other (PyObject)
values()

Returns a view object that displays a list of all the values in the dictionary.

Return type:

PyList

property Count

Gets the number of elements contained in the ICollection.

Returns:

Gets the number of elements contained in the ICollection.

Return type:

Int32

property IsReadOnly

Gets a value indicating whether the ICollection is read-only.

Returns:

Gets a value indicating whether the ICollection is read-only.

Return type:

bool

property Keys

Gets an ICollection containing the keys of the IDictionary.

Returns:

Gets an ICollection containing the keys of the IDictionary.

Return type:

ICollection<Symbol>

property Time

Gets or sets the time associated with this collection of data

Returns:

Gets or sets the time associated with this collection of data

Return type:

DateTime

property Values

Gets an ICollection containing the values in the IDictionary.

Returns:

Gets an ICollection containing the values in the IDictionary.

Return type:

ICollection<SymbolChangedEvent>

property [QuantConnect.Symbol]

Gets or sets the SymbolChangedEvent with the specified Symbol.

Returns:

Gets or sets the SymbolChangedEvent with the specified Symbol.

Return type:

SymbolChangedEvent

property [System.String]

Gets or sets the SymbolChangedEvent with the specified ticker.

Returns:

Gets or sets the SymbolChangedEvent with the specified ticker.

Return type:

SymbolChangedEvent

SymbolProperties

class QuantConnect.Securities.SymbolProperties[source]

Represents common properties for a specific security, uniquely identified by market, symbol and security type

property contract_multiplier

The contract multiplier for the security

Returns:

The contract multiplier for the security

Return type:

float

property description

The description of the security

Returns:

The description of the security

Return type:

str

property lot_size

The lot size (lot size of the order) for the security

Returns:

The lot size (lot size of the order) for the security

Return type:

float

property market_ticker

The market ticker

Returns:

The market ticker

Return type:

str

property minimum_order_size

The minimum order size allowed For crypto/forex pairs it's expected to be expressed in base or quote currency i.e For BTC/USD the minimum order size allowed with Coinbase is 0.0001 BTC while on Binance the minimum order size allowed is 10 USD

Returns:

The minimum order size allowed For crypto/forex pairs it's expected to be expressed in base or quote currency i.e For BTC/USD the minimum order size allowed with Coinbase is 0.0001 BTC while on Binance the minimum order size allowed is 10 USD

Return type:

float

property minimum_price_variation

The minimum price variation (tick size) for the security

Returns:

The minimum price variation (tick size) for the security

Return type:

float

property price_magnifier

Allows normalizing live asset prices to US Dollars for Lean consumption. In some exchanges, for some securities, data is expressed in cents like for example for corn futures ('ZC').

Returns:

Allows normalizing live asset prices to US Dollars for Lean consumption. In some exchanges, for some securities, data is expressed in cents like for example for corn futures ('ZC').

Return type:

float

property quote_currency

The quote currency of the security

Returns:

The quote currency of the security

Return type:

str

property strike_multiplier

Scale factor for option's strike price. For some options, such as NQX, the strike price is based on a fraction of the underlying, thus this paramater scales the strike price so that it can be used in comparation with the underlying such as in Int32)

Returns:

Scale factor for option's strike price. For some options, such as NQX, the strike price is based on a fraction of the underlying, thus this paramater scales the strike price so that it can be used in comparation with the underlying such as in Int32)

Return type:

float

SymbolProperties

class QuantConnect.Securities.SymbolProperties[source]

Represents common properties for a specific security, uniquely identified by market, symbol and security type

property ContractMultiplier

The contract multiplier for the security

Returns:

The contract multiplier for the security

Return type:

decimal

property Description

The description of the security

Returns:

The description of the security

Return type:

string

property LotSize

The lot size (lot size of the order) for the security

Returns:

The lot size (lot size of the order) for the security

Return type:

decimal

property MarketTicker

The market ticker

Returns:

The market ticker

Return type:

string

property MinimumOrderSize

The minimum order size allowed For crypto/forex pairs it's expected to be expressed in base or quote currency i.e For BTC/USD the minimum order size allowed with Coinbase is 0.0001 BTC while on Binance the minimum order size allowed is 10 USD

Returns:

The minimum order size allowed For crypto/forex pairs it's expected to be expressed in base or quote currency i.e For BTC/USD the minimum order size allowed with Coinbase is 0.0001 BTC while on Binance the minimum order size allowed is 10 USD

Return type:

decimal

property MinimumPriceVariation

The minimum price variation (tick size) for the security

Returns:

The minimum price variation (tick size) for the security

Return type:

decimal

property PriceMagnifier

Allows normalizing live asset prices to US Dollars for Lean consumption. In some exchanges, for some securities, data is expressed in cents like for example for corn futures ('ZC').

Returns:

Allows normalizing live asset prices to US Dollars for Lean consumption. In some exchanges, for some securities, data is expressed in cents like for example for corn futures ('ZC').

Return type:

decimal

property QuoteCurrency

The quote currency of the security

Returns:

The quote currency of the security

Return type:

string

property StrikeMultiplier

Scale factor for option's strike price. For some options, such as NQX, the strike price is based on a fraction of the underlying, thus this paramater scales the strike price so that it can be used in comparation with the underlying such as in Int32)

Returns:

Scale factor for option's strike price. For some options, such as NQX, the strike price is based on a fraction of the underlying, thus this paramater scales the strike price so that it can be used in comparation with the underlying such as in Int32)

Return type:

decimal

Takuri

class QuantConnect.Indicators.CandlestickPatterns.Takuri[source]

Takuri (Dragonfly Doji with very long lower shadow) candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Takuri

class QuantConnect.Indicators.CandlestickPatterns.Takuri[source]

Takuri (Dragonfly Doji with very long lower shadow) candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

TasukiGap

class QuantConnect.Indicators.CandlestickPatterns.TasukiGap[source]

Tasuki Gap candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

TasukiGap

class QuantConnect.Indicators.CandlestickPatterns.TasukiGap[source]

Tasuki Gap candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ThreeBlackCrows

class QuantConnect.Indicators.CandlestickPatterns.ThreeBlackCrows[source]

Three Black Crows candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ThreeBlackCrows

class QuantConnect.Indicators.CandlestickPatterns.ThreeBlackCrows[source]

Three Black Crows candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ThreeInside

class QuantConnect.Indicators.CandlestickPatterns.ThreeInside[source]

Three Inside Up/Down candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ThreeInside

class QuantConnect.Indicators.CandlestickPatterns.ThreeInside[source]

Three Inside Up/Down candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ThreeLineStrike

class QuantConnect.Indicators.CandlestickPatterns.ThreeLineStrike[source]

Three Line Strike candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ThreeLineStrike

class QuantConnect.Indicators.CandlestickPatterns.ThreeLineStrike[source]

Three Line Strike candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ThreeOutside

class QuantConnect.Indicators.CandlestickPatterns.ThreeOutside[source]

Three Outside Up/Down candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ThreeOutside

class QuantConnect.Indicators.CandlestickPatterns.ThreeOutside[source]

Three Outside Up/Down candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ThreeStarsInSouth

class QuantConnect.Indicators.CandlestickPatterns.ThreeStarsInSouth[source]

Three Stars In The South candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ThreeStarsInSouth

class QuantConnect.Indicators.CandlestickPatterns.ThreeStarsInSouth[source]

Three Stars In The South candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ThreeWhiteSoldiers

class QuantConnect.Indicators.CandlestickPatterns.ThreeWhiteSoldiers[source]

Three Advancing White Soldiers candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ThreeWhiteSoldiers

class QuantConnect.Indicators.CandlestickPatterns.ThreeWhiteSoldiers[source]

Three Advancing White Soldiers candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Thrusting

class QuantConnect.Indicators.CandlestickPatterns.Thrusting[source]

Thrusting candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Thrusting

class QuantConnect.Indicators.CandlestickPatterns.Thrusting[source]

Thrusting candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

TradeBar

class QuantConnect.Data.Market.TradeBar[source]

TradeBar class for second and minute resolution data: An OHLC implementation of the QuantConnect BaseData class with parameters for candles.

clone(fill_forward)

Return a new instance clone of this object, used in fill forward

Parameters:
  • fill_forward (bool)
Return type:

BaseData

data_time_zone()

Specifies the data time zone for this data type. This is useful for custom data types

Return type:

datetimeZone

default_resolution()

Gets the default resolution for this data and security type

Return type:

Resolution

get_source(config, date, is_live_mode)

Get Source for Custom Data File >> What source file location would you prefer for each type of usage:

Parameters:
Return type:

SubscriptionDataSource

is_sparse_data()

Indicates that the data set is expected to be sparse

Return type:

bool

reader(config, line, date, is_live_mode)

TradeBar Reader: Fetch the data from the QC storage and feed it line by line into the engine.

Parameters:
Return type:

BaseData

reader(config, stream, date, is_live_mode)

TradeBar Reader: Fetch the data from the QC storage and feed it line by line into the engine.

Parameters:
Return type:

BaseData

requires_mapping()

Indicates if there is support for mapping

Return type:

bool

should_cache_to_security()

Indicates whether this contains data that should be stored in the security cache

Return type:

bool

supported_resolutions()

Gets the supported resolution for this data and security type

Return type:

List[Resolution]

update(last_trade, bid_price, ask_price, volume, bid_size, ask_size)

Update the tradebar - build the bar from this pricing information:

Parameters:
  • last_trade (float)
  • bid_price (float)
  • ask_price (float)
  • volume (float)
  • bid_size (float)
  • ask_size (float)
update_ask(ask_price, ask_size)

Updates this base data with the new quote ask information

Parameters:
  • ask_price (float)
  • ask_size (float)
update_bid(bid_price, bid_size)

Updates this base data with the new quote bid information

Parameters:
  • bid_price (float)
  • bid_size (float)
update_quote(bid_price, bid_size, ask_price, ask_size)

Updates this base data with new quote information

Parameters:
  • bid_price (float)
  • bid_size (float)
  • ask_price (float)
  • ask_size (float)
update_trade(last_trade, trade_size)

Updates this base data with a new trade

Parameters:
  • last_trade (float)
  • trade_size (float)
property close

Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.

Returns:

Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.

Return type:

float

property data_type

Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

Returns:

Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

Return type:

MarketDataType

property end_time

The closing time of this bar, computed via the Time and Period

Returns:

The closing time of this bar, computed via the Time and Period

Return type:

datetime

property high

High price of the TradeBar during the time period.

Returns:

High price of the TradeBar during the time period.

Return type:

float

property is_fill_forward

True if this is a fill forward piece of data

Returns:

True if this is a fill forward piece of data

Return type:

bool

property low

Low price of the TradeBar during the time period.

Returns:

Low price of the TradeBar during the time period.

Return type:

float

property open

Opening price of the bar: Defined as the price at the start of the time period.

Returns:

Opening price of the bar: Defined as the price at the start of the time period.

Return type:

float

property period

The period of this trade bar, (second, minute, daily, ect...)

Returns:

The period of this trade bar, (second, minute, daily, ect...)

Return type:

timedelta

property price

As this is a backtesting platform we'll provide an alias of value as price.

Returns:

As this is a backtesting platform we'll provide an alias of value as price.

Return type:

float

property symbol

Symbol representation for underlying Security

Returns:

Symbol representation for underlying Security

Return type:

Symbol

property time

Current time marker of this data packet.

Returns:

Current time marker of this data packet.

Return type:

datetime

property value

Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.

Returns:

Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.

Return type:

float

property volume

Volume:

Returns:

Volume:

Return type:

float

TradeBar

class QuantConnect.Data.Market.TradeBar[source]

TradeBar class for second and minute resolution data: An OHLC implementation of the QuantConnect BaseData class with parameters for candles.

Clone(fillForward)

Return a new instance clone of this object, used in fill forward

Parameters:
  • fillForward (bool)
Return type:

BaseData

DataTimeZone()

Specifies the data time zone for this data type. This is useful for custom data types

Return type:

DateTimeZone

DefaultResolution()

Gets the default resolution for this data and security type

Return type:

Resolution

GetSource(config, date, isLiveMode)

Get Source for Custom Data File >> What source file location would you prefer for each type of usage:

Parameters:
Return type:

SubscriptionDataSource

IsSparseData()

Indicates that the data set is expected to be sparse

Return type:

Boolean

Reader(config, line, date, isLiveMode)

TradeBar Reader: Fetch the data from the QC storage and feed it line by line into the engine.

Parameters:
Return type:

BaseData

Reader(config, stream, date, isLiveMode)

TradeBar Reader: Fetch the data from the QC storage and feed it line by line into the engine.

Parameters:
Return type:

BaseData

RequiresMapping()

Indicates if there is support for mapping

Return type:

Boolean

ShouldCacheToSecurity()

Indicates whether this contains data that should be stored in the security cache

Return type:

Boolean

SupportedResolutions()

Gets the supported resolution for this data and security type

Return type:

List[Resolution]

Update(lastTrade, bidPrice, askPrice, volume, bidSize, askSize)

Update the tradebar - build the bar from this pricing information:

Parameters:
  • lastTrade (decimal)
  • bidPrice (decimal)
  • askPrice (decimal)
  • volume (decimal)
  • bidSize (decimal)
  • askSize (decimal)
UpdateAsk(askPrice, askSize)

Updates this base data with the new quote ask information

Parameters:
  • askPrice (decimal)
  • askSize (decimal)
UpdateBid(bidPrice, bidSize)

Updates this base data with the new quote bid information

Parameters:
  • bidPrice (decimal)
  • bidSize (decimal)
UpdateQuote(bidPrice, bidSize, askPrice, askSize)

Updates this base data with new quote information

Parameters:
  • bidPrice (decimal)
  • bidSize (decimal)
  • askPrice (decimal)
  • askSize (decimal)
UpdateTrade(lastTrade, tradeSize)

Updates this base data with a new trade

Parameters:
  • lastTrade (decimal)
  • tradeSize (decimal)
property Close

Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.

Returns:

Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.

Return type:

decimal

property DataType

Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

Returns:

Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.

Return type:

MarketDataType

property EndTime

The closing time of this bar, computed via the Time and Period

Returns:

The closing time of this bar, computed via the Time and Period

Return type:

DateTime

property High

High price of the TradeBar during the time period.

Returns:

High price of the TradeBar during the time period.

Return type:

decimal

property IsFillForward

True if this is a fill forward piece of data

Returns:

True if this is a fill forward piece of data

Return type:

bool

property Low

Low price of the TradeBar during the time period.

Returns:

Low price of the TradeBar during the time period.

Return type:

decimal

property Open

Opening price of the bar: Defined as the price at the start of the time period.

Returns:

Opening price of the bar: Defined as the price at the start of the time period.

Return type:

decimal

property Period

The period of this trade bar, (second, minute, daily, ect...)

Returns:

The period of this trade bar, (second, minute, daily, ect...)

Return type:

TimeSpan

property Price

As this is a backtesting platform we'll provide an alias of value as price.

Returns:

As this is a backtesting platform we'll provide an alias of value as price.

Return type:

decimal

property Symbol

Symbol representation for underlying Security

Returns:

Symbol representation for underlying Security

Return type:

Symbol

property Time

Current time marker of this data packet.

Returns:

Current time marker of this data packet.

Return type:

DateTime

property Value

Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.

Returns:

Value representation of this data packet. All data requires a representative value for this moment in time. For streams of data this is the price now, for OHLC packets this is the closing price.

Return type:

decimal

property Volume

Volume:

Returns:

Volume:

Return type:

decimal

Tristar

class QuantConnect.Indicators.CandlestickPatterns.Tristar[source]

Tristar candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

Tristar

class QuantConnect.Indicators.CandlestickPatterns.Tristar[source]

Tristar candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

TwoCrows

class QuantConnect.Indicators.CandlestickPatterns.TwoCrows[source]

Two Crows candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

TwoCrows

class QuantConnect.Indicators.CandlestickPatterns.TwoCrows[source]

Two Crows candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

UniqueThreeRiver

class QuantConnect.Indicators.CandlestickPatterns.UniqueThreeRiver[source]

Unique Three River candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

UniqueThreeRiver

class QuantConnect.Indicators.CandlestickPatterns.UniqueThreeRiver[source]

Unique Three River candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Universe

class QuantConnect.Data.UniverseSelection.Universe[source]

Provides a base class for all universes to derive from.

can_remove_member(utc_time, security)

Determines whether or not the specified security can be removed from this universe. This is useful to prevent securities from being taken out of a universe before the algorithm has had enough time to make decisions on the security

Parameters:
  • utc_time (datetime)
  • security (Security)
Return type:

bool

contains_member(symbol)

Determines whether or not the specified symbol is currently a member of this universe

Parameters:
Return type:

bool

dispose()

Marks this universe as disposed and ready to remove all child subscriptions

get_subscription_requests(security, current_time_utc, maximum_end_time_utc, subscription_service)

Gets the subscription requests to be added for the specified security

Parameters:
  • security (Security)
  • current_time_utc (datetime)
  • maximum_end_time_utc (datetime)
  • subscription_service (ISubscriptionDataConfigService)
Return type:

List[SubscriptionRequest]

perform_selection(utc_time, data)

Performs universe selection using the data specified

Parameters:
Return type:

List[Symbol]

select_symbols(utc_time, data)

Performs universe selection using the data specified

Parameters:
Return type:

List[Symbol]

property asynchronous

True if this universe filter can run async in the data stack

Returns:

True if this universe filter can run async in the data stack

Return type:

bool

property configuration

Gets the configuration used to get universe data

Returns:

Gets the configuration used to get universe data

Return type:

SubscriptionDataConfig

property data_type

Gets the data type of this universe

Returns:

Gets the data type of this universe

Return type:

Type

property dispose_requested

Flag indicating if disposal of this universe has been requested

Returns:

Flag indicating if disposal of this universe has been requested

Return type:

bool

property market

Gets the market of this universe

Returns:

Gets the market of this universe

Return type:

str

property members

Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.

Returns:

Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.

Return type:

Dict[Symbol, Security]

property securities

Gets the internal security collection used to define membership in this universe

Returns:

Gets the internal security collection used to define membership in this universe

Return type:

Dict[Symbol, Member]

property security_type

Gets the security type of this universe

Returns:

Gets the security type of this universe

Return type:

SecurityType

property selected

The currently selected symbol set

Returns:

The currently selected symbol set

Return type:

HashSet[Symbol]

property symbol

Gets the symbol of this universe

Returns:

Gets the symbol of this universe

Return type:

Symbol

property universe_settings

Gets the settings used for subscriptions added for this universe

Returns:

Gets the settings used for subscriptions added for this universe

Return type:

UniverseSettings

field UNCHANGED

Gets a value indicating that no change to the universe should be made

Returns:

Gets a value indicating that no change to the universe should be made

Return type:

UnchangedUniverse

Universe

class QuantConnect.Data.UniverseSelection.Universe[source]

Provides a base class for all universes to derive from.

CanRemoveMember(utcTime, security)

Determines whether or not the specified security can be removed from this universe. This is useful to prevent securities from being taken out of a universe before the algorithm has had enough time to make decisions on the security

Parameters:
  • utcTime (DateTime)
  • security (Security)
Return type:

Boolean

ContainsMember(symbol)

Determines whether or not the specified symbol is currently a member of this universe

Parameters:
Return type:

Boolean

Dispose()

Marks this universe as disposed and ready to remove all child subscriptions

GetSubscriptionRequests(security, currentTimeUtc, maximumEndTimeUtc, subscriptionService)

Gets the subscription requests to be added for the specified security

Parameters:
  • security (Security)
  • currentTimeUtc (DateTime)
  • maximumEndTimeUtc (DateTime)
  • subscriptionService (ISubscriptionDataConfigService)
Return type:

IEnumerable[SubscriptionRequest]

PerformSelection(utcTime, data)

Performs universe selection using the data specified

Parameters:
Return type:

IEnumerable[Symbol]

SelectSymbols(utcTime, data)

Performs universe selection using the data specified

Parameters:
Return type:

IEnumerable[Symbol]

property Asynchronous

True if this universe filter can run async in the data stack

Returns:

True if this universe filter can run async in the data stack

Return type:

bool

property Configuration

Gets the configuration used to get universe data

Returns:

Gets the configuration used to get universe data

Return type:

SubscriptionDataConfig

property DataType

Gets the data type of this universe

Returns:

Gets the data type of this universe

Return type:

Type

property DisposeRequested

Flag indicating if disposal of this universe has been requested

Returns:

Flag indicating if disposal of this universe has been requested

Return type:

bool

property Market

Gets the market of this universe

Returns:

Gets the market of this universe

Return type:

string

property Members

Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.

Returns:

Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.

Return type:

Dictionary<Symbol, Security>

property Securities

Gets the internal security collection used to define membership in this universe

Returns:

Gets the internal security collection used to define membership in this universe

Return type:

ConcurrentDictionary<Symbol, Member>

property SecurityType

Gets the security type of this universe

Returns:

Gets the security type of this universe

Return type:

SecurityType

property Selected

The currently selected symbol set

Returns:

The currently selected symbol set

Return type:

HashSet<Symbol>

property Symbol

Gets the symbol of this universe

Returns:

Gets the symbol of this universe

Return type:

Symbol

property UniverseSettings

Gets the settings used for subscriptions added for this universe

Returns:

Gets the settings used for subscriptions added for this universe

Return type:

UniverseSettings

field Unchanged

Gets a value indicating that no change to the universe should be made

Returns:

Gets a value indicating that no change to the universe should be made

Return type:

UnchangedUniverse

UniverseSettings

class QuantConnect.Data.UniverseSelection.UniverseSettings[source]

Defines settings required when adding a subscription

field asynchronous

True if universe selection can run asynchronous

Returns:

True if universe selection can run asynchronous

Return type:

bool

field contract_depth_offset

The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contra

Returns:

The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contra

Return type:

int

field data_mapping_mode

Defines how universe data is mapped together

Returns:

Defines how universe data is mapped together

Return type:

DataMappingMode

field data_normalization_mode

Defines how universe data is normalized before being send into the algorithm

Returns:

Defines how universe data is normalized before being send into the algorithm

Return type:

DataNormalizationMode

field extended_market_hours

True to allow extended market hours data, false otherwise

Returns:

True to allow extended market hours data, false otherwise

Return type:

bool

field fill_forward

True to fill data forward, false otherwise

Returns:

True to fill data forward, false otherwise

Return type:

bool

field leverage

The leverage to be used

Returns:

The leverage to be used

Return type:

float

field minimum_time_in_universe

Defines the minimum amount of time a security must be in the universe before being removed.

Returns:

Defines the minimum amount of time a security must be in the universe before being removed.

Return type:

timedelta

field resolution

The resolution to be used

Returns:

The resolution to be used

Return type:

Resolution

field schedule

If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule

Returns:

If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule

Return type:

Schedule

field subscription_data_types

Allows a universe to specify which data types to add for a selected symbol

Returns:

Allows a universe to specify which data types to add for a selected symbol

Return type:

List[Tuple[Type, TickType]]

UniverseSettings

class QuantConnect.Data.UniverseSelection.UniverseSettings[source]

Defines settings required when adding a subscription

field Asynchronous

True if universe selection can run asynchronous

Returns:

True if universe selection can run asynchronous

Return type:

Boolean

field ContractDepthOffset

The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contra

Returns:

The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contra

Return type:

Int32

field DataMappingMode

Defines how universe data is mapped together

Returns:

Defines how universe data is mapped together

Return type:

DataMappingMode

field DataNormalizationMode

Defines how universe data is normalized before being send into the algorithm

Returns:

Defines how universe data is normalized before being send into the algorithm

Return type:

DataNormalizationMode

field ExtendedMarketHours

True to allow extended market hours data, false otherwise

Returns:

True to allow extended market hours data, false otherwise

Return type:

bool

field FillForward

True to fill data forward, false otherwise

Returns:

True to fill data forward, false otherwise

Return type:

bool

field Leverage

The leverage to be used

Returns:

The leverage to be used

Return type:

decimal

field MinimumTimeInUniverse

Defines the minimum amount of time a security must be in the universe before being removed.

Returns:

Defines the minimum amount of time a security must be in the universe before being removed.

Return type:

TimeSpan

field Resolution

The resolution to be used

Returns:

The resolution to be used

Return type:

Resolution

field Schedule

If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule

Returns:

If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule

Return type:

Schedule

field SubscriptionDataTypes

Allows a universe to specify which data types to add for a selected symbol

Returns:

Allows a universe to specify which data types to add for a selected symbol

Return type:

List<Tuple<Type, TickType>>

UpDownGapThreeMethods

class QuantConnect.Indicators.CandlestickPatterns.UpDownGapThreeMethods[source]

Up/Down Gap Three Methods candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

UpDownGapThreeMethods

class QuantConnect.Indicators.CandlestickPatterns.UpDownGapThreeMethods[source]

Up/Down Gap Three Methods candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

UpsideGapTwoCrows

class QuantConnect.Indicators.CandlestickPatterns.UpsideGapTwoCrows[source]

Upside Gap Two Crows candlestick pattern

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

UpsideGapTwoCrows

class QuantConnect.Indicators.CandlestickPatterns.UpsideGapTwoCrows[source]

Upside Gap Two Crows candlestick pattern

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

DoubleExponentialMovingAverage

class QuantConnect.Indicators.DoubleExponentialMovingAverage[source]

This indicator computes the Double Exponential Moving Average (DEMA). The Double Exponential Moving Average is calculated with the following formula: EMA2 = EMA(EMA(t,period),period) DEMA = 2 * EMA(t,period) - EMA2 The Generalized DEMA (GD) is calculated with the following formula: GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, for the indicator to be ready and fully initialized.

Returns:

Required period, in data points, for the indicator to be ready and fully initialized.

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

DoubleExponentialMovingAverage

class QuantConnect.Indicators.DoubleExponentialMovingAverage[source]

This indicator computes the Double Exponential Moving Average (DEMA). The Double Exponential Moving Average is calculated with the following formula: EMA2 = EMA(EMA(t,period),period) DEMA = 2 * EMA(t,period) - EMA2 The Generalized DEMA (GD) is calculated with the following formula: GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, for the indicator to be ready and fully initialized.

Returns:

Required period, in data points, for the indicator to be ready and fully initialized.

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

LongLeggedDoji

class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji[source]

Long Legged Doji candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

LongLeggedDoji

class QuantConnect.Indicators.CandlestickPatterns.LongLeggedDoji[source]

Long Legged Doji candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

ShortLineCandle

class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle[source]

Short Line Candle candlestick pattern indicator

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property is_ready

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

int

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property warm_up_period

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

ShortLineCandle

class QuantConnect.Indicators.CandlestickPatterns.ShortLineCandle[source]

Short Line Candle candlestick pattern indicator

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Returns:

Gets a flag indicating when this indicator is ready and fully initialized

Return type:

bool

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Period

Gets the period of this window indicator

Returns:

Gets the period of this window indicator

Return type:

Int32

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property WarmUpPeriod

Required period, in data points, to the indicator to be ready and fully initialized

Returns:

Required period, in data points, to the indicator to be ready and fully initialized

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: