Writing Algorithms
API Reference
Adding Data
Adding Data
add_cfd(ticker, resolution=None, market=None, fill_forward=True, leverage=0.0)
[source]add_crypto(ticker, resolution=None, market=None, fill_forward=True, leverage=0.0)
[source]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
- ticker (str) — The currency pair
- resolution (Resolution, optional)
- market (str, optional)
- fill_forward (bool, optional)
- leverage (float, optional)
The new CryptoFuture security
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)
- 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
The new 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)
- 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
The new 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)
- 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
The new 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)
- 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
The new 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)
- 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
The new 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
- 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
The new Equity security
add_forex(ticker, resolution=None, market=None, fill_forward=True, leverage=0.0)
[source]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
- 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
The new Future security
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
- 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
The new Future security
add_future_option(symbol, option_filter=None)
[source]Creates and adds a new Future Option contract to the algorithm.
- symbol (Symbol) — )
- option_filter (Callable[OptionFilterUniverse, OptionFilterUniverse], optional) — Filter to apply to option contracts loaded as part of the universe
add_future_option(future_symbol, option_filter)
[source]Creates and adds a new Future Option contract to the algorithm.
- future_symbol (Symbol) — )
- option_filter (PyObject) — 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.
- 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
Option security
add_index(ticker, resolution=None, market=None, fill_forward=True)
[source]add_index_option(underlying, target_option, resolution=None, market=None, fill_forward=True)
[source]Creates and adds index options to the algorithm.
- underlying (str) — The underlying ticker of the Index Option
- 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
- market (str, optional)
- fill_forward (bool, optional) — If true, this will fill in missing data points with the previous data point
Canonical Option security
add_index_option(symbol, target_option, resolution=None, fill_forward=True)
[source]Creates and adds index options to the algorithm.
- 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
Canonical Option security
add_index_option_contract(symbol, resolution=None, fill_forward=True)
[source]Adds an index option contract to the algorithm.
- 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
Index Option Contract
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
- 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
The new option security instance
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
- 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
The new Option security
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.
- 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)
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.
- 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
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.
- 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
The requested resource as a string
str
get_last_known_prices(security)
[source]Yields data to warmup a security for all it's subscribed data types
- security (Security) — object for which to retrieve historical data
Securities historical data
List[BaseData]
get_last_known_prices(symbol)
[source]Yields data to warmup a security for all it's subscribed data types
- symbol (Symbol) — The symbol we want to get seed data for
Securities historical data
List[BaseData]
on_securities_changed(changes)
[source]Event fired each time the we add/remove securities from the data feed
- changes (SecurityChanges)
option_chain(symbol, flatten=False)
[source]Get the option chain for the specified symbol at the current time (Time)
- symbol (Symbol) — The symbol for which the option chain is asked for. It can be either the canonical option or the underlying symbol.
- flatten (bool, optional) —
The option chain
option_chains(symbols, flatten=False)
[source]Get the option chains for the specified symbols at the current time (Time)
- symbols (List[Symbol] | PyObject) — The symbols for which the option chain is asked for. It can be either the canonical options or the underlying symbols.
- flatten (bool, optional) —
The option chains
remove_option_contract(symbol)
[source]Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings
- symbol (Symbol) — The symbol of the security to be removed
bool
remove_security(symbol)
[source]Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings
- symbol (Symbol) — The symbol of the security to be removed
bool
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
- future_chain_provider (IFutureChainProvider)
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
- option_chain_provider (IOptionChainProvider)
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.
- security_initializer (ISecurityInitializer | Action[Security] | PyObject)
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
- ticker (str) — The ticker symbol. This should be the ticker symbol as it was added to the algorithm
The symbol object mapped to the specified ticker
ticker(symbol)
[source]For the given symbol will resolve the ticker it used at the current algorithm date
- symbol (Symbol) — The symbol to get the ticker for
The mapped ticker for a symbol
str
Gets the future chain provider, used to get the list of future contracts for an underlying symbol
Gets the future chain provider, used to get the list of future contracts for an underlying symbol
IFutureChainProvider
Gets an instance that is to be used to initialize newly created securities.
Gets an instance that is to be used to initialize newly created securities.
ISecurityInitializer
Algorithm Framework
Algorithm Framework
add_alpha(alpha)
[source]Adds a new alpha model
- alpha (IAlphaModel | PyObject) — Model that generates alpha to add
add_risk_management(risk_management)
[source]Adds a new risk management model
- risk_management (IRiskManagementModel | PyObject) — Model defining how risk is managed to add
add_universe_selection(universe_selection)
[source]Adds a new universe selection model
- universe_selection (IUniverseSelectionModel | PyObject) — 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.
- 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.
- 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
get_locked()
[source]Gets whether or not this algorithm has been locked and fully initialized
bool
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
- slice (Slice) — The current data slice
on_framework_securities_changed(changes)
[source]Used to send security changes to algorithm framework models
- 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
set_alpha(alpha)
[source]Sets the alpha model
- alpha (IAlphaModel | PyObject) — Model that generates alpha
set_execution(execution)
[source]Sets the execution model
- execution (IExecutionModel | PyObject) — 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
set_portfolio_construction(portfolio_construction)
[source]Sets the portfolio construction model
- portfolio_construction (IPortfolioConstructionModel | PyObject) — Model defining how to build a portfolio from insights
set_risk_management(risk_management)
[source]Sets the risk management model
- risk_management (IRiskManagementModel | PyObject) — Model defining how risk is managed
set_universe_selection(universe_selection)
[source]Sets the universe selection model
- universe_selection (IUniverseSelectionModel | PyObject) — Model defining universes for the algorithm
Gets or sets the alpha model
Gets or sets the alpha model
IAlphaModel
Gets or sets the execution model
Gets or sets the execution model
IExecutionModel
Gets the insight manager
Gets the insight manager
InsightManager
Gets or sets the portfolio construction model
Gets or sets the portfolio construction model
IPortfolioConstructionModel
Gets or sets the risk management model
Gets or sets the risk management model
IRiskManagementModel
Gets or sets the universe selection model.
Gets or sets the universe selection model.
IUniverseSelectionModel
Charting
Charting
add_chart(chart)
[source]Add a Chart object to algorithm collection
- 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.
- 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 $
get_chart_updates(clear_chart_data=False)
[source]Get the chart updates by fetch the recent points added and return for dynamic Charting.
- clear_chart_data (bool, optional)
List of chart updates since the last request
List[Chart]
plot(chart, series, open, high, low, close)
[source]Plot a chart using string series name, with value.
- chart (str) — Chart name
- series (str) — Series name
- open (float | int) — The candlestick open value
- high (float | int) — The candlestick high value
- low (float | int) — The candlestick low value
- close (float | int) — The candlestick close value
plot(chart, first, second=None, third=None, fourth=None)
[source]Plot a chart using string series name, with value.
- chart (str) — The chart's name
- first (BarIndicator | Indicator | TradeBarIndicator) — The first indicator to plot
- second (BarIndicator | Indicator | TradeBarIndicator, optional) — The second indicator to plot
- third (BarIndicator | Indicator | TradeBarIndicator, optional) — The third indicator to plot
- fourth (BarIndicator | Indicator | TradeBarIndicator, optional) — The fourth indicator to plot
plot(chart, series, value)
[source]Plot a chart using string series name, with value.
- chart (str)
- series (str)
- value (float | int)
plot(chart, series, bar)
[source]Plot a chart using string series name, with value.
- chart (str) — Chart name
- series (str) — Name of the plot series
- bar (TradeBar) — The trade bar to be plotted to the candlestick series
plot(chart, indicators)
[source]Plot a chart using string series name, with value.
- chart (str) — The chart's name
- indicators (IndicatorBase[]) — The indicators to plot
plot(series, py_object)
[source]Plot a chart using string series name, with value.
- series (str) — Name of the plot series
- py_object (PyObject) — PyObject with the value 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
- 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
- chart (str)
- wait_for_ready (bool)
- indicators (IndicatorBase[])
record(series, value)
[source]Plot a chart using string series name, with int value. Alias of Plot();
- series (str)
- value (float | int)
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.
- name (str) — Name of your runtime statistic
- value (float | int | str) — String value of your runtime statistic
Access to the runtime statistics property. User provided statistics.
Access to the runtime statistics property. User provided statistics.
Dict[str, str]
Consolidating Data
Consolidating Data
consolidate(symbol, period, tick_type, handler)
[source]Registers the handler to receive consolidated data for the specified symbol
- symbol (Symbol) — The symbol who's data is to be consolidated
- period (Resolution | timedelta) — 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.
A new consolidator matching the requested parameters with the handler already registered
IDataConsolidator
consolidate(symbol, calendar, tick_type, handler)
[source]Registers the handler to receive consolidated data for the specified symbol
- 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.
A new consolidator matching the requested parameters with the handler already registered
IDataConsolidator
deregister_indicator(indicator)
[source]Will deregister an indicator and it's associated consolidator instance so they stop receiving data updates
- indicator (IndicatorBase) — The indicator instance to deregister
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.
- symbol (Symbol) — The symbol to register against
- indicator (IndicatorBase[IndicatorDataPoint] | PyObject | None) — The indicator to receive data from the consolidator
- resolution (Optional[Resolution] | Optional[timedelta]) — 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) — x.Value)
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.
- symbol (Symbol) — The symbol to register against
- indicator (IndicatorBase[IndicatorDataPoint] | PyObject | None) — The indicator to receive data from the consolidator
- consolidator (IDataConsolidator) — The consolidator to receive raw subscription data
- selector (Callable[IBaseData, float] | PyObject | None, optional) — x.Value)
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.
- 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)
resolve_consolidator(symbol, resolution, data_type=None)
[source]Gets the default consolidator for the specified symbol and resolution
- 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
The new default consolidator
IDataConsolidator
resolve_consolidator(symbol, time_span, data_type=None)
[source]Gets the default consolidator for the specified symbol and resolution
- 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
The new default consolidator
IDataConsolidator
unregister_indicator(indicator)
[source]Will unregister an indicator and it's associated consolidator instance so they stop receiving data updates
- indicator (IndicatorBase) — The indicator instance to unregister
Handling Data
Handling Data
cik(symbol)
[source]cik(cik, trading_date=None)
[source]Converts a CIK identifier into String) array
- 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.
Symbols corresponding to the CIK. If no Symbol with a matching CIK was found, returns empty array.
composite_figi(composite_figi, trading_date=None)
[source]Converts a composite FIGI identifier into a String)
- 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.
Symbol corresponding to the composite FIGI. If no Symbol with a matching composite FIGI was found, returns null.
composite_figi(symbol)
[source]cusip(cusip, trading_date=None)
[source]Converts a CUSIP identifier into a String)
- 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.
Symbol corresponding to the CUSIP. If no Symbol with a matching CUSIP was found, returns null.
cusip(symbol)
[source]fundamentals(symbol)
[source]Get the fundamental data for the requested symbol at the current time
- symbol (Symbol)
The fundamental data for the Symbol
fundamentals(symbols)
[source]Get the fundamental data for the requested symbol at the current time
- symbols (List[Symbol])
The fundamental data for the symbols
List[Fundamental]
isin(isin, trading_date=None)
[source]Converts an ISIN identifier into a String)
- 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.
Symbol corresponding to the ISIN. If no Symbol with a matching ISIN was found, returns null.
isin(symbol)
[source]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
- slice (Slice)
on_delistings(delistings)
[source]on_dividends(dividends)
[source]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.
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).
- symbol (Symbol | str)
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.
on_splits(splits)
[source]on_symbol_changed_events(symbols_changed)
[source]Event handler to be called when there's been a symbol changed event
- symbols_changed (SymbolChangedEvents)
on_warmup_finished()
[source]Called when the algorithm has completed initialization and warm up.
sedol(sedol, trading_date=None)
[source]Converts a SEDOL identifier into a String)
- 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.
Symbol corresponding to the SEDOL. If no Symbol with a matching SEDOL was found, returns null.
sedol(symbol)
[source]set_algorithm_id(algorithm_id)
[source]Set the algorithm id (backtestId or live deployId for the algorithm).
- algorithm_id (str) — String Algorithm Id
set_api(api)
[source]Provide the API for the algorithm.
- api (IApi) — Initiated API
set_available_data_types(available_data_types)
[source]Set the available data feeds in the SecurityManager
- available_data_types (Dict[SecurityType, List[TickType]])
set_current_slice(slice)
[source]set_date_time(frontier)
[source]Update the internal algorithm time frontier.
- frontier (datetime)
set_end_date(year, month, day)
[source]Set the end date for a backtest run
- 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
- end (datetime) — Datetime value for end date
set_object_store(object_store)
[source]Sets the object store
- object_store (IObjectStore) — The object store
set_run_time_error(exception)
[source]Set the runtime error
- exception (Exception) — Represents error that occur during execution
set_start_date(year, month, day)
[source]Set the start date for backtest.
- 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.
- start (datetime) — Datetime Start date for backtest
set_time_zone(time_zone)
[source]Sets the time zone of the Time property in the algorithm
- time_zone (datetimeZone | str)
Algorithm Id for this backtest or live algorithm.
Algorithm Id for this backtest or live algorithm.
str
Returns the current Slice object
Returns the current Slice object
Slice
Value of the user set start-date from the backtest. Controls the period of the backtest.
Value of the user set start-date from the backtest. Controls the period of the backtest.
datetime
Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.
Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.
str
Gets the object store, used for persistence
Gets the object store, used for persistence
ObjectStore
Gets the user settings for the algorithm
Gets the user settings for the algorithm
IAlgorithmSettings
Value of the user set start-date from the backtest.
Value of the user set start-date from the backtest.
datetime
Gets or sets the current status of the algorithm
Gets or sets the current status of the algorithm
AlgorithmStatus
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.
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.
SubscriptionManager
A list of tags associated with the algorithm or the backtest, useful for categorization
A list of tags associated with the algorithm or the backtest, useful for categorization
HashSet[str]
Read-only value for current time frontier of the algorithm in terms of the TimeZone
Read-only value for current time frontier of the algorithm in terms of the TimeZone
datetime
Gets the time zone used for the Time property. The default value is NewYork
Gets the time zone used for the Time property. The default value is NewYork
datetimeZone
Current date/time in UTC.
Current date/time in UTC.
datetime
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.
- 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
An enumerable of slice containing the requested historical data
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.
- 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
An enumerable of slice containing data over the most recent span for all configured securities
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.
- 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
An enumerable of slice containing the requested historical data
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.
- 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.
- 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.
- 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.
- 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
An enumerable of slice containing the requested historical data
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.
- 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
An enumerable of slice containing the requested historical data
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.
- 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
An enumerable of slice containing the requested historical data
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.
- request (HistoryRequest) — the history request to execute
An enumerable of slice satisfying the specified history request
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.
- requests (List[HistoryRequest]) — the history requests to execute
An enumerable of slice satisfying the specified history request
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.
- 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, 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.
- 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, 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.
- 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, 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.
- 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
An enumerable of slice containing the requested historical data
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.
- 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
An enumerable of slice containing the requested historical data
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.
- 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
An enumerable of slice containing the requested historical data
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, flatten=False)
[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.
- 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
- flatten (bool, optional) — Whether to flatten the resulting data frame. e.g. for universe requests, the each row represents a day of data, and the data is stored in a list in a cell of the data frame. If flatten is true, the resulting data frame will contain one row per universe constituent, and each property of the constituent will be a column in the data frame.
pandas.DataFrame containing the requested historical data
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, flatten=False)
[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.
- 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
- flatten (bool, optional) — Whether to flatten the resulting data frame. e.g. for universe requests, the each row represents a day of data, and the data is stored in a list in a cell of the data frame. If flatten is true, the resulting data frame will contain one row per universe constituent, and each property of the constituent will be a column in the data frame.
pandas.DataFrame containing the requested historical data
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, flatten=False)
[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.
- 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
- flatten (bool, optional) — Whether to flatten the resulting data frame. e.g. for universe requests, the each row represents a day of data, and the data is stored in a list in a cell of the data frame. If flatten is true, the resulting data frame will contain one row per universe constituent, and each property of the constituent will be a column in the data frame.
pandas.DataFrame containing the requested historical data
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, flatten=False)
[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.
- 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
- flatten (bool, optional) — Whether to flatten the resulting data frame. e.g. for universe requests, the each row represents a day of data, and the data is stored in a list in a cell of the data frame. If flatten is true, the resulting data frame will contain one row per universe constituent, and each property of the constituent will be a column in the data frame.
pandas.DataFrame containing the requested historical data
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, flatten=False)
[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.
- 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
- flatten (bool, optional) — Whether to flatten the resulting data frame. e.g. for universe requests, the each row represents a day of data, and the data is stored in a list in a cell of the data frame. If flatten is true, the resulting data frame will contain one row per universe constituent, and each property of the constituent will be a column in the data frame.
pandas.DataFrame containing the requested historical data
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, flatten=False)
[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.
- 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
- flatten (bool, optional) — Whether to flatten the resulting data frame. e.g. for universe requests, the each row represents a day of data, and the data is stored in a list in a cell of the data frame. If flatten is true, the resulting data frame will contain one row per universe constituent, and each property of the constituent will be a column in the data frame.
pandas.DataFrame containing the requested historical data
PyObject
set_finished_warming_up()
[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
- history_provider (IHistoryProvider) — Historical data provider
set_warm_up(time_span, resolution)
[source]Sets the warm up period to the specified value
- 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
- bar_count (int) — 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
- 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
- bar_count (int) — The number of data points requested for warm up
- resolution (Resolution) — The resolution to request
warm_up_indicator(symbol, indicator, resolution=None, selector=None)
[source]Warms up a given indicator with historical data
- symbol (Symbol | PyObject) — The symbol whose indicator we want
- indicator (IndicatorBase[IndicatorDataPoint] | PyObject | None) — The indicator we want to warm up
- resolution (Resolution, optional) — The resolution
- selector (Callable[IBaseData, float] | PyObject | None, optional) — x.Value)
warm_up_indicator(symbols, indicator, resolution=None, selector=None)
[source]Warms up a given indicator with historical data
- symbols (List[Symbol]) — The symbols whose indicator we want
- indicator (IndicatorBase[IndicatorDataPoint] | None) — The indicator we want to warm up
- resolution (Resolution, optional) — The resolution
- selector (Callable[IBaseData, float] | None, optional) — x.Value)
warm_up_indicator(symbol, indicator, period, selector=None)
[source]Warms up a given indicator with historical data
- symbol (Symbol | PyObject) — The symbol whose indicator we want
- indicator (IndicatorBase[IndicatorDataPoint] | PyObject | None) — The indicator we want to warm up
- period (timedelta) — The necessary period to warm up the indicator
- selector (Callable[IBaseData, float] | PyObject | None, optional) — x.Value)
warm_up_indicator(symbols, indicator, period, selector=None)
[source]Warms up a given indicator with historical data
- symbols (List[Symbol]) — The symbols whose indicator we want
- indicator (IndicatorBase[IndicatorDataPoint] | None) — 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)
Gets whether or not this algorithm is still warming up
Gets whether or not this algorithm is still warming up
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
- 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
The Alpha indicator for the given parameters
abands(symbol, period, width=4.0, moving_average_type=0, resolution=None, selector=None)
[source]Creates a new Acceleration Bands indicator.
- 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.
ad(symbol, resolution=None, selector=None)
[source]Creates a new AccumulationDistribution indicator.
- symbol (Symbol) — The symbol whose AD we want
- resolution (Resolution, optional) — The resolution
- selector (Callable[IBaseData, TradeBar], optional) — x.Value)
The AccumulationDistribution indicator for the requested symbol over the specified period
addiff(symbols, resolution=None, selector=None)
[source]Creates a new Advance/Decline Difference indicator
- 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
The AdvanceDecline Difference indicator for the requested symbol over the specified period
adosc(symbol, fast_period, slow_period, resolution=None, selector=None)
[source]Creates a new AccumulationDistributionOscillator indicator.
- 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)
The AccumulationDistributionOscillator indicator for the requested symbol over the specified period
adr(symbols, resolution=None, selector=None)
[source]Creates a new Advance/Decline Ratio indicator
- 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
The AdvanceDecline Ratio indicator for the requested symbol over the specified period
advr(symbols, resolution=None, selector=None)
[source]Creates a new Advance/Decline Volume Ratio indicator
- 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
The AdvanceDecline Volume Ratio indicator for the requested symbol over the specified period
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.
- 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
The Average Directional Index indicator for the requested symbol.
adxr(symbol, period, resolution=None, selector=None)
[source]Creates a new AverageDirectionalMovementIndexRating indicator.
- 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)
The AverageDirectionalMovementIndexRating indicator for the requested symbol over the specified period
alma(symbol, period, sigma=6, offset=0.85, resolution=None, selector=None)
[source]Creates a new ArnaudLegouxMovingAverage indicator.
- 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)
The ArnaudLegouxMovingAverage indicator for the requested symbol over the specified period
ao(symbol, fast_period, slow_period, type, resolution=None, selector=None)
[source]Creates a new Awesome Oscillator from the specified periods.
- symbol (Symbol) — The symbol whose Awesome Oscillator we seek
- fast_period (int) — The resolution.
- slow_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
apo(symbol, fast_period, slow_period, moving_average_type, resolution=None, selector=None)
[source]Creates a new AbsolutePriceOscillator indicator.
- 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)
The AbsolutePriceOscillator indicator for the requested symbol over the specified period
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.
- 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)
The AugenPriceSpike indicator for the given parameters
ar(symbol, period, resolution=None, selector=None)
[source]Creates a new Average Range (AR) indicator.
- symbol (Symbol) — The symbol whose Average Range we want to calculate
- period (int) — The period over which to compute the Average Range
- resolution (Resolution, optional) — The resolution
- selector (Callable[IBaseData, IBaseDataBar], optional) — x.Value).
The Average Range indicator for the requested symbol over the specified period
arima(symbol, ar_order, diff_order, ma_order, period, resolution=None, selector=None)
[source]Creates a new ARIMA indicator.
- 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)
The ARIMA indicator for the requested symbol over the specified period
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)
- 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
An AroonOscillator configured with the specified periods
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)
- 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
An AroonOscillator configured with the specified periods
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.
- 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
The WilderAccumulativeSwingIndex for the given parameters
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.
- 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
A new AverageTrueRange indicator with the specified smoothing type and period
b(target, reference, period, resolution=None, selector=None)
[source]Broadcast a live command
- 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
The Beta indicator for the given parameters
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
- 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)
A BollingerBands configured with the specified period
bop(symbol, resolution=None, selector=None)
[source]Creates a new Balance Of Power indicator. The indicator will be automatically updated on the given resolution.
- 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
The Balance Of Power indicator for the requested symbol.
c(target, reference, period, correlation_type=0, resolution=None, selector=None)
[source]Converts a composite FIGI identifier into a String)
- 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
The Correlation indicator for the given parameters
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
- 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
The Coppock Curve indicator for the requested symbol over the specified period
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.
- 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
The CommodityChannelIndex indicator for the requested symbol over the specified period
chop(symbol, period, resolution=None, selector=None)
[source]Creates a new ChoppinessIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose CHOP we want
- period (int) — The input window period used to calculate max high and min low
- 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
A new ChoppinessIndex indicator with the window period
cks(symbol, atr_period, atr_mult, period, moving_average_type=2, resolution=None, selector=None)
[source]Creates a new Chande Kroll Stop indicator which will compute the short and lower stop. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose Chande Kroll Stop we seek.
- atr_period (int) — The period over which to compute the average true range.
- atr_mult (float) — The ATR multiplier to be used to compute stops distance.
- period (int) — The period over which to compute the max of high stop and min of low stop.
- moving_average_type (MovingAverageType, optional) — The resolution.
- resolution (Resolution, optional) — The type of smoothing used to smooth the true range values
- 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
The Chande Kroll Stop indicator for the requested symbol.
cmf(symbol, period, resolution=None, selector=None)
[source]Creates a new ChaikinMoneyFlow indicator.
- 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
The ChaikinMoneyFlow indicator for the requested symbol over the specified period
cmo(symbol, period, resolution=None, selector=None)
[source]Creates a new ChandeMomentumOscillator indicator.
- 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)
The ChandeMomentumOscillator indicator for the requested symbol over the specified period
create_indicator_name(symbol, type, resolution)
[source]Creates a new name for an indicator created with the convenience functions (SMA, EMA, ect...)
- symbol (Symbol) — The symbol this indicator is registered to
- type (Formattablestr | str) — The indicator type, for example, 'SMA(5)'
- resolution (Resolution) — The resolution requested
A unique for the given parameters
str
crsi(symbol, rsi_period, rsi_period_streak, look_back_period, resolution=None, selector=None)
[source]Creates a new Connors Relative Strength Index (CRSI) indicator, which combines the traditional Relative Strength Index (RSI), Streak RSI (SRSI), and Percent Rank to provide a more robust measure of market strength. This indicator oscillates based on momentum, streak behavior, and price change over the specified periods.
- symbol (Symbol) — The symbol whose CRSI is to be calculated.
- rsi_period (int) — The period for the traditional RSI calculation.
- rsi_period_streak (int) — The period for the Streak RSI calculation (SRSI).
- look_back_period (int) — The look-back period for calculating the Percent Rank.
- resolution (Resolution, optional) — The resolution of the data (optional).
- selector (Callable[IBaseData, float], optional) — Function to select a value from the BaseData to input into the indicator. Defaults to using the 'Value' property of BaseData if null.
The Connors Relative Strength Index (CRSI) for the specified symbol and periods.
d(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=None, iv_model=None, resolution=None)
[source]Send a debug message to the web console:
- 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
A new Delta indicator for the specified symbol
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.
- 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
The Donchian Channel indicator for the requested symbol.
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.
- 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
The Donchian Channel indicator for the requested symbol.
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.
- 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
The DeMarker indicator for the requested symbol.
dema(symbol, period, resolution=None, selector=None)
[source]Creates a new DoubleExponentialMovingAverage indicator.
- 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)
The DoubleExponentialMovingAverage indicator for the requested symbol over the specified period
do(symbol, rsi_period, smoothing_rsi_period, double_smoothing_rsi_period, signal_line_period, resolution=None, selector=None)
[source]Creates a new DerivativeOscillator indicator.
- 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)
The DerivativeOscillator indicator for the requested symbol over the specified period
dpo(symbol, period, resolution=None, selector=None)
[source]Creates a new DetrendedPriceOscillator indicator.
- 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)
A new registered DetrendedPriceOscillator indicator for the requested symbol over the specified period
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.
- 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)
The ExponentialMovingAverage for the given parameters
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.
- 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
The EaseOfMovementValue indicator for the given parameters
fi(symbol, period, type=1, resolution=None, selector=None)
[source]Creates a new ForceIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose ForceIndex we want
- period (int) — The smoothing period used to smooth the computed ForceIndex values
- type (MovingAverageType, optional) — The type of smoothing 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
A new ForceIndex indicator with the specified smoothing type and period
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
- symbol (Symbol) — The symbol whose values we want as an indicator
- resolution (Resolution | timedelta) — The desired resolution of the data
- selector (Callable[IBaseData, IBaseDataBar] | PyObject, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
- filter (Callable[IBaseData, bool] | PyObject, optional) — true) which means no filter
- field_name (str, optional) — The name of the field being selected
A new FilteredIdentity indicator for the specified symbol and selector
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.
- 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
The FisherTransform for the given parameters
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.
- 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
The FRAMA for the given parameters
g(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=None, 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
- 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
A new Gamma indicator for the specified symbol
he(symbol, period, max_lag=20, resolution=None, selector=None)
[source]Creates a new Hurst Exponent indicator for the specified symbol. The Hurst Exponent measures the long-term memory or self-similarity in a time series. The default maxLag value of 20 is chosen for reliable and accurate results, but using a higher lag may reduce precision.
- symbol (Symbol) — The symbol for which the Hurst Exponent is calculated.
- period (int) — The number of data points used to calculate the indicator at each step.
- max_lag (int, optional) — The maximum time lag used to compute the tau values for the Hurst Exponent calculation.
- resolution (Resolution, optional) — The resolution
- selector (Callable[IBaseData, float], optional) — Function to select a value from the BaseData to input into the indicator. Defaults to using the 'Value' property of BaseData if null.
The Hurst Exponent indicator for the specified symbol.
heikin_ashi(symbol, resolution=None, selector=None)
[source]Creates a new Heikin-Ashi indicator.
- 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
The Heikin-Ashi indicator for the requested symbol over the specified period
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.
- 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)
ht(symbol, length, in_phase_multiplication_factor, quadrature_multiplication_factor, resolution=None, selector=None)
[source]Creates a new Hilbert Transform indicator
- 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)
ibs(symbol, resolution=None, selector=None)
[source]Creates a new InternalBarStrength indicator for the symbol. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose IBS 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
A new InternalBarStrength indicator
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.
- 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
A new IchimokuKinkoHyo indicator with the specified periods and delays
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
- symbol (Symbol) — The symbol whose values we want as an indicator
- resolution (Resolution | timedelta) — The desired resolution of the data
- selector (Callable[IBaseData, float], optional) — x.Value)
- field_name (str, optional) — The name of the field being selected
A new Identity indicator for the specified symbol and selector
iv(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=None, resolution=None)
[source]Creates a new ImpliedVolatility indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
- 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
- resolution (Resolution, optional) — The desired resolution of the data
A new ImpliedVolatility indicator for the specified symbol
kama(symbol, period, fast_ema_period, slow_ema_period, resolution=None, selector=None)
[source]Creates a new KaufmanAdaptiveMovingAverage indicator.
- 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)
The KaufmanAdaptiveMovingAverage indicator for the requested symbol over the specified period
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.
- 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
The Keltner Channel indicator for the requested symbol.
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.
- 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)
The KaufmanEfficiencyRatio indicator for the given parameters
logr(symbol, period, resolution=None, selector=None)
[source]Creates a new LogReturn indicator.
- 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.
log return indicator for the requested symbol.
lsma(symbol, period, resolution=None, selector=None)
[source]Creates and registers a new Least Squares Moving Average instance.
- 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.
A LeastSquaredMovingAverage configured with the specified period
lwma(symbol, period, resolution=None, selector=None)
[source]Creates a new LinearWeightedMovingAverage indicator. This indicator will linearly distribute the weights across the periods.
- 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)
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.
- 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)
The moving average convergence divergence between the fast and slow averages
mad(symbol, period, resolution=None, selector=None)
[source]Creates a new MeanAbsoluteDeviation indicator.
- 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)
The MeanAbsoluteDeviation indicator for the requested symbol over the specified period
mama(symbol, fast_limit=0.5, slow_limit=0.05, resolution=None, selector=None)
[source]Creates a new Mesa Adaptive Moving Average (MAMA) indicator. The MAMA adjusts its smoothing factor based on the market's volatility, making it more adaptive than a simple moving average.
- symbol (Symbol) — The symbol for which the MAMA indicator is being created.
- fast_limit (float, optional) — The fast limit for the adaptive moving average.
- slow_limit (float, optional) — The slow limit for the adaptive moving average.
- resolution (Resolution, optional) — The resolution
- selector (Callable[IBaseData, IBaseDataBar], optional) — Optional function to select a value from the BaseData. Defaults to casting the input to a TradeBar.
The Mesa Adaptive Moving Average (MAMA) indicator for the requested symbol with the specified limits.
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.
- 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
The Mass Index indicator for the requested symbol over the specified period
max(symbol, period, resolution=None, selector=None)
[source]Creates a new Maximum indicator to compute the maximum value
- 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)
A Maximum indicator that compute the max value and the periods since the max value
mfi(symbol, period, resolution=None, selector=None)
[source]Creates a new MoneyFlowIndex indicator. The indicator will be automatically updated on the given resolution.
- 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
The MoneyFlowIndex indicator for the requested symbol over the specified period
mgd(symbol, period, resolution=None, selector=None)
[source]Creates a new McGinley Dynamic indicator
- symbol (Symbol) — The symbol whose McGinley Dynamic indicator value we want
- period (int) — The period of the McGinley Dynamic indicator
- 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
The McGinley Dynamic indicator for the requested symbol over the specified period
midpoint(symbol, period, resolution=None, selector=None)
[source]Creates a new MidPoint indicator.
- 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)
The MidPoint indicator for the requested symbol over the specified period
midprice(symbol, period, resolution=None, selector=None)
[source]Creates a new MidPrice indicator.
- 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
The MidPrice indicator for the requested symbol over the specified period
min(symbol, period, resolution=None, selector=None)
[source]Creates a new Minimum indicator to compute the minimum value
- 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)
A Minimum indicator that compute the in value and the periods since the min value
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.
- 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)
The momentum indicator for the requested symbol over the specified period
momersion(symbol, min_period, full_period, resolution=None, selector=None)
[source]Creates a new Momersion indicator.
- 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)
The Momersion indicator for the requested symbol over the specified period
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.
- 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)
The momentum indicator for the requested symbol over the specified period
mosc(symbols, fast_period=19, slow_period=39, resolution=None, selector=None)
[source]Creates a new McClellan Oscillator indicator
- symbols (Symbol[] | List[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
The McClellan Oscillator indicator for the requested symbol over the specified period
msi(symbols, fast_period=19, slow_period=39, resolution=None, selector=None)
[source]Creates a new McClellan Summation Index indicator
- symbols (Symbol[] | List[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
The McClellan Summation Index indicator for the requested symbol over the specified period
natr(symbol, period, resolution=None, selector=None)
[source]Creates a new NormalizedAverageTrueRange indicator.
- 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
The NormalizedAverageTrueRange indicator for the requested symbol over the specified period
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.
- 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
The On Balance Volume indicator for the requested symbol.
pphl(symbol, length_high, length_low, last_stored_values=100, resolution=None, selector=None)
[source]Creates a new PivotPointsHighLow indicator
- 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
The PivotPointsHighLow indicator for the requested symbol.
ppo(symbol, fast_period, slow_period, moving_average_type, resolution=None, selector=None)
[source]Creates a new PercentagePriceOscillator indicator.
- 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)
The PercentagePriceOscillator indicator for the requested symbol over the specified period
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
- 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
A ParabolicStopAndReverse configured with the specified periods
pso(symbol, period, ema_period, resolution=None, selector=None)
[source]Creates a new instance of the Premier Stochastic Oscillator for the specified symbol.
- symbol (Symbol) — The symbol for which the stochastic indicator is being calculated.
- period (int) — The period for calculating the Stochastic K value.
- ema_period (int) — The period for the Exponential Moving Average (EMA) used to smooth the Stochastic K.
- resolution (Resolution, optional) — The data resolution (e.g., daily, hourly) for the indicator
- selector (Callable[IBaseData, TradeBar], optional) — Optional function to select a value from the BaseData. Defaults to casting the input to a TradeBar.
A PremierStochasticOscillator instance for the specified symbol.
r(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=None, 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
- 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
A new Rho indicator for the specified symbol
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
- 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)
A Regression Channel configured with the specified period and number of standard deviation
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.
- 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
The Relative Volume indicator for the given parameters
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.
- 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)
A relative moving average configured with the specified period and number of standard deviation
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.
- 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)
The RateOfChange indicator for the requested symbol over the specified period
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.
- 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)
The RateOfChangePercent indicator for the requested symbol over the specified period
rocr(symbol, period, resolution=None, selector=None)
[source]Creates a new RateOfChangeRatio indicator.
- 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)
The RateOfChangeRatio indicator for the requested symbol over the specified period
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.
- 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)
The RelativeStrengthIndex indicator for the requested symbol over the specified period
rsv(symbol, period, resolution=None, selector=None)
[source]Creates a new RogersSatchellVolatility indicator for the symbol. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose RogersSatchellVolatility we want
- period (int) — The period of the rolling window used to compute volatility
- 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
A new RogersSatchellVolatility indicator with the specified smoothing type and period
rvi(symbol, period, moving_average_type=0, resolution=None, selector=None)
[source]Creates a new RelativeVigorIndex indicator.
- 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
The RelativeVigorIndex indicator for the requested symbol over the specified period
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.
- 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
The WilderSwingIndex for the given parameters
sm(symbol, bollinger_period=20, bollinger_multiplier=2.0, keltner_period=20, keltner_multiplier=1.5, resolution=None, selector=None)
[source]Creates a Squeeze Momentum indicator to identify market squeezes and potential breakouts. Compares Bollinger Bands and Keltner Channels to signal low or high volatility periods.
- symbol (Symbol) — The symbol for which the indicator is calculated.
- bollinger_period (int, optional) — The period for Bollinger Bands.
- bollinger_multiplier (float, optional) — The multiplier for the Bollinger Bands' standard deviation.
- keltner_period (int, optional) — The period for Keltner Channels.
- keltner_multiplier (float, optional) — The multiplier for the Average True Range in Keltner Channels.
- resolution (Resolution, optional) — The resolution of the data.
- selector (Callable[IBaseData, IBaseDataBar], optional) — x.Value).
The configured Squeeze Momentum indicator.
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.
- 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)
The SimpleMovingAverage for the given parameters
sobv(symbol, period, type=0, resolution=None, selector=None)
[source]Creates a new SmoothedOnBalanceVolume indicator for the symbol. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose SmoothedOnBalanceVolume we want
- period (int) — The smoothing period used to smooth the computed OnBalanceVolume 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
A new SmoothedOnBalanceVolume indicator with the specified smoothing type and period
sortino(symbol, sortino_period, minimum_acceptable_return=0.0, resolution=None, selector=None)
[source]Creates a new Sortino indicator.
- 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)
The SortinoRatio indicator for the requested symbol over the specified period
sr(symbol, sharpe_period, risk_free_rate=None, resolution=None, selector=None)
[source]Creates a new Stochastic RSI indicator which will compute the %K and %D
- 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)
The SharpeRatio indicator for the requested symbol over the specified period
srsi(symbol, rsi_period, stoch_period, k_smoothing_period, d_smoothing_period, moving_average_type=0, resolution=None, selector=None)
[source]Creates a new Stochastic RSI indicator which will compute the %K and %D
- symbol (Symbol) — The symbol whose Stochastic RSI we seek
- rsi_period (int) — The period of the relative strength index
- stoch_period (int) — The period of the stochastic indicator
- k_smoothing_period (int) — The smoothing period of K output
- d_smoothing_period (int) — The smoothing period of D output
- 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)
A StochasticRelativeStrengthIndex configured with the specified periods and moving average type
stc(symbol, cycle_period, fast_period, slow_period, moving_average_type=1, resolution=None, selector=None)
[source]Creates a new Schaff Trend Cycle indicator
- 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)
The SchaffTrendCycle indicator for the requested symbol over the specified period
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.
- 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)
The StandardDeviation indicator for the requested symbol over the specified period
sto(symbol, period, k_period, d_period, resolution=None, selector=None)
[source]Creates a new Stochastic indicator.
- 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
Stochastic indicator for the requested symbol.
str(symbol, period, multiplier, moving_average_type=2, resolution=None, selector=None)
[source]Creates a new SuperTrend indicator.
- 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
sum(symbol, period, resolution=None, selector=None)
[source]Creates a new Sum indicator.
- 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)
The Sum indicator for the requested symbol over the specified period
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.
- 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)
The calculation using the given tool
t(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=None, iv_model=None, resolution=None)
[source]For the given symbol will resolve the ticker it used at the current algorithm date
- 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
A new Theta indicator for the specified symbol
t_3(symbol, period, volume_factor=0.7, resolution=None, selector=None)
[source]Creates a new T3MovingAverage indicator.
- 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)
The T3MovingAverage indicator for the requested symbol over the specified period
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.
- 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)
The TargetDownsideDeviation indicator for the requested symbol over the specified period
tema(symbol, period, resolution=None, selector=None)
[source]Creates a new TripleExponentialMovingAverage indicator.
- 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)
The TripleExponentialMovingAverage indicator for the requested symbol over the specified period
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.
- 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
The Time Profile indicator for the given parameters
tr(symbol, resolution=None, selector=None)
[source]Creates a new TrueRange indicator.
- 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
The TrueRange indicator for the requested symbol.
trima(symbol, period, resolution=None, selector=None)
[source]Creates a new TriangularMovingAverage indicator.
- 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)
The TriangularMovingAverage indicator for the requested symbol over the specified period
trin(symbols, resolution=None, selector=None)
[source]Creates a new Arms Index indicator
- symbols (Symbol[] | List[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
The Arms Index indicator for the requested symbol over the specified period
trix(symbol, period, resolution=None, selector=None)
[source]Creates a new Trix indicator.
- 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)
The Trix indicator for the requested symbol over the specified period
tsf(symbol, period, resolution=None, selector=None)
[source]Creates a new Time Series Forecast indicator
- 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)
The TimeSeriesForecast indicator for the requested symbol over the specified period
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.
- 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)
The TrueStrengthIndex indicator for the given parameters
ultosc(symbol, period_1, period_2, period_3, resolution=None, selector=None)
[source]Creates a new UltimateOscillator indicator.
- 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
The UltimateOscillator indicator for the requested symbol over the specified period
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.
- 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)
The Variance indicator for the requested symbol over the specified period
v(symbol, mirror_option=None, risk_free_rate=None, dividend_yield=None, option_model=None, 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.
- 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
A new Vega indicator for the specified symbol
vidya(symbol, period, resolution=None, selector=None)
[source]Creates a new Chande's Variable Index Dynamic Average indicator.
- 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)
The VariableIndexDynamicAverage indicator for the requested symbol over the specified period
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.
- 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
The Volume Profile indicator for the given parameters
vtx(symbol, period, resolution=None, selector=None)
[source]Creates a new Vortex indicator for the symbol. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose VWMA we want
- period (int) — The smoothing period used to smooth the computed VWMA 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
A new Vortex indicator with the specified smoothing period
vwap(symbol)
[source]Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose VWAP we want
The IntradayVWAP for the specified symbol
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.
- 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
The VolumeWeightedAveragePrice for the given parameters
vwma(symbol, period, resolution=None, selector=None)
[source]Creates a new VolumeWeightedMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose VWMA we want
- period (int) — The smoothing period used to smooth the computed VWMA values
- 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
A new VolumeWeightedMovingAverage indicator with the specified smoothing period
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.
- 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
The Williams %R indicator for the requested symbol over the specified period
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.
- 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)
The WilderMovingAverage for the given parameters
zlema(symbol, period, resolution=None, selector=None)
[source]Creates a ZeroLagExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.
- symbol (Symbol) — The symbol whose ZLEMA we want
- period (int) — The period of the ZLEMA
- resolution (Resolution, optional) — The resolution
- selector (Callable[IBaseData, float], optional) — x.Value)
The ZeroLagExponentialMovingAverage for the given parameters
zz(symbol, sensitivity=0.05, min_trend_length=1, resolution=None, selector=None)
[source]Creates a ZigZag indicator for the specified symbol, with adjustable sensitivity and minimum trend length.
- symbol (Symbol) — The symbol for which to create the ZigZag indicator.
- sensitivity (float, optional) — The sensitivity for detecting pivots.
- min_trend_length (int, optional) — The minimum number of bars required for a trend before a pivot is confirmed.
- resolution (Resolution, optional) — The resolution
- selector (Callable[IBaseData, IBaseDataBar], optional) — x.Value)
The configured ZigZag indicator.
Gets an instance to access the candlestick pattern helper methods
Gets an instance to access the candlestick pattern helper methods
CandlestickPatterns
Live Trading
Live Trading
on_brokerage_disconnect()
[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.
- message_event (BrokerageMessageEvent)
on_brokerage_reconnect()
[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.
- live (bool)
set_status(status)
[source]Boolean property indicating the algorithm is currently running in live mode.
Boolean property indicating the algorithm is currently running in live mode.
bool
Notification Manager for Sending Live Runtime Notifications to users about important events.
Notification Manager for Sending Live Runtime Notifications to users about important events.
NotificationManager
Logging
Logging
debug(message)
[source]Send a debug message to the web console:
- message (float | int | str | PyObject) — Message to send to debug console
error(message)
[source]Send a string error message to the Console.
- message (float | int | str | PyObject) — Message to display in errors grid
error(error)
[source]Send a string error message to the Console.
- error (Exception) — Exception object captured from a try catch loop
log(message)
[source]Added another method for logging if user guessed.
- message (float | int | str | PyObject) — String message to log.
quit(message)
[source]Terminate the algorithm after processing the current event handler.
- message (str | PyObject) — Exit message to display on quitting
set_quit(quit)
[source]Set the Quit flag property of the algorithm.
- quit (bool) — Boolean quit state
Storage for debugging messages before the event handler has passed control back to the Lean Engine.
Storage for debugging messages before the event handler has passed control back to the Lean Engine.
List[str]
Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets
Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets
bool
List of error messages generated by the user's code calling the "Error" function.
List of error messages generated by the user's code calling the "Error" function.
List[str]
Storage for log messages before the event handlers have passed control back to the Lean Engine.
Storage for log messages before the event handlers have passed control back to the Lean Engine.
List[str]
Gets the run time error from the algorithm, or null if none was encountered.
Gets the run time error from the algorithm, or null if none was encountered.
Exception
Machine Learning
Machine Learning
train(date_rule, time_rule, training_code)
[source]Schedules the provided training code to execute immediately
- 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
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.
- requests (List[SubmitOrderRequest])
on_margin_call_warning()
[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.
- handler (IBrokerageMessageHandler | PyObject)
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
- brokerage (BrokerageName) — The brokerage to emulate
- account_type (AccountType, optional)
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
- model (IBrokerageModel | PyObject)
set_risk_free_interest_rate_model(model)
[source]Sets the risk free interest rate model to be used in the algorithm
- model (IRiskFreeInterestRateModel | PyObject)
Gets the brokerage message handler used to decide what to do with each message sent from the brokerage
Gets the brokerage message handler used to decide what to do with each message sent from the brokerage
IBrokerageMessageHandler
Gets the brokerage model - used to model interactions with specific brokerages.
Gets the brokerage model - used to model interactions with specific brokerages.
IBrokerageModel
Gets the brokerage name.
Gets the brokerage name.
BrokerageName
Gets the risk free interest rate model used to get the interest rates
Gets the risk free interest rate model used to get the interest rates
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
- name (str) — The name of the parameter to get
- default_value (float) — The default value to return
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
- name (str) — The name of the parameter to get
- default_value (int) — The default value to return
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
- name (str) — The name of the parameter to get
- default_value (float) — The default value to return
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
- name (str) — The name of the parameter to get
- default_value (str, optional) — The default value to return
str
get_parameters()
[source]Gets a read-only dictionary with all current parameters
Dict[str, str]
set_parameters(parameters)
[source]Sets the parameters from the dictionary
- parameters (Dict[str, str])
Scheduled Events
Scheduled Events
Gets the date rules helper object to make specifying dates for events easier
Gets the date rules helper object to make specifying dates for events easier
DateRules
Gets schedule manager for adding/removing scheduled events
Gets schedule manager for adding/removing scheduled events
ScheduleManager
Gets the time rules helper object to make specifying times for events easier
Gets the time rules helper object to make specifying times for events easier
TimeRules
Gets trading calendar populated with trading events
Gets trading calendar populated with trading events
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
- account_currency (str) — The account currency cash symbol to set
- starting_cash (float, optional)
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.
- symbol (str) — The cash symbol to set
- starting_cash (float | int) — Decimal cash value of portfolio
- conversion_rate (float, optional)
Gets the account currency
Gets the account currency
str
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.
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.
Dict[Symbol, Security]
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
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
SecurityPortfolioManager
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.
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.
SecurityManager
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
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
SignalExportManager
Statistics
Statistics
set_summary_statistic(name, value)
[source]Set a custom summary statistic for the algorithm.
- name (str) — Name of the custom summary statistic
- value (float | int | str) — Value of the custom summary statistic
The current statistics for the running algorithm.
The current statistics for the running algorithm.
StatisticsResults
Trading and Orders
Trading and Orders
buy(strategy, quantity, asynchronous=False, tag=, order_properties=None)
[source]Buy Stock (Alias of Order)
- 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)
Sequence of order tickets
List[OrderTicket]
buy(symbol, quantity)
[source]Buy Stock (Alias of Order)
- symbol (Symbol) — string Symbol of the asset to trade
- quantity (float | int) — int Quantity of the asset to trade
The order ticket instance.
calculate_order_quantity(symbol, target)
[source]Calculate the order quantity to achieve target-percent holdings.
- symbol (Symbol) — Security object we're asking for
- target (float) — Target percentage holdings
Order quantity to achieve this percentage
float
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.
- 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)
Sequence of order tickets, one for each leg
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.
- 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)
Sequence of order tickets, one for each leg
List[OrderTicket]
combo_market_order(legs, quantity, asynchronous=False, tag=, order_properties=None)
[source]Issue a combo market order/trade for multiple assets
- 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)
Sequence of order tickets, one for each leg
List[OrderTicket]
exercise_option(option_symbol, quantity, asynchronous=False, tag=, order_properties=None)
[source]Send an exercise order to the transaction handler
- 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)
The order ticket instance.
is_market_open(symbol)
[source]Determines if the exchange for the specified symbol is open at the current time.
- symbol (Symbol) — The symbol
True if the exchange is considered open at the current time, false otherwise
bool
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:
- symbol (Symbol) — String symbol for the asset
- quantity (float | int) — 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)
The order ticket instance.
limit_order(symbol, quantity, limit_price, tag=, order_properties=None)
[source]Send a limit order to the transaction handler:
- symbol (Symbol) — String symbol for the asset
- quantity (float | int) — 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)
The order ticket instance.
liquidate(symbols, asynchronous=False, tag=Liquidated, order_properties=None)
[source]Liquidate your portfolio holdings
- symbols (List[Symbol] | PyObject) — List of symbols to liquidate in Python
- asynchronous (bool, optional) — Flag to indicate if the symbols should be liquidated asynchronously
- tag (str, optional) — Custom tag to know who is calling this
- order_properties (IOrderProperties, optional) — Order properties to use
List[OrderTicket]
liquidate(symbol=None, asynchronous=False, tag=None, order_properties=None)
[source]Liquidate your portfolio holdings
- symbol (Symbol, optional) — Specific asset to liquidate, defaults to all
- asynchronous (bool, optional) — Flag to indicate if the symbols should be liquidated asynchronously
- tag (str, optional) — Custom tag to know who is calling this
- order_properties (IOrderProperties, optional) — Order properties to use
List[OrderTicket]
market_on_close_order(symbol, quantity, tag=, order_properties=None)
[source]Market on close order implementation: Send a market order when the exchange closes
- symbol (Symbol) — The symbol to be ordered
- quantity (float | int) — The number of shares to required
- tag (str, optional) — Place a custom order property or tag (e.g. indicator data).
- order_properties (IOrderProperties, optional)
The order ticket instance.
market_on_open_order(symbol, quantity, tag=, order_properties=None)
[source]Market on open order implementation: Send a market order when the exchange opens
- symbol (Symbol) — The symbol to be ordered
- quantity (float | int) — The number of shares to required
- tag (str, optional) — Place a custom order property or tag (e.g. indicator data).
- order_properties (IOrderProperties, optional)
The order ticket instance.
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.
- symbol (Symbol) — Symbol of the MarketType Required.
- quantity (float | int) — 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)
The order ticket instance.
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.
- 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)
The order ticket instance.
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.
- assignment_event (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.
- order_event (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);
- 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)
Sequence of order tickets
List[OrderTicket]
order(symbol, quantity, asynchronous=False, tag=, order_properties=None)
[source]Issue an order/trade for asset: Alias wrapper for Order(string, int);
- symbol (Symbol) — Symbol of the MarketType Required.
- quantity (float | int) — 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)
The order ticket instance.
sell(strategy, quantity, asynchronous=False, tag=, order_properties=None)
[source]Sell stock (alias of Order)
- 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)
Sequence of order tickets
List[OrderTicket]
sell(symbol, quantity)
[source]Sell stock (alias of Order)
- symbol (Symbol) — string Symbol of the asset to trade
- quantity (float | int) — int Quantity of the asset to trade
The order ticket instance.
set_benchmark(ticker)
[source]Sets the benchmark used for computing statistics of the algorithm to the specified symbol
- 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
- symbol (Symbol)
set_benchmark(benchmark)
[source]Sets the benchmark used for computing statistics of the algorithm to the specified symbol
- benchmark (Callable[datetime, float] | PyObject)
set_holdings(symbol, percentage, liquidate_existing_holdings=False, tag=None, 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.
- symbol (Symbol) — string symbol we wish to hold
- percentage (float | int) — 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)
A list of order tickets.
List[OrderTicket]
set_holdings(targets, liquidate_existing_holdings=False, tag=None, 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.
- 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)
A list of order tickets.
List[OrderTicket]
set_maximum_orders(max)
[source]Maximum number of orders for the algorithm
- max (int)
set_trade_builder(trade_builder)
[source]Set the ITradeBuilder implementation to generate trades from executions and market price updates
- trade_builder (ITradeBuilder)
shortable(symbol, short_quantity, update_order_id=None)
[source]Determines if the Symbol is shortable at the brokerage
- 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
True if the symbol can be shorted by the requested quantity
bool
shortable_quantity(symbol)
[source]Gets the quantity shortable for the given asset
- symbol (Symbol)
Quantity shortable for the given asset. Zero if not shortable, or a number greater than zero if shortable.
int
stop_limit_order(symbol, quantity, stop_price, limit_price, tag=, order_properties=None)
[source]Send a stop limit order to the transaction handler:
- symbol (Symbol) — String symbol for the asset
- quantity (float | int) — 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)
The order ticket instance.
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
- symbol (Symbol) — String symbol for the asset we're trading
- quantity (float | int) — 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)
The order ticket instance.
submit_order_request(request)
[source]Will submit an order request to the algorithm
- request (SubmitOrderRequest) — The request to submit
The order ticket
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.
- symbol (Symbol) — Trading asset symbol
- quantity (float | int) — 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
The order ticket instance.
Benchmark
Benchmark
IBenchmark
Gets the default order properties
Gets the default order properties
IOrderProperties
Gets the Trade Builder to generate trades from executions
Gets the Trade Builder to generate trades from executions
ITradeBuilder
Transaction Manager - Process transaction fills and order management.
Transaction Manager - Process transaction fills and order management.
SecurityTransactionManager
Universes
Universes
add_universe(t, security_type, name, resolution, market, universe_settings, selector)
[source]Adds a new universe selection model
- t (PyObject) — The data type
- security_type (SecurityType) — The security type the universe produces
- name (str) — A unique name for this universe
- resolution (Resolution | Optional[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[BaseData, str] | List[Fundamental, Symbol] | List[datetime, str] | PyObject) — Function delegate that performs selection on the universe data
add_universe(data_type, security_type, name, resolution, market, universe_settings, py_selector)
[source]Adds a new universe selection model
- 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 (Resolution | Optional[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
add_universe(py_object, pyfine)
[source]Adds a new universe selection model
- py_object (PyObject) — Defines an initial coarse selection or a universe
- pyfine (PyObject) — Defines a more detailed selection with access to more data
add_universe(date_rule, selector)
[source]Adds a new universe selection model
- date_rule (IDateRule)
- selector (List[BaseData, Symbol] | List[BaseData, str] | List[Fundamental, Symbol]) — Defines an initial coarse selection
add_universe(coarse_selector, fine_selector)
[source]Adds a new universe selection model
- 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
add_universe(universe, fine_selector)
[source]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
- universe (Universe | PyObject) — The universe we want to chain an option universe selection model too
- option_filter (Callable[OptionFilterUniverse, OptionFilterUniverse] | PyObject) — The option filter universe to use
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
- 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.
Gets a helper that provides pre-defined universe definitions, such as top dollar volume
Gets a helper that provides pre-defined universe definitions, such as top dollar volume
UniverseDefinitions
Gets universe manager which holds universes keyed by their symbol
Gets universe manager which holds universes keyed by their symbol
UniverseManager
Gets the universe settings to be used when adding securities via universe selection
Gets the universe settings to be used when adding securities via universe selection
UniverseSettings
Types
AbandonedBaby
Abandoned Baby candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
AccountType
Account type: margin or cash
CASH
Cash account type (1)
Cash account type (1)
AccountType
MARGIN
Margin account type (0)
Margin account type (0)
AccountType
AdvanceBlock
Advance Block candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
AlgorithmMode
Represents the deployment modes of an algorithm
BACKTESTING
Backtesting (2)
Backtesting (2)
AlgorithmMode
LIVE
Live (0)
Live (0)
AlgorithmMode
OPTIMIZATION
Optimization (1)
Optimization (1)
AlgorithmMode
RESEARCH
Research (3)
Research (3)
AlgorithmMode
AlgorithmStatus
States of a live deployment.
COMPLETED
Algorithm completed running (6)
Algorithm completed running (6)
AlgorithmStatus
DELETED
Algorithm has been deleted (5)
Algorithm has been deleted (5)
AlgorithmStatus
DEPLOY_ERROR
Error compiling algorithm at start (0)
Error compiling algorithm at start (0)
AlgorithmStatus
HISTORY
History status update (11)
History status update (11)
AlgorithmStatus
INITIALIZING
The algorithm is initializing (10)
The algorithm is initializing (10)
AlgorithmStatus
INVALID
Error in the algorithm id (not used) (8)
Error in the algorithm id (not used) (8)
AlgorithmStatus
IN_QUEUE
Waiting for a server (1)
Waiting for a server (1)
AlgorithmStatus
LIQUIDATED
Liquidated algorithm (4)
Liquidated algorithm (4)
AlgorithmStatus
LOGGING_IN
The algorithm is logging into the brokerage (9)
The algorithm is logging into the brokerage (9)
AlgorithmStatus
RUNNING
Running algorithm (2)
Running algorithm (2)
AlgorithmStatus
RUNTIME_ERROR
Runtime Error Stoped Algorithm (7)
Runtime Error Stoped Algorithm (7)
AlgorithmStatus
STOPPED
Stopped algorithm or exited with runtime errors (3)
Stopped algorithm or exited with runtime errors (3)
AlgorithmStatus
BeltHold
Belt-hold candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Breakaway
Breakaway candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
BrokerageMessageEvent
Represents a message received from a brokerage
code
Gets the brokerage specific code for this message, zero if no code was specified
Gets the brokerage specific code for this message, zero if no code was specified
str
message
Gets the message text received from the brokerage
Gets the message text received from the brokerage
str
type
Gets the type of brokerage message
Gets the type of brokerage message
BrokerageMessageType
BrokerageName
Specifices what transaction model and submit/execution rules to use
ALPACA
Transaction and submit/execution rules will use alpaca models
Transaction and submit/execution rules will use alpaca models
BrokerageName
ALPHA_STREAMS
Transaction and submit/execution rules will use AlphaStream models
Transaction and submit/execution rules will use AlphaStream models
BrokerageName
ATREYU
Transaction and submit/execution rules will use atreyu models
Transaction and submit/execution rules will use atreyu models
BrokerageName
AXOS
Transaction and submit/execution rules will use Axos models
Transaction and submit/execution rules will use Axos models
BrokerageName
BINANCE
Transaction and submit/execution rules will use binance models
Transaction and submit/execution rules will use binance models
BrokerageName
BINANCE_COIN_FUTURES
Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.
Binance Futures COIN-Margined contracts are settled and collateralized in their based cryptocurrency.
BrokerageName
BINANCE_FUTURES
Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD
Binance Futures USDⓈ-Margined contracts are settled and collateralized in their quote cryptocurrency, USDT or BUSD
BrokerageName
BINANCE_US
Transaction and submit/execution rules will use Binance.US models
Transaction and submit/execution rules will use Binance.US models
BrokerageName
BITFINEX
Transaction and submit/execution rules will use bitfinex models
Transaction and submit/execution rules will use bitfinex models
BrokerageName
BYBIT
Transaction and submit/execution rules will use Bybit models
Transaction and submit/execution rules will use Bybit models
BrokerageName
CHARLES_SCHWAB
Transaction and submit/execution rules will use Charles Schwab models
Transaction and submit/execution rules will use Charles Schwab models
BrokerageName
COINBASE
Transaction and submit/execution rules will use Coinbase broker's model
Transaction and submit/execution rules will use Coinbase broker's model
BrokerageName
DEFAULT
Transaction and submit/execution rules will be the default as initialized
Transaction and submit/execution rules will be the default as initialized
BrokerageName
EXANTE
Transaction and submit/execution rules will use Exante models
Transaction and submit/execution rules will use Exante models
BrokerageName
EZE
Transaction and submit/execution rules will use Eze models
Transaction and submit/execution rules will use Eze models
BrokerageName
FTX
Transaction and submit/execution rules will use ftx models
Transaction and submit/execution rules will use ftx models
BrokerageName
FTXUS
Transaction and submit/execution rules will use ftx us models
Transaction and submit/execution rules will use ftx us models
BrokerageName
FXCM_BROKERAGE
Transaction and submit/execution rules will use fxcm models
Transaction and submit/execution rules will use fxcm models
BrokerageName
INTERACTIVE_BROKERS_BROKERAGE
Transaction and submit/execution rules will use interactive brokers models
Transaction and submit/execution rules will use interactive brokers models
BrokerageName
KRAKEN
Transaction and submit/execution rules will use Kraken models
Transaction and submit/execution rules will use Kraken models
BrokerageName
OANDA_BROKERAGE
Transaction and submit/execution rules will use oanda models
Transaction and submit/execution rules will use oanda models
BrokerageName
QUANT_CONNECT_BROKERAGE
Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage
Transaction and submit/execution rules will be the default as initialized Alternate naming for default brokerage
BrokerageName
RBI
Transaction and submit/execution rules will use RBI models
Transaction and submit/execution rules will use RBI models
BrokerageName
SAMCO
Transaction and submit/execution rules will use Samco models
Transaction and submit/execution rules will use Samco models
BrokerageName
TD_AMERITRADE
Transaction and submit/execution rules will use TDameritrade models
Transaction and submit/execution rules will use TDameritrade models
BrokerageName
TERMINAL_LINK
Transaction and submit/execution rules will use Terminal link models
Transaction and submit/execution rules will use Terminal link models
BrokerageName
TRADE_STATION
Transaction and submit/execution rules will use TradeStation models
Transaction and submit/execution rules will use TradeStation models
BrokerageName
TRADIER_BROKERAGE
Transaction and submit/execution rules will use tradier models
Transaction and submit/execution rules will use tradier models
BrokerageName
TRADING_TECHNOLOGIES
Transaction and submit/execution rules will use TradingTechnologies models
Transaction and submit/execution rules will use TradingTechnologies models
BrokerageName
WOLVERINE
Transaction and submit/execution rules will use Wolverine models
Transaction and submit/execution rules will use Wolverine models
BrokerageName
ZERODHA
Transaction and submit/execution rules will use Zerodha models
Transaction and submit/execution rules will use Zerodha models
BrokerageName
CallbackCommand
Algorithm callback command type
run(algorithm)
Runs this command against the specified algorithm instance
- algorithm (IAlgorithm)
id
Unique command id
Unique command id
str
payload
The command payload
The command payload
str
type
The target command type to run, if empty or null will be the generic untyped command handler
The target command type to run, if empty or null will be the generic untyped command handler
str
Cfd
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
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
contract_multiplier
Gets the contract multiplier for this CFD security
Gets the contract multiplier for this CFD security
float
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
minimum_price_variation
Gets the minimum price variation for this CFD security
Gets the minimum price variation for this CFD security
float
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
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.
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.
IPriceVariationModel
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
type
Type of the security.
Type of the security.
SecurityType
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
Chart
Single Parent Chart Object for Custom Charting
add_series(series)
Add a reference to this chart series:
- series (BaseSeries)
clone()
clone_empty()
get_updates()
Fetch a chart with only the updates since the last request, Underlying series will save the index position.
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
- name (str)
- template_series (BaseSeries)
- force_add_new (bool, optional)
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
- name (str)
- type (SeriesType)
- index (int)
- unit (str)
- color (Color)
- symbol (ScatterMarkerSymbol)
- force_add_new (bool, optional)
Series
legend_disabled
True to hide this series legend from the chart
True to hide this series legend from the chart
bool
name
Name of the Chart
Name of the Chart
str
series
List of Series Objects for this Chart:
List of Series Objects for this Chart:
Dict[str, BaseSeries]
symbol
Associated symbol if any, making this an asset plot
Associated symbol if any, making this an asset plot
Symbol
ClosingMarubozu
Closing Marubozu candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
CommandResultPacket
Contains data held as the result of executing a command
channel
User unique specific channel endpoint to send the packets
User unique specific channel endpoint to send the packets
str
command_name
Gets or sets the command that produced this packet
Gets or sets the command that produced this packet
str
success
Gets or sets whether or not the
Gets or sets whether or not the
bool
type
Packet type defined by a string enum
Packet type defined by a string enum
PacketType
ConcealedBabySwallow
Concealed Baby Swallow candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
CorrelationType
Defines the different types of Correlation
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.
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.
CorrelationType
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.
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.
CorrelationType
Counterattack
Counterattack candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Crypto
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
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
base_currency
Gets the currency acquired by going long this currency pair
Gets the currency acquired by going long this currency pair
Cash
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
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.
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.
IPriceVariationModel
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
type
Type of the security.
Type of the security.
SecurityType
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
CryptoFuture
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
BaseData
is_crypto_coin_future()
Checks whether the security is a crypto coin future
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
base_currency
Gets the currency acquired by going long this currency pair
Gets the currency acquired by going long this currency pair
Cash
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
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.
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.
IPriceVariationModel
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
type
Type of the security.
Type of the security.
SecurityType
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
DarkCloudCover
Dark Cloud Cover candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Delistings
Collections of Delisting keyed by Symbol
add(key, value)
add(item)
Adds an item to the ICollection.
- item (Dict[Symbol, Delisting])
clear()
Removes all keys and values from the IExtendedDictionary.
contains(item)
Determines whether the ICollection contains a specific value.
- item (Dict[Symbol, Delisting])
bool
contains_key(key)
Determines whether the IDictionary contains an element with the specified key.
- key (Symbol)
bool
copy()
Creates a shallow copy of the IExtendedDictionary.
PyDict
copy_to(array, array_index)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
- array (Dict)
- array_index (int)
fromkeys(sequence, value)
Creates a new dictionary from the given sequence of elements.
- sequence (Symbol[])
- value (Delisting)
PyDict
get(symbol, value)
Returns the value for the specified Symbol if Symbol is in dictionary.
- symbol (Symbol)
- value (Delisting)
Delisting
get_enumerator()
Returns an enumerator that iterates through the collection.
Dict[Symbol, Delisting]
get_value(key)
items()
Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.
PyList
keys()
Returns a view object that displays a list of all the Symbol objects in the dictionary
PyList
pop(symbol, default_value)
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
- symbol (Symbol)
- default_value (Delisting)
Delisting
popitem()
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
PyTuple
remove(item)
Removes the first occurrence of a specific object from the ICollection.
- item (Dict[Symbol, Delisting])
bool
remove(key)
Removes the first occurrence of a specific object from the ICollection.
- key (Symbol)
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.
- symbol (Symbol)
- default_value (Delisting)
Delisting
try_get_value(key, value)
Gets the value associated with the specified key.
- key (Symbol)
- value (Delisting&)
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.
- other (PyObject)
values()
Returns a view object that displays a list of all the values in the dictionary.
PyList
count
Gets the number of elements contained in the ICollection.
Gets the number of elements contained in the ICollection.
int
is_read_only
Gets a value indicating whether the ICollection is read-only.
Gets a value indicating whether the ICollection is read-only.
bool
item
Gets or sets the Delisting with the specified ticker.
Gets or sets the Delisting with the specified ticker.
Delisting
keys
Gets an ICollection containing the keys of the IDictionary.
Gets an ICollection containing the keys of the IDictionary.
List[Symbol]
time
Gets or sets the time associated with this collection of data
Gets or sets the time associated with this collection of data
datetime
values
Gets an ICollection containing the values in the IDictionary.
Gets an ICollection containing the values in the IDictionary.
List[Delisting]
DeploymentTarget
Represents the types deployment targets for algorithms
CLOUD_PLATFORM
Cloud Platform (0)
Cloud Platform (0)
DeploymentTarget
LOCAL_PLATFORM
Local Platform (1)
Local Platform (1)
DeploymentTarget
PRIVATE_CLOUD_PLATFORM
Private Cloud Platform (2)
Private Cloud Platform (2)
DeploymentTarget
Dividends
Collection of dividends keyed by Symbol
add(key, value)
add(item)
Adds an item to the ICollection.
- item (Dict[Symbol, Dividend])
clear()
Removes all keys and values from the IExtendedDictionary.
contains(item)
Determines whether the ICollection contains a specific value.
- item (Dict[Symbol, Dividend])
bool
contains_key(key)
Determines whether the IDictionary contains an element with the specified key.
- key (Symbol)
bool
copy()
Creates a shallow copy of the IExtendedDictionary.
PyDict
copy_to(array, array_index)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
- array (Dict)
- array_index (int)
fromkeys(sequence, value)
Creates a new dictionary from the given sequence of elements.
- sequence (Symbol[])
- value (Dividend)
PyDict
get(symbol, value)
Returns the value for the specified Symbol if Symbol is in dictionary.
- symbol (Symbol)
- value (Dividend)
Dividend
get_enumerator()
Returns an enumerator that iterates through the collection.
Dict[Symbol, Dividend]
get_value(key)
items()
Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.
PyList
keys()
Returns a view object that displays a list of all the Symbol objects in the dictionary
PyList
pop(symbol, default_value)
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
- symbol (Symbol)
- default_value (Dividend)
Dividend
popitem()
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
PyTuple
remove(item)
Removes the first occurrence of a specific object from the ICollection.
- item (Dict[Symbol, Dividend])
bool
remove(key)
Removes the first occurrence of a specific object from the ICollection.
- key (Symbol)
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.
- symbol (Symbol)
- default_value (Dividend)
Dividend
try_get_value(key, value)
Gets the value associated with the specified key.
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.
- other (PyObject)
values()
Returns a view object that displays a list of all the values in the dictionary.
PyList
count
Gets the number of elements contained in the ICollection.
Gets the number of elements contained in the ICollection.
int
is_read_only
Gets a value indicating whether the ICollection is read-only.
Gets a value indicating whether the ICollection is read-only.
bool
item
Gets or sets the Dividend with the specified ticker.
Gets or sets the Dividend with the specified ticker.
Dividend
keys
Gets an ICollection containing the keys of the IDictionary.
Gets an ICollection containing the keys of the IDictionary.
List[Symbol]
time
Gets or sets the time associated with this collection of data
Gets or sets the time associated with this collection of data
datetime
values
Gets an ICollection containing the values in the IDictionary.
Gets an ICollection containing the values in the IDictionary.
List[Dividend]
Doji
Doji candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
DojiStar
Doji Star candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
DragonflyDoji
Dragonfly Doji candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Engulfing
Engulfing candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Equity
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
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_data_normalization_mode(mode)
Sets the data normalization mode to be used by this security
- mode (DataNormalizationMode)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
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.
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.
IPriceVariationModel
primary_exchange
Equity primary exchange.
Equity primary exchange.
Exchange
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
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.
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.
bool
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
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.
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.
int
type
Type of the security.
Type of the security.
SecurityType
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
DEFAULT_SETTLEMENT_DAYS
The default number of days required to settle an equity sale
The default number of days required to settle an equity sale
int
DEFAULT_SETTLEMENT_TIME
The default time of day for settlement
The default time of day for settlement
timedelta
EveningDojiStar
Evening Doji Star candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
EveningStar
Evening Star candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Forex
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
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
base_currency
Gets the currency acquired by going long this currency pair
Gets the currency acquired by going long this currency pair
Cash
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
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.
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.
IPriceVariationModel
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
type
Type of the security.
Type of the security.
SecurityType
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
Fundamental
Lean fundamental data class
clone(fill_forward)
Return a new instance clone of this object, used in fill forward
- fill_forward (bool)
BaseData
data_time_zone()
Specifies the data time zone for this data type. This is useful for custom data types
datetimeZone
default_resolution()
get_source(config, date, is_live_mode)
Return the URL string source of the file. This will be converted to a stream
- config (SubscriptionDataConfig)
- date (datetime)
- is_live_mode (bool)
SubscriptionDataSource
is_sparse_data()
Indicates that the data set is expected to be sparse
bool
reader(config, line, date, is_live_mode)
Will read a new instance from the given line
- config (SubscriptionDataConfig)
- line (str)
- date (datetime)
- is_live_mode (bool)
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.
- config (SubscriptionDataConfig)
- stream (StreamReader)
- date (datetime)
- is_live_mode (bool)
BaseData
requires_mapping()
Indicates if there is support for mapping
bool
should_cache_to_security()
Indicates whether this contains data that should be stored in the security cache
bool
supported_resolutions()
This is a daily data set
List[Resolution]
update(last_trade, bid_price, ask_price, volume, bid_size, ask_size)
Updates this base data with a new trade
- 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
- ask_price (float)
- ask_size (float)
update_bid(bid_price, bid_size)
Updates this base data with the new quote bid information
- bid_price (float)
- bid_size (float)
update_quote(bid_price, bid_size, ask_price, ask_size)
Updates this base data with new quote information
- 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
- last_trade (float)
- trade_size (float)
adjusted_price
Gets the split and dividend adjusted price
Gets the split and dividend adjusted price
float
asset_classification
The instance of the AssetClassification class
The instance of the AssetClassification class
AssetClassification
company_profile
The instance of the CompanyProfile class
The instance of the CompanyProfile class
CompanyProfile
company_reference
The instance of the CompanyReference class
The instance of the CompanyReference class
CompanyReference
data_type
Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
MarketDataType
dollar_volume
Gets the day's dollar volume for this symbol
Gets the day's dollar volume for this symbol
float
earning_ratios
The instance of the EarningRatios class
The instance of the EarningRatios class
EarningRatios
earning_reports
The instance of the EarningReports class
The instance of the EarningReports class
EarningReports
end_time
The end time of this data.
The end time of this data.
datetime
financial_statements
The instance of the FinancialStatements class
The instance of the FinancialStatements class
FinancialStatements
has_fundamental_data
Returns whether the symbol has fundamental data for the given date
Returns whether the symbol has fundamental data for the given date
bool
is_fill_forward
True if this is a fill forward piece of data
True if this is a fill forward piece of data
bool
market
Gets the market for this symbol
Gets the market for this symbol
str
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).
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).
int
operation_ratios
The instance of the OperationRatios class
The instance of the OperationRatios class
OperationRatios
price
Gets the raw price
Gets the raw price
float
price_factor
Gets the price factor for the given date
Gets the price factor for the given date
float
price_scale_factor
Gets the combined factor used to create adjusted prices from raw prices
Gets the combined factor used to create adjusted prices from raw prices
float
security_reference
The instance of the SecurityReference class
The instance of the SecurityReference class
SecurityReference
split_factor
Gets the split factor for the given date
Gets the split factor for the given date
float
symbol
Symbol representation for underlying Security
Symbol representation for underlying Security
Symbol
time
Current time marker of this data packet.
Current time marker of this data packet.
datetime
valuation_ratios
The instance of the ValuationRatios class
The instance of the ValuationRatios class
ValuationRatios
value
Gets the raw price
Gets the raw price
float
volume
Gets the day's total volume
Gets the day's total volume
int
Future
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
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
set_filter(min_expiry, max_expiry)
Sets the ContractFilter to a new instance of the filter using the specified expiration range values
- 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
- 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
- universe_func (Callable[FutureFilterUniverse, FutureFilterUniverse] | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
contract_filter
Gets or sets the contract filter
Gets or sets the contract filter
IDerivativeSecurityFilter[Symbol]
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
expiry
Gets the expiration date
Gets the expiration date
datetime
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_future_chain
Returns true if this is the future chain security, false if it is a specific future contract
Returns true if this is the future chain security, false if it is a specific future contract
bool
is_future_contract
Returns true if this is a specific future contract security, false if it is the future chain security
Returns true if this is a specific future contract security, false if it is the future chain security
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
mapped
Gets or sets the currently mapped symbol for the security
Gets or sets the currently mapped symbol for the security
Symbol
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
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.
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.
IPriceVariationModel
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
settlement_type
Specifies if futures contract has physical or cash settlement on settlement
Specifies if futures contract has physical or cash settlement on settlement
SettlementType
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
type
Type of the security.
Type of the security.
SecurityType
underlying
Gets or sets the underlying security object.
Gets or sets the underlying security object.
Security
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
DEFAULT_SETTLEMENT_DAYS
The default number of days required to settle a futures sale
The default number of days required to settle a futures sale
int
DEFAULT_SETTLEMENT_TIME
The default time of day for settlement
The default time of day for settlement
timedelta
GapSideBySideWhite
Up/Down-gap side-by-side white lines candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
GravestoneDoji
Gravestone Doji candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Hammer
Hammer candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
HangingMan
Hanging Man candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Harami
Harami candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
HaramiCross
Harami Cross candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
HighWaveCandle
High-Wave Candle candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Hikkake
Hikkake candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
HikkakeModified
Hikkake Modified candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
HistoryRequest
Represents a request for historical data
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
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
int
data_mapping_mode
Gets the data mapping mode used for this subscription
Gets the data mapping mode used for this subscription
DataMappingMode
data_normalization_mode
Gets the normalization mode used for this subscription
Gets the normalization mode used for this subscription
DataNormalizationMode
data_time_zone
Gets the time zone of the time stamps on the raw input data
Gets the time zone of the time stamps on the raw input data
datetimeZone
data_type
The data type of this request
The data type of this request
Type
end_time_local
Gets the EndTimeUtc in the security's exchange time zone
Gets the EndTimeUtc in the security's exchange time zone
datetime
end_time_utc
Gets the end of the requested time interval in UTC
Gets the end of the requested time interval in UTC
datetime
exchange_hours
Gets the exchange hours used for processing fill forward requests
Gets the exchange hours used for processing fill forward requests
SecurityExchangeHours
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.
Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.
Resolution
include_extended_market_hours
Gets whether or not to include extended market hours data, set to false for only normal market hours
Gets whether or not to include extended market hours data, set to false for only normal market hours
bool
is_custom_data
Gets true if this is a custom data request, false for normal QC data
Gets true if this is a custom data request, false for normal QC data
bool
resolution
Gets the requested data resolution
Gets the requested data resolution
Resolution
start_time_local
Gets the StartTimeUtc in the security's exchange time zone
Gets the StartTimeUtc in the security's exchange time zone
datetime
start_time_utc
Gets the beginning of the requested time interval in UTC
Gets the beginning of the requested time interval in UTC
datetime
symbol
Gets the symbol to request data for
Gets the symbol to request data for
Symbol
tick_type
TickType of the history request
TickType of the history request
TickType
tradable_days_in_data_time_zone
Gets the tradable days specified by this request, in the security's data time zone
Gets the tradable days specified by this request, in the security's data time zone
List[datetime]
HomingPigeon
Homing Pigeon candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
IdenticalThreeCrows
Identical Three Crows candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
InNeck
In-Neck candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Index
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
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
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.
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.
IPriceVariationModel
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
type
Type of the security.
Type of the security.
SecurityType
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
IndexOption
Index Options security
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
- slice (Slice)
- contract (OptionContract)
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.
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.
- exercise_order_quantity (float)
float
get_intrinsic_value(underlying_price)
Intrinsic value function of the option
- underlying_price (float)
float
get_last_data()
Get the last price update set to the security if any else null
BaseData
get_pay_off(underlying_price)
Option payoff function at expiration time
- underlying_price (float)
float
is_auto_exercised(underlying_price)
Checks if option is eligible for automatic exercise on expiration
- underlying_price (float)
bool
out_of_the_money_amount(underlying_price)
Option out of the money function
- underlying_price (float)
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_data_normalization_mode(mode)
Sets the data normalization mode to be used by this security
- mode (DataNormalizationMode)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
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.
- 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.
- 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.
- universe_func (Callable[OptionFilterUniverse, OptionFilterUniverse] | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_option_assignment_model(py_object)
Sets the automatic option assignment model
- py_object (PyObject)
set_option_assignment_model(option_assignment_model)
Sets the automatic option assignment model
- option_assignment_model (IOptionAssignmentModel)
set_option_exercise_model(py_object)
Sets the option exercise model
- py_object (PyObject)
set_option_exercise_model(option_exercise_model)
Sets the option exercise model
- option_exercise_model (IOptionExerciseModel)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
contract_filter
Gets or sets the contract filter
Gets or sets the contract filter
IDerivativeSecurityFilter[OptionUniverse]
contract_multiplier
The contract multiplier for the option security
The contract multiplier for the option security
int
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.
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.
int
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
exercise_settlement
Specifies if option contract has physical or cash settlement on exercise
Specifies if option contract has physical or cash settlement on exercise
SettlementType
expiry
Gets the expiration date
Gets the expiration date
datetime
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_option_chain
Returns true if this is the option chain security, false if it is a specific option contract
Returns true if this is the option chain security, false if it is a specific option contract
bool
is_option_contract
Returns true if this is a specific option contract security, false if it is the option chain security
Returns true if this is a specific option contract security, false if it is the option chain security
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
option_assignment_model
The automatic option assignment model
The automatic option assignment model
IOptionAssignmentModel
option_exercise_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IOptionExerciseModel
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
price_model
Gets or sets the price model for this option security
Gets or sets the price model for this option security
IOptionPriceModel
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.
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.
IPriceVariationModel
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
right
Gets the right being purchased (call [right to buy] or put [right to sell])
Gets the right being purchased (call [right to buy] or put [right to sell])
OptionRight
scaled_strike_price
Gets the strike price multiplied by the strike multiplier
Gets the strike price multiplied by the strike multiplier
float
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
strike_price
Gets the strike price
Gets the strike price
float
style
Gets the option style
Gets the option style
OptionStyle
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
type
Type of the security.
Type of the security.
SecurityType
underlying
Gets or sets the underlying security object.
Gets or sets the underlying security object.
Security
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
IndicatorHistory
Provides historical values of an indicator
get_enumerator()
Returns an enumerator for the data
IEnumerator[IndicatorDataPoints]
count
The current data point count
The current data point count
int
current
The indicators historical values
The indicators historical values
List[IndicatorDataPoint]
data_frame
This data pandas data frame
This data pandas data frame
PyObject
item
Access the historical indicator values per indicator property name
Access the historical indicator values per indicator property name
List[IndicatorDataPoint]
Insight
Defines a alpha prediction for a single symbol generated by the algorithm
cancel(utc_time)
Cancel this insight
- utc_time (datetime)
clone()
expire(utc_time)
Expire this insight
- utc_time (datetime)
is_active(utc_time)
Determines whether or not this insight is considered active at the specified utcTime
- utc_time (datetime)
bool
is_expired(utc_time)
Determines whether or not this insight is considered expired at the specified utcTime
- utc_time (datetime)
bool
set_period_and_close_time(exchange_hours)
Sets the insight period and close times if they have not already been set.
- exchange_hours (SecurityExchangeHours)
short_to_string()
Returns a short string that represents the current object.
str
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
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
datetime
confidence
Gets the confidence in this insight
Gets the confidence in this insight
float
direction
Gets the predicted direction, down, flat or up
Gets the predicted direction, down, flat or up
InsightDirection
estimated_value
Gets the estimated value of this insight in the account currency
Gets the estimated value of this insight in the account currency
float
generated_time_utc
Gets the utc time this insight was generated
Gets the utc time this insight was generated
datetime
group_id
Gets the group id this insight belongs to, null if not in a group
Gets the group id this insight belongs to, null if not in a group
Guid
id
Gets the unique identifier for this insight
Gets the unique identifier for this insight
Guid
magnitude
Gets the predicted percent change in the insight type (price/volatility)
Gets the predicted percent change in the insight type (price/volatility)
float
period
Gets the period over which this insight is expected to come to fruition
Gets the period over which this insight is expected to come to fruition
timedelta
reference_value
Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType
Gets the initial reference value this insight is predicting against. The value is dependent on the specified InsightType
float
reference_value_final
Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType
Gets the final reference value, used for scoring, this insight is predicting against. The value is dependent on the specified InsightType
float
score
Gets the most recent scores for this insight
Gets the most recent scores for this insight
InsightScore
source_model
Gets an identifier for the source model that generated this insight.
Gets an identifier for the source model that generated this insight.
str
symbol
Gets the symbol this insight is for
Gets the symbol this insight is for
Symbol
tag
The insight's tag containing additional information
The insight's tag containing additional information
str
type
Gets the type of insight, for example, price insight or volatility insight
Gets the type of insight, for example, price insight or volatility insight
InsightType
weight
Gets the portfolio weight of this insight
Gets the portfolio weight of this insight
float
InvertedHammer
Inverted Hammer candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Kicking
Kicking candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
KickingByLength
Kicking (bull/bear determined by the longer marubozu) candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
LadderBottom
Ladder Bottom candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
LongLeggedDoji
Long Legged Doji candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
LongLineCandle
Long Line Candle candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Marubozu
Marubozu candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
MatHold
Mat Hold candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
MatchingLow
Matching Low candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
MorningDojiStar
Morning Doji Star candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
MorningStar
Morning Star candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
MovingAverageType
Defines the different types of moving averages
ALMA
The Arnaud Legoux Moving Average (10)
The Arnaud Legoux Moving Average (10)
MovingAverageType
DOUBLE_EXPONENTIAL
The double exponential moving average (4)
The double exponential moving average (4)
MovingAverageType
EXPONENTIAL
The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)
The standard exponential moving average, using a smoothing factor of 2/(n+1) (1)
MovingAverageType
HULL
The Hull Moving Average (9)
The Hull Moving Average (9)
MovingAverageType
KAMA
The Kaufman Adaptive Moving Average (8)
The Kaufman Adaptive Moving Average (8)
MovingAverageType
LINEAR_WEIGHTED_MOVING_AVERAGE
A weighted moving average type (3)
A weighted moving average type (3)
MovingAverageType
MGD
The McGinley Dynamic moving average (12)
The McGinley Dynamic moving average (12)
MovingAverageType
SIMPLE
An unweighted, arithmetic mean (0)
An unweighted, arithmetic mean (0)
MovingAverageType
TRIANGULAR
The triangular moving average (6)
The triangular moving average (6)
MovingAverageType
TRIPLE_EXPONENTIAL
The triple exponential moving average (5)
The triple exponential moving average (5)
MovingAverageType
T_3
The T3 moving average (7)
The T3 moving average (7)
MovingAverageType
WILDERS
An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)
An exponential moving average, using a smoothing factor of 1/n and simple moving average as seeding (2)
MovingAverageType
ZLEMA
The Zero Lag Exponential Moving Average (11)
The Zero Lag Exponential Moving Average (11)
MovingAverageType
OnNeck
On-Neck candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Option
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
- slice (Slice)
- contract (OptionContract)
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.
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.
- exercise_order_quantity (float)
float
get_intrinsic_value(underlying_price)
Intrinsic value function of the option
- underlying_price (float)
float
get_last_data()
Get the last price update set to the security if any else null
BaseData
get_pay_off(underlying_price)
Option payoff function at expiration time
- underlying_price (float)
float
is_auto_exercised(underlying_price)
Checks if option is eligible for automatic exercise on expiration
- underlying_price (float)
bool
out_of_the_money_amount(underlying_price)
Option out of the money function
- underlying_price (float)
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_data_normalization_mode(mode)
Sets the data normalization mode to be used by this security
- mode (DataNormalizationMode)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
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.
- 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.
- 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.
- universe_func (Callable[OptionFilterUniverse, OptionFilterUniverse] | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_option_assignment_model(py_object)
Sets the automatic option assignment model
- py_object (PyObject)
set_option_assignment_model(option_assignment_model)
Sets the automatic option assignment model
- option_assignment_model (IOptionAssignmentModel)
set_option_exercise_model(py_object)
Sets the option exercise model
- py_object (PyObject)
set_option_exercise_model(option_exercise_model)
Sets the option exercise model
- option_exercise_model (IOptionExerciseModel)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
contract_filter
Gets or sets the contract filter
Gets or sets the contract filter
IDerivativeSecurityFilter[OptionUniverse]
contract_multiplier
The contract multiplier for the option security
The contract multiplier for the option security
int
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.
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.
int
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
exercise_settlement
Specifies if option contract has physical or cash settlement on exercise
Specifies if option contract has physical or cash settlement on exercise
SettlementType
expiry
Gets the expiration date
Gets the expiration date
datetime
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_option_chain
Returns true if this is the option chain security, false if it is a specific option contract
Returns true if this is the option chain security, false if it is a specific option contract
bool
is_option_contract
Returns true if this is a specific option contract security, false if it is the option chain security
Returns true if this is a specific option contract security, false if it is the option chain security
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
option_assignment_model
The automatic option assignment model
The automatic option assignment model
IOptionAssignmentModel
option_exercise_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IOptionExerciseModel
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
price_model
Gets or sets the price model for this option security
Gets or sets the price model for this option security
IOptionPriceModel
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.
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.
IPriceVariationModel
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
right
Gets the right being purchased (call [right to buy] or put [right to sell])
Gets the right being purchased (call [right to buy] or put [right to sell])
OptionRight
scaled_strike_price
Gets the strike price multiplied by the strike multiplier
Gets the strike price multiplied by the strike multiplier
float
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
strike_price
Gets the strike price
Gets the strike price
float
style
Gets the option style
Gets the option style
OptionStyle
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
type
Type of the security.
Type of the security.
SecurityType
underlying
Gets or sets the underlying security object.
Gets or sets the underlying security object.
Security
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
DEFAULT_SETTLEMENT_DAYS
The default number of days required to settle an equity sale
The default number of days required to settle an equity sale
int
DEFAULT_SETTLEMENT_TIME
The default time of day for settlement
The default time of day for settlement
timedelta
OptionChain
Represents an entire chain of option contracts for a single underying security. This type is IEnumerable
clone(fill_forward)
Return a new instance clone of this object, used in fill forward
- fill_forward (bool)
BaseData
data_time_zone()
Specifies the data time zone for this data type. This is useful for custom data types
datetimeZone
default_resolution()
get_aux()
Gets the auxiliary data with the specified type and symbol
get_aux(symbol)
get_aux_list()
Gets all auxiliary data of the specified type as a dictionary keyed by symbol
List[Symbol, BaseData]
get_aux_list(symbol)
Gets all auxiliary data of the specified type as a dictionary keyed by symbol
- symbol (Symbol)
get_enumerator()
Returns an enumerator that iterates through the collection.
IEnumerator[OptionContract]
get_source(config, date, is_live_mode)
Return the URL string source of the file. This will be converted to a stream
- config (SubscriptionDataConfig)
- date (datetime)
- is_live_mode (bool)
SubscriptionDataSource
is_sparse_data()
Indicates that the data set is expected to be sparse
bool
reader(config, line, 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.
- config (SubscriptionDataConfig)
- line (str)
- date (datetime)
- is_live_mode (bool)
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.
- config (SubscriptionDataConfig)
- stream (StreamReader)
- date (datetime)
- is_live_mode (bool)
BaseData
requires_mapping()
Indicates if there is support for mapping
bool
should_cache_to_security()
Indicates whether this contains data that should be stored in the security cache
bool
supported_resolutions()
Gets the supported resolution for this data and security type
List[Resolution]
update(last_trade, bid_price, ask_price, volume, bid_size, ask_size)
Updates this base data with a new trade
- 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
- ask_price (float)
- ask_size (float)
update_bid(bid_price, bid_size)
Updates this base data with the new quote bid information
- bid_price (float)
- bid_size (float)
update_quote(bid_price, bid_size, ask_price, ask_size)
Updates this base data with new quote information
- 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
- last_trade (float)
- trade_size (float)
contracts
Gets all contracts in the chain, keyed by option symbol
Gets all contracts in the chain, keyed by option symbol
OptionContracts
data_frame
The data frame representation of the option chain
The data frame representation of the option chain
PyObject
data_type
Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
MarketDataType
end_time
The end time of this data. Some data covers spans (trade bars) and as such we want to know the entire time span covered
The end time of this data. Some data covers spans (trade bars) and as such we want to know the entire time span covered
datetime
filtered_contracts
Gets the set of symbols that passed the ContractFilter
Gets the set of symbols that passed the ContractFilter
HashSet[Symbol]
is_fill_forward
True if this is a fill forward piece of data
True if this is a fill forward piece of data
bool
price
As this is a backtesting platform we'll provide an alias of value as price.
As this is a backtesting platform we'll provide an alias of value as price.
float
quote_bars
Gets all quote bars for every option contract in this chain, keyed by option symbol
Gets all quote bars for every option contract in this chain, keyed by option symbol
QuoteBars
symbol
Symbol representation for underlying Security
Symbol representation for underlying Security
Symbol
ticks
Gets all ticks for every option contract in this chain, keyed by option symbol
Gets all ticks for every option contract in this chain, keyed by option symbol
Ticks
time
Current time marker of this data packet.
Current time marker of this data packet.
datetime
trade_bars
Gets all trade bars for every option contract in this chain, keyed by option symbol
Gets all trade bars for every option contract in this chain, keyed by option symbol
TradeBars
underlying
Gets the most recent trade information for the underlying. This may be a Tick or a TradeBar
Gets the most recent trade information for the underlying. This may be a Tick or a TradeBar
BaseData
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.
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.
float
OptionChains
Collection of OptionChain keyed by canonical option symbol
add(key, value)
add(item)
Adds an item to the ICollection.
- item (Dict[Symbol, OptionChain])
clear()
Removes all keys and values from the IExtendedDictionary.
contains(item)
Determines whether the ICollection contains a specific value.
- item (Dict[Symbol, OptionChain])
bool
contains_key(key)
Determines whether the IDictionary contains an element with the specified key.
- key (Symbol)
bool
copy()
Creates a shallow copy of the IExtendedDictionary.
PyDict
copy_to(array, array_index)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
- array (Dict)
- array_index (int)
fromkeys(sequence, value)
Creates a new dictionary from the given sequence of elements.
- sequence (Symbol[])
- value (OptionChain)
PyDict
get(symbol, value)
Returns the value for the specified Symbol if Symbol is in dictionary.
- symbol (Symbol)
- value (OptionChain)
get_enumerator()
Returns an enumerator that iterates through the collection.
Dict[Symbol, OptionChain]
get_value(key)
items()
Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.
PyList
keys()
Returns a view object that displays a list of all the Symbol objects in the dictionary
PyList
pop(symbol, default_value)
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
- symbol (Symbol)
- default_value (OptionChain)
popitem()
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
PyTuple
remove(item)
Removes the first occurrence of a specific object from the ICollection.
- item (Dict[Symbol, OptionChain])
bool
remove(key)
Removes the first occurrence of a specific object from the ICollection.
- key (Symbol)
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.
- symbol (Symbol)
- default_value (OptionChain)
try_get_value(key, value)
Gets the value associated with the specified key.
- key (Symbol)
- value (OptionChain&)
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.
- other (PyObject)
values()
Returns a view object that displays a list of all the values in the dictionary.
PyList
count
Gets the number of elements contained in the ICollection.
Gets the number of elements contained in the ICollection.
int
data_frame
The data frame representation of the option chains
The data frame representation of the option chains
PyObject
is_read_only
Gets a value indicating whether the ICollection is read-only.
Gets a value indicating whether the ICollection is read-only.
bool
item
Gets or sets the OptionChain with the specified ticker.
Gets or sets the OptionChain with the specified ticker.
OptionChain
keys
Gets an ICollection containing the keys of the IDictionary.
Gets an ICollection containing the keys of the IDictionary.
List[Symbol]
time
Gets or sets the time associated with this collection of data
Gets or sets the time associated with this collection of data
datetime
values
Gets an ICollection containing the values in the IDictionary.
Gets an ICollection containing the values in the IDictionary.
List[OptionChain]
OptionPricingModelType
Defines different types of option pricing model
BINOMIAL_COX_ROSS_RUBINSTEIN
The Cox-Ross-Rubinstein binomial tree model (CRR model)
The Cox-Ross-Rubinstein binomial tree model (CRR model)
OptionPricingModelType
BLACK_SCHOLES
Vanilla Black Scholes Model
Vanilla Black Scholes Model
OptionPricingModelType
FORWARD_TREE
The forward binomial tree model, or Cox-Ross-Rubinstein with drift model
The forward binomial tree model, or Cox-Ross-Rubinstein with drift model
OptionPricingModelType
OptionStrategy
Option strategy specification class. Describes option strategy and its parameters for trading.
canonical_option
The canonical Option symbol of the strategy
The canonical Option symbol of the strategy
Symbol
name
Option strategy name
Option strategy name
str
option_legs
Option strategy legs
Option strategy legs
List[OptionLegData]
underlying
Underlying symbol of the strategy
Underlying symbol of the strategy
Symbol
underlying_legs
Option strategy underlying legs (usually 0 or 1 legs)
Option strategy underlying legs (usually 0 or 1 legs)
List[UnderlyingLegData]
OrderEvent
Order Event - Messaging class signifying a change in an order state and record the change in the user's algorithm portfolio
clone()
short_to_string()
Returns a short string that represents the current object.
str
absolute_fill_quantity
Public Property Absolute Getter of Quantity -Filled
Public Property Absolute Getter of Quantity -Filled
float
direction
Order direction.
Order direction.
OrderDirection
fill_price
Fill price information about the order
Fill price information about the order
float
fill_price_currency
Currency for the fill price
Currency for the fill price
str
fill_quantity
Number of shares of the order that was filled in this event.
Number of shares of the order that was filled in this event.
float
id
The unique order event id for each order
The unique order event id for each order
int
is_assignment
True if the order event is an assignment
True if the order event is an assignment
bool
is_in_the_money
True if the order event's option is In-The-Money (ITM)
True if the order event's option is In-The-Money (ITM)
bool
limit_price
The current limit price
The current limit price
float
message
Any message from the exchange.
Any message from the exchange.
str
order_fee
The fee associated with the order
The fee associated with the order
OrderFee
order_id
Id of the order this event comes from.
Id of the order this event comes from.
int
quantity
The current order quantity
The current order quantity
float
status
Status message of the order.
Status message of the order.
OrderStatus
stop_price
The current stop price
The current stop price
float
symbol
Easy access to the order symbol associated with this event.
Easy access to the order symbol associated with this event.
Symbol
ticket
The order ticket associated to the order
The order ticket associated to the order
OrderTicket
trailing_amount
The trailing stop amount
The trailing stop amount
float
trailing_as_percentage
Whether the TrailingAmount is a percentage or an absolute currency value
Whether the TrailingAmount is a percentage or an absolute currency value
bool
trigger_price
The current trigger price
The current trigger price
float
utc_time
The date and time of this event (UTC).
The date and time of this event (UTC).
datetime
OrderTicket
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
- tag (str, optional)
OrderResponse
get(field)
Gets the specified field from the ticket
- field (OrderField)
get(field)
Gets the specified field from the ticket
- field (OrderField)
float
get_most_recent_order_request()
Gets the most recent OrderRequest for this ticket
OrderRequest
get_most_recent_order_response()
Gets the most recent OrderResponse for this ticket
OrderResponse
update(fields)
Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with data specified in fields
- fields (UpdateOrderFields)
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
- limit_price (float)
- tag (str, optional)
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
- quantity (float)
- tag (str, optional)
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
- stop_price (float)
- tag (str, optional)
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
- trailing_amount (float)
- tag (str, optional)
OrderResponse
update_tag(tag)
Submits an UpdateOrderRequest with the SecurityTransactionManager to update the ticket with tag specified in tag
- tag (str)
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
- trigger_price (float)
- tag (str, optional)
OrderResponse
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.
Gets the average fill price for this ticket. If no fills have been processed then this will return a value of zero.
float
cancel_request
Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null
Gets the CancelOrderRequest if this order was canceled. If this order was not canceled, this will return null
CancelOrderRequest
has_order
Returns true if the order has been set for this ticket
Returns true if the order has been set for this ticket
bool
order_closed
Gets a wait handle that can be used to wait until this order has filled
Gets a wait handle that can be used to wait until this order has filled
WaitHandle
order_events
Gets a list of all order events for this ticket
Gets a list of all order events for this ticket
List[OrderEvent]
order_id
Gets the order id of this ticket
Gets the order id of this ticket
int
order_set
Gets a wait handle that can be used to wait until the order has been set
Gets a wait handle that can be used to wait until the order has been set
WaitHandle
order_type
Gets the type of order
Gets the type of order
OrderType
quantity
Gets the number of units ordered
Gets the number of units ordered
float
quantity_filled
Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.
Gets the total qantity filled for this ticket. If no fills have been processed then this will return a value of zero.
float
security_type
status
Gets the current status of this order ticket
Gets the current status of this order ticket
OrderStatus
submit_request
Gets the SubmitOrderRequest that initiated this order
Gets the SubmitOrderRequest that initiated this order
SubmitOrderRequest
symbol
Gets the symbol being ordered
Gets the symbol being ordered
Symbol
tag
Gets the order's current tag
Gets the order's current tag
str
time
Gets the time this order was last updated
Gets the time this order was last updated
datetime
update_requests
Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id
Gets a list of UpdateOrderRequest containing an item for each UpdateOrderRequest that was sent for this order id
List[UpdateOrderRequest]
Piercing
Piercing candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Resolution
Resolution of data requested.
DAILY
Daily Resolution (4)
Daily Resolution (4)
Resolution
HOUR
Hour Resolution (3)
Hour Resolution (3)
Resolution
MINUTE
Minute Resolution (2)
Minute Resolution (2)
Resolution
SECOND
Second Resolution (1)
Second Resolution (1)
Resolution
TICK
Tick Resolution (0)
Tick Resolution (0)
Resolution
RestResponse
Base API response class for the QuantConnect API.
errors
List of errors with the API call.
List of errors with the API call.
List[str]
success
Indicate if the API request was successful.
Indicate if the API request was successful.
bool
RickshawMan
Rickshaw Man candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
RiseFallThreeMethods
Rising/Falling Three Methods candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
ScheduledEvent
Real time self scheduling event
enabled
Gets or sets whether this event is enabled
Gets or sets whether this event is enabled
bool
name
Gets an identifier for this event
Gets an identifier for this event
str
next_event_utc_time
Gets the next time this scheduled event will fire in UTC
Gets the next time this scheduled event will fire in UTC
datetime
ALGORITHM_END_OF_DAY_DELTA
Gets the default time before midnight end of day events will fire
Gets the default time before midnight end of day events will fire
timedelta
SECURITY_END_OF_DAY_DELTA
Gets the default time before market close end of trading day events will fire
Gets the default time before market close end of trading day events will fire
timedelta
Security
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
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(key, value)
Sets the LocalTimeKeeper to be used for this Security. This is the source of this instance's time.
- key (str)
- value (object)
set_buying_power_model(buying_power_model)
Sets the buying power model
- buying_power_model (IBuyingPowerModel)
set_buying_power_model(py_object)
Sets the buying power model
- py_object (PyObject)
set_data_filter(py_object)
Set Security Data Filter
- py_object (PyObject)
set_data_filter(data_filter)
Set Security Data Filter
- data_filter (ISecurityDataFilter)
set_fee_model(feel_model)
Sets the fee model
- feel_model (IFeeModel | PyObject)
set_fill_model(fill_model)
Sets the fill model
- fill_model (IFillModel | PyObject)
set_leverage(leverage)
Set the leverage parameter for this security
- 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.
- local_time_keeper (LocalTimeKeeper)
set_margin_interest_rate_model(margin_interest_rate_model)
Sets the margin interests rate model
- margin_interest_rate_model (IMarginInterestRateModel)
set_margin_interest_rate_model(py_object)
Sets the margin interests rate model
- py_object (PyObject)
set_margin_model(margin_model)
Sets the margin model
- margin_model (IBuyingPowerModel)
set_margin_model(py_object)
Sets the margin model
- py_object (PyObject)
set_market_price(data)
Update any security properties based on the latest market data and time
- data (BaseData)
set_settlement_model(settlement_model)
Sets the settlement model
- settlement_model (ISettlementModel | PyObject)
set_shortable_provider(py_object)
set_shortable_provider(shortable_provider)
set_slippage_model(slippage_model)
Sets the slippage model
- slippage_model (ISlippageModel | PyObject)
set_volatility_model(volatility_model)
Sets the volatility model
- 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
- data (List[BaseData])
- data_type (Type)
- contains_fill_forward_data (bool, optional)
ask_price
Gets the most recent ask price if available
Gets the most recent ask price if available
float
ask_size
Gets the most recent ask size if available
Gets the most recent ask size if available
float
bid_price
Gets the most recent bid price if available
Gets the most recent bid price if available
float
bid_size
Gets the most recent bid size if available
Gets the most recent bid size if available
float
buying_power_model
Gets the buying power model used for this security
Gets the buying power model used for this security
IBuyingPowerModel
cache
Data cache for the security to store previous price information.
Data cache for the security to store previous price information.
SecurityCache
close
If this uses tradebar data, return the most recent close.
If this uses tradebar data, return the most recent close.
float
data
Provides dynamic access to data in the cache
Provides dynamic access to data in the cache
object
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.
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.
ISecurityDataFilter
exchange
Exchange class contains the market opening hours, along with pre-post market hours.
Exchange class contains the market opening hours, along with pre-post market hours.
SecurityExchange
fee_model
Fee model used to compute order fees for this security
Fee model used to compute order fees for this security
IFeeModel
fill_model
Fill model used to produce fill events for this security
Fill model used to produce fill events for this security
IFillModel
fundamentals
Gets the fundamental data associated with the security if there is any, otherwise null.
Gets the fundamental data associated with the security if there is any, otherwise null.
Fundamental
has_data
There has been at least one datapoint since our algorithm started running for us to determine price.
There has been at least one datapoint since our algorithm started running for us to determine price.
bool
high
If this uses tradebar data, return the most recent high.
If this uses tradebar data, return the most recent high.
float
hold_stock
Read only property that checks if we currently own stock in the company.
Read only property that checks if we currently own stock in the company.
bool
holdings
Holdings class contains the portfolio, cash and processes order fills.
Holdings class contains the portfolio, cash and processes order fills.
SecurityHolding
invested
Alias for HoldStock - Do we have any of this security
Alias for HoldStock - Do we have any of this security
bool
is_delisted
True if the security has been delisted from exchanges and is no longer tradable
True if the security has been delisted from exchanges and is no longer tradable
bool
is_tradable
Gets or sets whether or not this security should be considered tradable
Gets or sets whether or not this security should be considered tradable
bool
item
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
Gets or sets the specified custom property through the indexer. This is a wrapper around the String) and Object) methods.
object
leverage
Leverage for this Security.
Leverage for this Security.
float
local_time
Local time for this market
Local time for this market
datetime
low
If this uses tradebar data, return the most recent low.
If this uses tradebar data, return the most recent low.
float
margin_interest_rate_model
Gets or sets the margin interest rate model
Gets or sets the margin interest rate model
IMarginInterestRateModel
margin_model
Gets the buying power model used for this security, an alias for BuyingPowerModel
Gets the buying power model used for this security, an alias for BuyingPowerModel
IBuyingPowerModel
open
If this uses tradebar data, return the most recent open.
If this uses tradebar data, return the most recent open.
float
open_interest
Access to the open interest of the security today
Access to the open interest of the security today
int
portfolio_model
Gets the portfolio model used by this security
Gets the portfolio model used by this security
ISecurityPortfolioModel
price
Get the current value of the security.
Get the current value of the security.
float
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.
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.
IPriceVariationModel
quote_currency
Gets the Cash object used for converting the quote currency to the account currency
Gets the Cash object used for converting the quote currency to the account currency
Cash
settlement_model
Gets the settlement model used for this security
Gets the settlement model used for this security
ISettlementModel
shortable_provider
This securities IShortableProvider
This securities IShortableProvider
IintableProvider
slippage_model
Slippage model use to compute slippage of market orders
Slippage model use to compute slippage of market orders
ISlippageModel
subscriptions
Gets all the subscriptions for this security
Gets all the subscriptions for this security
List[SubscriptionDataConfig]
symbol
symbol_properties
Gets the symbol properties for this security
Gets the symbol properties for this security
SymbolProperties
type
Type of the security.
Type of the security.
SecurityType
volatility_model
Gets the volatility model used for this security
Gets the volatility model used for this security
IVolatilityModel
volume
Access to the volume of the equity today
Access to the volume of the equity today
float
NULL_LEVERAGE
A null security leverage value
A null security leverage value
float
SecurityChanges
Defines the additions and subtractions to the algorithm's security subscriptions
added_securities
Gets the symbols that were added by universe selection
Gets the symbols that were added by universe selection
List[Security]
count
Gets the total count of added and removed securities
Gets the total count of added and removed securities
int
filter_custom_securities
True will filter out custom securities from the AddedSecurities and RemovedSecurities properties
True will filter out custom securities from the AddedSecurities and RemovedSecurities properties
bool
filter_internal_securities
True will filter out internal securities from the AddedSecurities and RemovedSecurities properties
True will filter out internal securities from the AddedSecurities and RemovedSecurities properties
bool
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
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
List[Security]
NONE
Gets an instance that represents no changes have been made
Gets an instance that represents no changes have been made
SecurityChanges
SecurityExchangeHours
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_first_daily_market_open(local_date_time, extended_market_hours)
Gets the local date time corresponding to the first market open to the specified previous date
- local_date_time (datetime)
- extended_market_hours (bool)
datetime
get_last_daily_market_close(local_date_time, extended_market_hours)
Gets the local date time corresponding to the last market close following the specified date
- local_date_time (datetime)
- extended_market_hours (bool)
datetime
get_market_hours(local_date_time)
Helper to access the market hours field based on the day of week
- local_date_time (datetime)
LocalMarketHours
get_next_market_close(local_date_time, extended_market_hours, last_close)
Gets the local date time corresponding to the next market close following the specified time
- local_date_time (datetime)
- extended_market_hours (bool)
- last_close (bool)
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
- local_date_time (datetime)
- extended_market_hours (bool)
datetime
get_next_trading_day(date)
Gets the next trading day
- date (datetime)
datetime
get_previous_market_open(local_date_time, extended_market_hours, first_open)
Gets the local date time corresponding to the previous market open to the specified time
- local_date_time (datetime)
- extended_market_hours (bool)
- first_open (bool)
datetime
get_previous_trading_day(local_date)
Gets the previous trading day
- local_date (datetime)
datetime
is_date_open(local_date_time, extended_market_hours=False)
Determines if the exchange will be open on the date specified by the local date time
- local_date_time (datetime)
- extended_market_hours (bool, optional)
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.
- start_local_date_time (datetime)
- end_local_date_time (datetime)
- extended_market_hours (bool)
bool
is_open(local_date_time, extended_market_hours)
Determines if the exchange is open at the specified local date time.
- local_date_time (datetime)
- extended_market_hours (bool)
bool
bank_holidays
Gets the bank holidays for the exchange
Gets the bank holidays for the exchange
HashSet[datetime]
early_closes
Gets the early closes for this exchange
Gets the early closes for this exchange
Dict[datetime, timedelta]
holidays
Gets the holidays for the exchange
Gets the holidays for the exchange
HashSet[datetime]
is_market_always_open
Checks whether the market is always open or not
Checks whether the market is always open or not
bool
late_opens
Gets the late opens for this exchange
Gets the late opens for this exchange
Dict[datetime, timedelta]
market_hours
Gets the market hours for this exchange
Gets the market hours for this exchange
Dict[DayOfWeek, LocalMarketHours]
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
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
timedelta
time_zone
Gets the time zone this exchange resides in
Gets the time zone this exchange resides in
datetimeZone
SecurityType
Type of tradable security / underlying asset
BASE
Base class for all security types (0)
Base class for all security types (0)
SecurityType
CFD
Contract For a Difference Security Type (6)
Contract For a Difference Security Type (6)
SecurityType
COMMODITY
Commodity Security Type (3)
Commodity Security Type (3)
SecurityType
CRYPTO
Cryptocurrency Security Type (7)
Cryptocurrency Security Type (7)
SecurityType
CRYPTO_FUTURE
Crypto Future Type (11)
Crypto Future Type (11)
SecurityType
EQUITY
US Equity Security (1)
US Equity Security (1)
SecurityType
FOREX
FOREX Security (4)
FOREX Security (4)
SecurityType
FUTURE
Future Security Type (5)
Future Security Type (5)
SecurityType
FUTURE_OPTION
Futures Options Security Type (8)
Futures Options Security Type (8)
SecurityType
INDEX
Index Security Type (9)
Index Security Type (9)
SecurityType
INDEX_OPTION
Index Option Security Type (10)
Index Option Security Type (10)
SecurityType
OPTION
Option Security Type (2)
Option Security Type (2)
SecurityType
SeparatingLines
Separating Lines candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
SeriesType
Available types of chart series
BAR
Bar chart (3)
Bar chart (3)
SeriesType
CANDLE
Charts (2)
Charts (2)
SeriesType
FLAG
Flag indicators (4)
Flag indicators (4)
SeriesType
HEATMAP
Heatmap Plot (9) -- NOTE: 8 is reserved
Heatmap Plot (9) -- NOTE: 8 is reserved
SeriesType
LINE
Line Plot for Value Types (0)
Line Plot for Value Types (0)
SeriesType
PIE
Pie chart (6)
Pie chart (6)
SeriesType
SCATTER
Scatter Plot for Chart Distinct Types (1)
Scatter Plot for Chart Distinct Types (1)
SeriesType
SCATTER_3D
Scatter 3D Plot (10)
Scatter 3D Plot (10)
SeriesType
STACKED_AREA
100% area chart showing relative proportions of series values at each time index (5)
100% area chart showing relative proportions of series values at each time index (5)
SeriesType
TREEMAP
Treemap Plot (7)
Treemap Plot (7)
SeriesType
ShootingStar
Shooting Star candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
ShortLineCandle
Short Line Candle candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Slice
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
- symbol (Symbol)
bool
copy()
Creates a shallow copy of the IExtendedDictionary.
PyDict
fromkeys(sequence, value)
Creates a new dictionary from the given sequence of elements.
- sequence (Symbol[])
- value (object)
PyDict
get()
Gets the DataDictionary for all data of the specified type
get(symbol)
get(symbol, value)
Returns the value for the specified Symbol if Symbol is in dictionary.
- symbol (Symbol)
- value (object)
Object
get(type)
Gets the DataDictionary for all data of the specified type
- type (Type)
Object
get_enumerator()
Returns an enumerator that iterates through the collection.
Dict[Symbol, BaseData]
items()
Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.
PyList
keys()
Returns a view object that displays a list of all the Symbol objects in the dictionary
PyList
merge_slice(input_slice)
pop(symbol, default_value)
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
- symbol (Symbol)
- default_value (object)
Object
popitem()
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
PyTuple
remove(symbol)
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.
- symbol (Symbol)
- default_value (object)
Object
try_get_value(symbol, data)
Gets the data associated with the specified symbol
- symbol (Symbol)
- data (Object&)
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.
- other (PyObject)
values()
Returns a view object that displays a list of all the values in the dictionary.
PyList
all_data
All the data hold in this slice
All the data hold in this slice
List[BaseData]
bars
Gets the TradeBars for this slice of data
Gets the TradeBars for this slice of data
TradeBars
count
Gets the number of symbols held in this slice
Gets the number of symbols held in this slice
int
delistings
Gets the Delistings for this slice of data
Gets the Delistings for this slice of data
Delistings
dividends
Gets the Dividends for this slice of data
Gets the Dividends for this slice of data
Dividends
future_chains
Gets the FuturesChains for this slice of data
Gets the FuturesChains for this slice of data
FuturesChains
futures_chains
Gets the FuturesChains for this slice of data
Gets the FuturesChains for this slice of data
FuturesChains
has_data
Gets whether or not this slice has data
Gets whether or not this slice has data
bool
is_read_only
Gets a value indicating whether the IDictionary object is read-only.
Gets a value indicating whether the IDictionary object is read-only.
bool
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.
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.
object
keys
Gets all the symbols in this slice
Gets all the symbols in this slice
List[Symbol]
margin_interest_rates
Gets the MarginInterestRates for this slice of data
Gets the MarginInterestRates for this slice of data
MarginInterestRates
option_chains
Gets the OptionChains for this slice of data
Gets the OptionChains for this slice of data
OptionChains
quote_bars
Gets the QuoteBars for this slice of data
Gets the QuoteBars for this slice of data
QuoteBars
splits
Gets the Splits for this slice of data
Gets the Splits for this slice of data
Splits
symbol_changed_events
Gets the SymbolChangedEvents for this slice of data
Gets the SymbolChangedEvents for this slice of data
SymbolChangedEvents
ticks
Gets the Ticks for this slice of data
Gets the Ticks for this slice of data
Ticks
time
Gets the timestamp for this slice of data
Gets the timestamp for this slice of data
datetime
utc_time
Gets the timestamp for this slice of data in UTC
Gets the timestamp for this slice of data in UTC
datetime
values
Gets a list of all the data in this slice
Gets a list of all the data in this slice
List[BaseData]
SpinningTop
Spinning Top candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Splits
Collection of splits keyed by Symbol
add(key, value)
add(item)
Adds an item to the ICollection.
- item (Dict[Symbol, Split])
clear()
Removes all keys and values from the IExtendedDictionary.
contains(item)
Determines whether the ICollection contains a specific value.
- item (Dict[Symbol, Split])
bool
contains_key(key)
Determines whether the IDictionary contains an element with the specified key.
- key (Symbol)
bool
copy()
Creates a shallow copy of the IExtendedDictionary.
PyDict
copy_to(array, array_index)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
- array (Dict)
- array_index (int)
fromkeys(sequence, value)
Creates a new dictionary from the given sequence of elements.
- sequence (Symbol[])
- value (Split)
PyDict
get(symbol, value)
Returns the value for the specified Symbol if Symbol is in dictionary.
- symbol (Symbol)
- value (Split)
Split
get_enumerator()
Returns an enumerator that iterates through the collection.
Dict[Symbol, Split]
get_value(key)
items()
Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.
PyList
keys()
Returns a view object that displays a list of all the Symbol objects in the dictionary
PyList
pop(symbol, default_value)
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
- symbol (Symbol)
- default_value (Split)
Split
popitem()
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
PyTuple
remove(item)
Removes the first occurrence of a specific object from the ICollection.
- item (Dict[Symbol, Split])
bool
remove(key)
Removes the first occurrence of a specific object from the ICollection.
- key (Symbol)
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.
- symbol (Symbol)
- default_value (Split)
Split
try_get_value(key, value)
Gets the value associated with the specified key.
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.
- other (PyObject)
values()
Returns a view object that displays a list of all the values in the dictionary.
PyList
count
Gets the number of elements contained in the ICollection.
Gets the number of elements contained in the ICollection.
int
is_read_only
Gets a value indicating whether the ICollection is read-only.
Gets a value indicating whether the ICollection is read-only.
bool
item
Gets or sets the Split with the specified ticker.
Gets or sets the Split with the specified ticker.
Split
keys
Gets an ICollection containing the keys of the IDictionary.
Gets an ICollection containing the keys of the IDictionary.
List[Symbol]
time
Gets or sets the time associated with this collection of data
Gets or sets the time associated with this collection of data
datetime
values
Gets an ICollection containing the values in the IDictionary.
Gets an ICollection containing the values in the IDictionary.
List[Split]
StalledPattern
Stalled Pattern candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
StickSandwich
Stick Sandwich candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
SubmitOrderRequest
Defines a request to submit a new order
set_response(response, status=3)
Sets the Response for this request
- response (OrderResponse)
- status (OrderRequestStatus, optional)
group_order_manager
Gets the manager for the combo order. If null, the order is not a combo order.
Gets the manager for the combo order. If null, the order is not a combo order.
GroupOrderManager
limit_price
Gets the limit price of the order, zero if not a limit order
Gets the limit price of the order, zero if not a limit order
float
order_id
Gets the order id the request acts on
Gets the order id the request acts on
int
order_properties
Gets the order properties for this request
Gets the order properties for this request
IOrderProperties
order_request_type
Gets Submit
Gets Submit
OrderRequestType
order_type
Gets the order type od the order
Gets the order type od the order
OrderType
quantity
Gets the quantity of the order
Gets the quantity of the order
float
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.
Gets the response for this request. If this request was never processed then this will equal Unprocessed. This value is never equal to null.
OrderResponse
security_type
Gets the security type of the symbol
Gets the security type of the symbol
SecurityType
status
Gets the status of this request
Gets the status of this request
OrderRequestStatus
stop_price
Gets the stop price of the order, zero if not a stop order
Gets the stop price of the order, zero if not a stop order
float
symbol
Gets the symbol to be traded
Gets the symbol to be traded
Symbol
tag
Gets a tag for this request
Gets a tag for this request
str
time
Gets the UTC time the request was created
Gets the UTC time the request was created
datetime
trailing_amount
Trailing amount for a trailing stop order
Trailing amount for a trailing stop order
float
trailing_as_percentage
Determines whether the TrailingAmount is a percentage or an absolute currency value
Determines whether the TrailingAmount is a percentage or an absolute currency value
bool
trigger_price
Price which must first be reached before a limit order can be submitted.
Price which must first be reached before a limit order can be submitted.
float
SwissArmyKnifeTool
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
BAND_PASS
BandPass Filter (4)
BandPass Filter (4)
SwissArmyKnifeTool
BUTTER
Two Pole Butterworth Filter (1)
Two Pole Butterworth Filter (1)
SwissArmyKnifeTool
GAUSS
Two Pole Gaussian Filter (0)
Two Pole Gaussian Filter (0)
SwissArmyKnifeTool
HIGH_PASS
High Pass Filter (2)
High Pass Filter (2)
SwissArmyKnifeTool
TWO_POLE_HIGH_PASS
Two Pole High Pass Filter (3)
Two Pole High Pass Filter (3)
SwissArmyKnifeTool
Symbol
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
bool
has_underlying_symbol(symbol)
Determines if the specified symbol is an underlying of this symbol instance
- symbol (Symbol)
bool
is_canonical()
Method returns true, if symbol is a derivative canonical symbol
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
- mapped_symbol (str)
- contract_depth_offset (int, optional)
canonical
Get's the canonical representation of this symbol
Get's the canonical representation of this symbol
Symbol
cik
The Central Index Key number (CIK) corresponding to this Symbol
The Central Index Key number (CIK) corresponding to this Symbol
int
composite_figi
The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol
The composite Financial Instrument Global Identifier (FIGI) corresponding to this Symbol
str
cusip
The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol
The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to this Symbol
str
has_underlying
Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property
Gets whether or not this Symbol is a derivative, that is, it has a valid Underlying property
bool
id
Gets the security identifier for this symbol
Gets the security identifier for this symbol
SecurityIdentifier
isin
The International Securities Identification Number (ISIN) corresponding to this Symbol
The International Securities Identification Number (ISIN) corresponding to this Symbol
str
security_type
Gets the security type of the symbol
Gets the security type of the symbol
SecurityType
sedol
The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol
The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to this Symbol
str
underlying
Gets the security underlying symbol, if any
Gets the security underlying symbol, if any
Symbol
value
Gets the current symbol for this ticker
Gets the current symbol for this ticker
str
EMPTY
Represents an unassigned symbol. This is intended to be used as an uninitialized, default value
Represents an unassigned symbol. This is intended to be used as an uninitialized, default value
Symbol
NONE
Represents no symbol. This is intended to be used when no symbol is explicitly intended
Represents no symbol. This is intended to be used when no symbol is explicitly intended
Symbol
SymbolChangedEvents
Collection of SymbolChangedEvent keyed by the original, requested symbol
add(key, value)
add(item)
Adds an item to the ICollection.
- item (Dict[Symbol, SymbolChangedEvent])
clear()
Removes all keys and values from the IExtendedDictionary.
contains(item)
Determines whether the ICollection contains a specific value.
- item (Dict[Symbol, SymbolChangedEvent])
bool
contains_key(key)
Determines whether the IDictionary contains an element with the specified key.
- key (Symbol)
bool
copy()
Creates a shallow copy of the IExtendedDictionary.
PyDict
copy_to(array, array_index)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
- array (Dict)
- array_index (int)
fromkeys(sequence, value)
Creates a new dictionary from the given sequence of elements.
- sequence (Symbol[])
- value (SymbolChangedEvent)
PyDict
get(symbol, value)
Returns the value for the specified Symbol if Symbol is in dictionary.
- symbol (Symbol)
- value (SymbolChangedEvent)
SymbolChangedEvent
get_enumerator()
Returns an enumerator that iterates through the collection.
Dict[Symbol, SymbolChangedEvent]
get_value(key)
Gets the value associated with the specified key.
- key (Symbol)
SymbolChangedEvent
items()
Returns a view object that displays a list of dictionary's (Symbol, value) tuple pairs.
PyList
keys()
Returns a view object that displays a list of all the Symbol objects in the dictionary
PyList
pop(symbol, default_value)
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
- symbol (Symbol)
- default_value (SymbolChangedEvent)
SymbolChangedEvent
popitem()
Returns and removes an arbitrary element (Symbol, value) pair from the dictionary.
PyTuple
remove(item)
Removes the first occurrence of a specific object from the ICollection.
- item (Dict[Symbol, SymbolChangedEvent])
bool
remove(key)
Removes the first occurrence of a specific object from the ICollection.
- key (Symbol)
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.
- symbol (Symbol)
- default_value (SymbolChangedEvent)
SymbolChangedEvent
try_get_value(key, value)
Gets the value associated with the specified key.
- key (Symbol)
- value (SymbolChangedEvent&)
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.
- other (PyObject)
values()
Returns a view object that displays a list of all the values in the dictionary.
PyList
count
Gets the number of elements contained in the ICollection.
Gets the number of elements contained in the ICollection.
int
is_read_only
Gets a value indicating whether the ICollection is read-only.
Gets a value indicating whether the ICollection is read-only.
bool
item
Gets or sets the SymbolChangedEvent with the specified ticker.
Gets or sets the SymbolChangedEvent with the specified ticker.
SymbolChangedEvent
keys
Gets an ICollection containing the keys of the IDictionary.
Gets an ICollection containing the keys of the IDictionary.
List[Symbol]
time
Gets or sets the time associated with this collection of data
Gets or sets the time associated with this collection of data
datetime
values
Gets an ICollection containing the values in the IDictionary.
Gets an ICollection containing the values in the IDictionary.
List[SymbolChangedEvent]
SymbolProperties
Represents common properties for a specific security, uniquely identified by market, symbol and security type
contract_multiplier
The contract multiplier for the security
The contract multiplier for the security
float
description
The description of the security
The description of the security
str
lot_size
The lot size (lot size of the order) for the security
The lot size (lot size of the order) for the security
float
market_ticker
The market ticker
The market ticker
str
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
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
float
minimum_price_variation
The minimum price variation (tick size) for the security
The minimum price variation (tick size) for the security
float
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').
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').
float
quote_currency
The quote currency of the security
The quote currency of the security
str
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)
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)
float
Takuri
Takuri (Dragonfly Doji with very long lower shadow) candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
TasukiGap
Tasuki Gap candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
ThreeBlackCrows
Three Black Crows candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
ThreeInside
Three Inside Up/Down candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
ThreeLineStrike
Three Line Strike candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
ThreeOutside
Three Outside Up/Down candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
ThreeStarsInSouth
Three Stars In The South candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
ThreeWhiteSoldiers
Three Advancing White Soldiers candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Thrusting
Thrusting candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
TradeBar
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
- fill_forward (bool)
BaseData
data_time_zone()
Specifies the data time zone for this data type. This is useful for custom data types
datetimeZone
default_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:
- config (SubscriptionDataConfig)
- date (datetime)
- is_live_mode (bool)
SubscriptionDataSource
is_sparse_data()
Indicates that the data set is expected to be sparse
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.
- config (SubscriptionDataConfig)
- line (str)
- date (datetime)
- is_live_mode (bool)
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.
- config (SubscriptionDataConfig)
- stream (StreamReader)
- date (datetime)
- is_live_mode (bool)
BaseData
requires_mapping()
Indicates if there is support for mapping
bool
should_cache_to_security()
Indicates whether this contains data that should be stored in the security cache
bool
supported_resolutions()
Gets the supported resolution for this data and security 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:
- 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
- ask_price (float)
- ask_size (float)
update_bid(bid_price, bid_size)
Updates this base data with the new quote bid information
- bid_price (float)
- bid_size (float)
update_quote(bid_price, bid_size, ask_price, ask_size)
Updates this base data with new quote information
- 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
- last_trade (float)
- trade_size (float)
close
Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.
Closing price of the TradeBar. Defined as the price at Start Time + TimeSpan.
float
data_type
Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
MarketDataType
end_time
The closing time of this bar, computed via the Time and Period
The closing time of this bar, computed via the Time and Period
datetime
high
High price of the TradeBar during the time period.
High price of the TradeBar during the time period.
float
is_fill_forward
True if this is a fill forward piece of data
True if this is a fill forward piece of data
bool
low
Low price of the TradeBar during the time period.
Low price of the TradeBar during the time period.
float
open
Opening price of the bar: Defined as the price at the start of the time period.
Opening price of the bar: Defined as the price at the start of the time period.
float
period
The period of this trade bar, (second, minute, daily, ect...)
The period of this trade bar, (second, minute, daily, ect...)
timedelta
price
As this is a backtesting platform we'll provide an alias of value as price.
As this is a backtesting platform we'll provide an alias of value as price.
float
symbol
Symbol representation for underlying Security
Symbol representation for underlying Security
Symbol
time
Current time marker of this data packet.
Current time marker of this data packet.
datetime
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.
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.
float
volume
Volume:
Volume:
float
Tristar
Tristar candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
TwoCrows
Two Crows candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
UniqueThreeRiver
Unique Three River candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
Universe
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
- utc_time (datetime)
- security (Security)
bool
contains_member(symbol)
Determines whether or not the specified symbol is currently a member of this universe
- symbol (Symbol)
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
- security (Security)
- current_time_utc (datetime)
- maximum_end_time_utc (datetime)
- subscription_service (ISubscriptionDataConfigService)
List[SubscriptionRequest]
perform_selection(utc_time, data)
Performs universe selection using the data specified
- utc_time (datetime)
- data (BaseDataCollection)
List[Symbol]
select_symbols(utc_time, data)
Performs universe selection using the data specified
- utc_time (datetime)
- data (BaseDataCollection)
List[Symbol]
asynchronous
True if this universe filter can run async in the data stack
True if this universe filter can run async in the data stack
bool
configuration
Gets the configuration used to get universe data
Gets the configuration used to get universe data
SubscriptionDataConfig
data_type
Gets the data type of this universe
Gets the data type of this universe
Type
dispose_requested
Flag indicating if disposal of this universe has been requested
Flag indicating if disposal of this universe has been requested
bool
market
Gets the market of this universe
Gets the market of this universe
str
members
Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.
Gets the current listing of members in this universe. Modifications to this dictionary do not change universe membership.
Dict[Symbol, Security]
securities
Gets the internal security collection used to define membership in this universe
Gets the internal security collection used to define membership in this universe
Dict[Symbol, Member]
security_type
Gets the security type of this universe
Gets the security type of this universe
SecurityType
selected
The currently selected symbol set
The currently selected symbol set
HashSet[Symbol]
symbol
Gets the symbol of this universe
Gets the symbol of this universe
Symbol
universe_settings
Gets the settings used for subscriptions added for this universe
Gets the settings used for subscriptions added for this universe
UniverseSettings
UNCHANGED
Gets a value indicating that no change to the universe should be made
Gets a value indicating that no change to the universe should be made
UnchangedUniverse
UniverseSettings
Defines settings required when adding a subscription
asynchronous
True if universe selection can run asynchronous
True if universe selection can run asynchronous
bool
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
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
int
data_mapping_mode
Defines how universe data is mapped together
Defines how universe data is mapped together
DataMappingMode
data_normalization_mode
Defines how universe data is normalized before being send into the algorithm
Defines how universe data is normalized before being send into the algorithm
DataNormalizationMode
extended_market_hours
True to allow extended market hours data, false otherwise
True to allow extended market hours data, false otherwise
bool
fill_forward
True to fill data forward, false otherwise
True to fill data forward, false otherwise
bool
leverage
The leverage to be used
The leverage to be used
float
minimum_time_in_universe
Defines the minimum amount of time a security must be in the universe before being removed.
Defines the minimum amount of time a security must be in the universe before being removed.
timedelta
resolution
The resolution to be used
The resolution to be used
Resolution
schedule
If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule
If configured, will be used to determine universe selection schedule and filter or skip selection data that does not fit the schedule
Schedule
subscription_data_types
Allows a universe to specify which data types to add for a selected symbol
Allows a universe to specify which data types to add for a selected symbol
List[Tuple[Type, TickType]]
UpDownGapThreeMethods
Up/Down Gap Three Methods candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
UpsideGapTwoCrows
Upside Gap Two Crows candlestick pattern
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
DoubleExponentialMovingAverage
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.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, for the indicator to be ready and fully initialized.
Required period, in data points, for the indicator to be ready and fully initialized.
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
LongLeggedDoji
Long Legged Doji candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]
ShortLineCandle
Short Line Candle candlestick pattern indicator
get_enumerator()
Returns an enumerator that iterates through the history window.
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}
str
update(time, value)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- time (datetime)
- value (float)
bool
update(input)
Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise
- input (IBaseData)
bool
consolidators
The data consolidators associated with this indicator if any
The data consolidators associated with this indicator if any
ISet[IDataConsolidator]
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.
Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
is_ready
Gets a flag indicating when this indicator is ready and fully initialized
Gets a flag indicating when this indicator is ready and fully initialized
bool
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.
Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.
IndicatorDataPoint
name
Gets a name for this indicator
Gets a name for this indicator
str
period
Gets the period of this window indicator
Gets the period of this window indicator
int
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.
Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.
IndicatorDataPoint
samples
Gets the number of samples processed by this indicator
Gets the number of samples processed by this indicator
int
warm_up_period
Required period, in data points, to the indicator to be ready and fully initialized
Required period, in data points, to the indicator to be ready and fully initialized
int
window
A rolling window keeping a history of the indicator values of a given period
A rolling window keeping a history of the indicator values of a given period
RollingWindow[IndicatorDataPoint]