Lean
$LEAN_TAG$
|
QC Algorithm Base Class - Handle the basic requirements of a trading algorithm, allowing user to focus on event methods. The QCAlgorithm class implements Portfolio, Securities, Transactions and Data Subscription Management. More...
Public Member Functions | |||
QCAlgorithm () | |||
QCAlgorithm Base Class Constructor - Initialize the underlying QCAlgorithm components. QCAlgorithm manages the transactions, portfolio, charting and security subscriptions for the users algorithms. More... | |||
virtual void | Initialize () | ||
Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized. More... | |||
virtual void | PostInitialize () | ||
Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method More... | |||
virtual void | OnWarmupFinished () | ||
Called when the algorithm has completed initialization and warm up. More... | |||
string | GetParameter (string name, string defaultValue=null) | ||
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 More... | |||
int | GetParameter (string name, int defaultValue) | ||
Gets the parameter with the specified name parsed as an integer. If a parameter with the specified name does not exist, or the conversion is not possible, the given default value is returned More... | |||
double | GetParameter (string name, double defaultValue) | ||
Gets the parameter with the specified name parsed as a double. If a parameter with the specified name does not exist, or the conversion is not possible, the given default value is returned More... | |||
decimal | GetParameter (string name, decimal defaultValue) | ||
Gets the parameter with the specified name parsed as a decimal. If a parameter with the specified name does not exist, or the conversion is not possible, the given default value is returned More... | |||
IReadOnlyDictionary< string, string > | GetParameters () | ||
Gets a read-only dictionary with all current parameters More... | |||
void | SetParameters (Dictionary< string, string > parameters) | ||
Sets the parameters from the dictionary More... | |||
void | SetAvailableDataTypes (Dictionary< SecurityType, List< TickType >> availableDataTypes) | ||
Set the available data feeds in the SecurityManager More... | |||
void | SetSecurityInitializer (ISecurityInitializer securityInitializer) | ||
Sets the security initializer, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities. More... | |||
void | SetSecurityInitializer (Action< Security, bool > securityInitializer) | ||
Sets the security initializer function, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities. More... | |||
void | SetSecurityInitializer (Action< Security > securityInitializer) | ||
Sets the security initializer function, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities. More... | |||
void | SetOptionChainProvider (IOptionChainProvider optionChainProvider) | ||
Sets the option chain provider, used to get the list of option contracts for an underlying symbol More... | |||
void | SetFutureChainProvider (IFutureChainProvider futureChainProvider) | ||
Sets the future chain provider, used to get the list of future contracts for an underlying symbol More... | |||
virtual void | OnData (Slice slice) | ||
Event - v3.0 DATA EVENT HANDLER: (Pattern) Basic template for user to override for receiving all subscription data in a single event More... | |||
virtual void | OnSplits (Splits splits) | ||
Event handler to be called when there's been a split event More... | |||
virtual void | OnDividends (Dividends dividends) | ||
Event handler to be called when there's been a dividend event More... | |||
virtual void | OnDelistings (Delistings delistings) | ||
Event handler to be called when there's been a delistings event More... | |||
virtual void | OnSymbolChangedEvents (SymbolChangedEvents symbolsChanged) | ||
Event handler to be called when there's been a symbol changed event More... | |||
virtual void | OnSecuritiesChanged (SecurityChanges changes) | ||
Event fired each time the we add/remove securities from the data feed More... | |||
virtual void | OnMarginCall (List< SubmitOrderRequest > requests) | ||
Margin call event handler. This method is called right before the margin call orders are placed in the market. More... | |||
virtual void | OnMarginCallWarning () | ||
Margin call warning event handler. This method is called when Portfolio.MarginRemaining is under 5% of your Portfolio.TotalPortfolioValue More... | |||
virtual void | OnEndOfDay () | ||
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). More... | |||
virtual void | OnEndOfDay (string symbol) | ||
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). More... | |||
virtual void | OnEndOfDay (Symbol symbol) | ||
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). More... | |||
virtual void | OnEndOfAlgorithm () | ||
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. More... | |||
virtual void | OnOrderEvent (OrderEvent orderEvent) | ||
Order fill event handler. On an order fill update the resulting information is passed to this method. More... | |||
virtual void | OnAssignmentOrderEvent (OrderEvent assignmentEvent) | ||
Option assignment event handler. On an option assignment event for short legs the resulting information is passed to this method. More... | |||
virtual void | OnBrokerageMessage (BrokerageMessageEvent messageEvent) | ||
Brokerage message event handler. This method is called for all types of brokerage messages. More... | |||
virtual void | OnBrokerageDisconnect () | ||
Brokerage disconnected event handler. This method is called when the brokerage connection is lost. More... | |||
virtual void | OnBrokerageReconnect () | ||
Brokerage reconnected event handler. This method is called when the brokerage connection is restored after a disconnection. More... | |||
void | SetDateTime (DateTime frontier) | ||
Update the internal algorithm time frontier. More... | |||
void | SetTimeZone (string timeZone) | ||
Sets the time zone of the Time property in the algorithm More... | |||
void | SetTimeZone (DateTimeZone timeZone) | ||
Sets the time zone of the Time property in the algorithm More... | |||
void | SetBrokerageModel (BrokerageName brokerage, AccountType accountType=AccountType.Margin) | ||
Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN More... | |||
void | SetBrokerageModel (IBrokerageModel model) | ||
Sets the brokerage to emulate in backtesting or paper trading. This can be used to set a custom brokerage model. More... | |||
void | SetBrokerageMessageHandler (IBrokerageMessageHandler handler) | ||
Sets the implementation used to handle messages from the brokerage. The default implementation will forward messages to debug or error and when a BrokerageMessageType.Error occurs, the algorithm is stopped. More... | |||
void | SetRiskFreeInterestRateModel (IRiskFreeInterestRateModel model) | ||
Sets the risk free interest rate model to be used in the algorithm More... | |||
void | SetBenchmark (SecurityType securityType, string symbol) | ||
Sets the benchmark used for computing statistics of the algorithm to the specified symbol More... | |||
void | SetBenchmark (string ticker) | ||
Sets the benchmark used for computing statistics of the algorithm to the specified ticker, defaulting to SecurityType.Equity if the ticker doesn't exist in the algorithm More... | |||
void | SetBenchmark (Symbol symbol) | ||
Sets the benchmark used for computing statistics of the algorithm to the specified symbol More... | |||
void | SetBenchmark (Func< DateTime, decimal > benchmark) | ||
Sets the specified function as the benchmark, this function provides the value of the benchmark at each date/time requested More... | |||
void | SetName (string name) | ||
Sets name to the currently running backtest More... | |||
void | AddTag (string tag) | ||
Adds a tag to the algorithm More... | |||
void | SetTags (HashSet< string > tags) | ||
Sets the tags for the algorithm More... | |||
void | SetAccountCurrency (string accountCurrency, decimal? startingCash=null) | ||
Sets the account currency cash symbol this algorithm is to manage, as well as the starting cash in this currency if given More... | |||
void | SetCash (double startingCash) | ||
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. More... | |||
void | SetCash (int startingCash) | ||
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. More... | |||
void | SetCash (decimal startingCash) | ||
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. More... | |||
void | SetCash (string symbol, decimal startingCash, decimal conversionRate=0) | ||
Set the cash for the specified symbol More... | |||
void | SetStartDate (int year, int month, int day) | ||
Set the start date for backtest. More... | |||
void | SetEndDate (int year, int month, int day) | ||
Set the end date for a backtest run More... | |||
void | SetAlgorithmId (string algorithmId) | ||
Set the algorithm id (backtestId or live deployId for the algorithm). More... | |||
void | SetStartDate (DateTime start) | ||
Set the start date for the backtest More... | |||
void | SetEndDate (DateTime end) | ||
Set the end date for a backtest. More... | |||
void | SetLocked () | ||
Lock the algorithm initialization to avoid user modifiying cash and data stream subscriptions More... | |||
bool | GetLocked () | ||
Gets whether or not this algorithm has been locked and fully initialized More... | |||
void | SetLiveMode (bool live) | ||
Set live mode state of the algorithm run: Public setter for the algorithm property LiveMode. More... | |||
void | SetAlgorithmMode (AlgorithmMode algorithmMode) | ||
Sets the algorithm running mode More... | |||
void | SetDeploymentTarget (DeploymentTarget deploymentTarget) | ||
Sets the algorithm deployment target More... | |||
void | SetTradeBuilder (ITradeBuilder tradeBuilder) | ||
Set the ITradeBuilder implementation to generate trades from executions and market price updates More... | |||
Security | AddSecurity (SecurityType securityType, string ticker, Resolution? resolution=null, bool fillForward=true, bool extendedMarketHours=false, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null) | ||
Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine. More... | |||
Security | AddSecurity (SecurityType securityType, string ticker, Resolution? resolution, bool fillForward, decimal leverage, bool extendedMarketHours, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null) | ||
Add specified data to required list. QC will funnel this data to the handle data routine. More... | |||
Security | AddSecurity (SecurityType securityType, string ticker, Resolution? resolution, string market, bool fillForward, decimal leverage, bool extendedMarketHours, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null) | ||
Set a required SecurityType-symbol and resolution for algorithm More... | |||
Security | AddSecurity (Symbol symbol, Resolution? resolution=null, bool fillForward=true, decimal leverage=Security.NullLeverage, bool extendedMarketHours=false, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int contractDepthOffset=0) | ||
Set a required SecurityType-symbol and resolution for algorithm More... | |||
Equity | AddEquity (string ticker, Resolution? resolution=null, string market=null, bool fillForward=true, decimal leverage=Security.NullLeverage, bool extendedMarketHours=false, DataNormalizationMode? dataNormalizationMode=null) | ||
Creates and adds a new Equity security to the algorithm More... | |||
Option | AddOption (string underlying, Resolution? resolution=null, string market=null, bool fillForward=true, decimal leverage=Security.NullLeverage) | ||
Creates and adds a new equity Option security to the algorithm More... | |||
Option | AddOption (Symbol underlying, Resolution? resolution=null, string market=null, bool fillForward=true, decimal leverage=Security.NullLeverage) | ||
Creates and adds a new Option security to the algorithm. This method can be used to add options with non-equity asset classes to the algorithm (e.g. Future Options). More... | |||
Option | AddOption (Symbol underlying, string targetOption, Resolution? resolution=null, string market=null, bool fillForward=true, decimal leverage=Security.NullLeverage) | ||
Creates and adds a new Option security to the algorithm. This method can be used to add options with non-equity asset classes to the algorithm (e.g. Future Options). More... | |||
Future | AddFuture (string ticker, Resolution? resolution=null, string market=null, bool fillForward=true, decimal leverage=Security.NullLeverage, bool extendedMarketHours=false, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int contractDepthOffset=0) | ||
Creates and adds a new Future security to the algorithm More... | |||
Future | AddFutureContract (Symbol symbol, Resolution? resolution=null, bool fillForward=true, decimal leverage=Security.NullLeverage, bool extendedMarketHours=false) | ||
Creates and adds a new single Future contract to the algorithm More... | |||
void | AddFutureOption (Symbol symbol, Func< OptionFilterUniverse, OptionFilterUniverse > optionFilter=null) | ||
Creates and adds a new Future Option contract to the algorithm. More... | |||
Option | AddFutureOptionContract (Symbol symbol, Resolution? resolution=null, bool fillForward=true, decimal leverage=Security.NullLeverage, bool extendedMarketHours=false) | ||
Adds a future option contract to the algorithm. More... | |||
IndexOption | AddIndexOption (string underlying, Resolution? resolution=null, string market=null, bool fillForward=true) | ||
Creates and adds index options to the algorithm. More... | |||
IndexOption | AddIndexOption (Symbol symbol, Resolution? resolution=null, bool fillForward=true) | ||
Creates and adds index options to the algorithm. More... | |||
IndexOption | AddIndexOption (Symbol symbol, string targetOption, Resolution? resolution=null, bool fillForward=true) | ||
Creates and adds index options to the algorithm. More... | |||
IndexOption | AddIndexOption (string underlying, string targetOption, Resolution? resolution=null, string market=null, bool fillForward=true) | ||
Creates and adds index options to the algorithm. More... | |||
IndexOption | AddIndexOptionContract (Symbol symbol, Resolution? resolution=null, bool fillForward=true) | ||
Adds an index option contract to the algorithm. More... | |||
Option | AddOptionContract (Symbol symbol, Resolution? resolution=null, bool fillForward=true, decimal leverage=Security.NullLeverage, bool extendedMarketHours=false) | ||
Creates and adds a new single Option contract to the algorithm More... | |||
Forex | AddForex (string ticker, Resolution? resolution=null, string market=null, bool fillForward=true, decimal leverage=Security.NullLeverage) | ||
Creates and adds a new Forex security to the algorithm More... | |||
Cfd | AddCfd (string ticker, Resolution? resolution=null, string market=null, bool fillForward=true, decimal leverage=Security.NullLeverage) | ||
Creates and adds a new Cfd security to the algorithm More... | |||
Index | AddIndex (string ticker, Resolution? resolution=null, string market=null, bool fillForward=true) | ||
Creates and adds a new Index security to the algorithm More... | |||
Crypto | AddCrypto (string ticker, Resolution? resolution=null, string market=null, bool fillForward=true, decimal leverage=Security.NullLeverage) | ||
Creates and adds a new Crypto security to the algorithm More... | |||
CryptoFuture | AddCryptoFuture (string ticker, Resolution? resolution=null, string market=null, bool fillForward=true, decimal leverage=Security.NullLeverage) | ||
Creates and adds a new CryptoFuture security to the algorithm More... | |||
bool | RemoveOptionContract (Symbol symbol) | ||
Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings More... | |||
bool | RemoveSecurity (Symbol symbol) | ||
Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings More... | |||
Security | AddData< T > (string ticker, Resolution? resolution=null) | ||
AddData
| |||
Security | AddData< T > (Symbol underlying, Resolution? resolution=null) | ||
AddData
| |||
Security | AddData< T > (string ticker, Resolution? resolution, bool fillForward, decimal leverage=1.0m) | ||
AddData
| |||
Security | AddData< T > (Symbol underlying, Resolution? resolution, bool fillForward, decimal leverage=1.0m) | ||
AddData
| |||
Security | AddData< T > (string ticker, Resolution? resolution, DateTimeZone timeZone, bool fillForward=false, decimal leverage=1.0m) | ||
AddData
| |||
Security | AddData< T > (Symbol underlying, Resolution? resolution, DateTimeZone timeZone, bool fillForward=false, decimal leverage=1.0m) | ||
AddData
| |||
Security | AddData< T > (string ticker, SymbolProperties properties, SecurityExchangeHours exchangeHours, Resolution? resolution=null, bool fillForward=false, decimal leverage=1.0m) | ||
AddData
| |||
void | Debug (string message) | ||
Send a debug message to the web console: More... | |||
void | Debug (int message) | ||
Send a debug message to the web console: More... | |||
void | Debug (double message) | ||
Send a debug message to the web console: More... | |||
void | Debug (decimal message) | ||
Send a debug message to the web console: More... | |||
void | Log (string message) | ||
Added another method for logging if user guessed. More... | |||
void | Log (int message) | ||
Added another method for logging if user guessed. More... | |||
void | Log (double message) | ||
Added another method for logging if user guessed. More... | |||
void | Log (decimal message) | ||
Added another method for logging if user guessed. More... | |||
void | Error (string message) | ||
Send a string error message to the Console. More... | |||
void | Error (int message) | ||
Send a int error message to the Console. More... | |||
void | Error (double message) | ||
Send a double error message to the Console. More... | |||
void | Error (decimal message) | ||
Send a decimal error message to the Console. More... | |||
void | Error (Exception error) | ||
Send a string error message to the Console. More... | |||
void | Quit (string message="") | ||
Terminate the algorithm after processing the current event handler. More... | |||
void | SetQuit (bool quit) | ||
Set the Quit flag property of the algorithm. More... | |||
Symbol | Symbol (string ticker) | ||
Converts the string 'ticker' symbol into a full Symbol object This requires that the string 'ticker' has been added to the algorithm More... | |||
string | Ticker (Symbol symbol) | ||
For the given symbol will resolve the ticker it used at the current algorithm date More... | |||
void | SetHistoryProvider (IHistoryProvider historyProvider) | ||
Set the historical data provider More... | |||
void | SetRunTimeError (Exception exception) | ||
Set the runtime error More... | |||
void | SetStatus (AlgorithmStatus status) | ||
Set the state of a live deployment More... | |||
string | Download (string address) | ||
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI. More... | |||
string | Download (string address, IEnumerable< KeyValuePair< string, string >> headers) | ||
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI. More... | |||
string | Download (string address, IEnumerable< KeyValuePair< string, string >> headers, string userName, string password) | ||
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI. More... | |||
ScheduledEvent | Train (Action trainingCode) | ||
Schedules the provided training code to execute immediately More... | |||
ScheduledEvent | Train (IDateRule dateRule, ITimeRule timeRule, Action trainingCode) | ||
Schedules the training code to run using the specified date and time rules More... | |||
void | SetCurrentSlice (Slice slice) | ||
Sets the current slice More... | |||
void | SetApi (IApi api) | ||
Provide the API for the algorithm. More... | |||
void | SetObjectStore (IObjectStore objectStore) | ||
Sets the object store More... | |||
bool | Shortable (Symbol symbol) | ||
Determines if the Symbol is shortable at the brokerage More... | |||
bool | Shortable (Symbol symbol, decimal shortQuantity, int? updateOrderId=null) | ||
Determines if the Symbol is shortable at the brokerage More... | |||
long | ShortableQuantity (Symbol symbol) | ||
Gets the quantity shortable for the given asset More... | |||
Symbol | ISIN (string isin, DateTime? tradingDate=null) | ||
Converts an ISIN identifier into a Symbol More... | |||
string | ISIN (Symbol symbol) | ||
Converts a Symbol into an ISIN identifier More... | |||
Symbol | CompositeFIGI (string compositeFigi, DateTime? tradingDate=null) | ||
Converts a composite FIGI identifier into a Symbol More... | |||
string | CompositeFIGI (Symbol symbol) | ||
Converts a Symbol into a composite FIGI identifier More... | |||
Symbol | CUSIP (string cusip, DateTime? tradingDate=null) | ||
Converts a CUSIP identifier into a Symbol More... | |||
string | CUSIP (Symbol symbol) | ||
Converts a Symbol into a CUSIP identifier More... | |||
Symbol | SEDOL (string sedol, DateTime? tradingDate=null) | ||
Converts a SEDOL identifier into a Symbol More... | |||
string | SEDOL (Symbol symbol) | ||
Converts a Symbol into a SEDOL identifier More... | |||
Symbol[] | CIK (int cik, DateTime? tradingDate=null) | ||
Converts a CIK identifier into Symbol array More... | |||
int? | CIK (Symbol symbol) | ||
Converts a Symbol into a CIK identifier More... | |||
Fundamental | Fundamentals (Symbol symbol) | ||
Get the fundamental data for the requested symbol at the current time More... | |||
List< Fundamental > | Fundamentals (List< Symbol > symbols) | ||
Get the fundamental data for the requested symbols at the current time More... | |||
OptionChain | OptionChain (Symbol symbol, bool flatten=false) | ||
Get the option chain for the specified symbol at the current time (Time) More... | |||
OptionChains | OptionChains (IEnumerable< Symbol > symbols, bool flatten=false) | ||
Get the option chains for the specified symbols at the current time (Time) More... | |||
string | Link (object command) | ||
Get an authenticated link to execute the given command instance More... | |||
void | AddCommand< T > () | ||
Register a command type to be used More... | |||
CommandResultPacket | RunCommand (CallbackCommand command) | ||
Run a callback command instance More... | |||
virtual ? bool | OnCommand (dynamic data) | ||
Generic untyped command call handler More... | |||
void | SetStatisticsService (IStatisticsService statisticsService) | ||
Sets the statistics service instance to be used by the algorithm More... | |||
void | FrameworkPostInitialize () | ||
Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method More... | |||
void | OnFrameworkData (Slice slice) | ||
Used to send data updates to algorithm framework models More... | |||
void | OnFrameworkSecuritiesChanged (SecurityChanges changes) | ||
Used to send security changes to algorithm framework models More... | |||
void | SetUniverseSelection (IUniverseSelectionModel universeSelection) | ||
Sets the universe selection model More... | |||
void | AddUniverseSelection (IUniverseSelectionModel universeSelection) | ||
Adds a new universe selection model More... | |||
void | SetAlpha (IAlphaModel alpha) | ||
Sets the alpha model More... | |||
void | AddAlpha (IAlphaModel alpha) | ||
Adds a new alpha model More... | |||
void | SetPortfolioConstruction (IPortfolioConstructionModel portfolioConstruction) | ||
Sets the portfolio construction model More... | |||
void | SetExecution (IExecutionModel execution) | ||
Sets the execution model More... | |||
void | SetRiskManagement (IRiskManagementModel riskManagement) | ||
Sets the risk management model More... | |||
void | AddRiskManagement (IRiskManagementModel riskManagement) | ||
Adds a new risk management model More... | |||
void | EmitInsights (params Insight[] insights) | ||
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. More... | |||
void | EmitInsights (Insight insight) | ||
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. More... | |||
void | SetAlpha (PyObject alpha) | ||
Sets the alpha model More... | |||
void | AddAlpha (PyObject alpha) | ||
Adds a new alpha model More... | |||
void | SetExecution (PyObject execution) | ||
Sets the execution model More... | |||
void | SetPortfolioConstruction (PyObject portfolioConstruction) | ||
Sets the portfolio construction model More... | |||
void | SetUniverseSelection (PyObject universeSelection) | ||
Sets the universe selection model More... | |||
void | AddUniverseSelection (PyObject universeSelection) | ||
Adds a new universe selection model More... | |||
void | SetRiskManagement (PyObject riskManagement) | ||
Sets the risk management model More... | |||
void | AddRiskManagement (PyObject riskManagement) | ||
Adds a new risk management model More... | |||
void | SetWarmup (TimeSpan timeSpan) | ||
Sets the warm up period to the specified value More... | |||
void | SetWarmUp (TimeSpan timeSpan) | ||
Sets the warm up period to the specified value More... | |||
void | SetWarmup (TimeSpan timeSpan, Resolution? resolution) | ||
Sets the warm up period to the specified value More... | |||
void | SetWarmUp (TimeSpan timeSpan, Resolution? resolution) | ||
Sets the warm up period to the specified value More... | |||
void | SetWarmup (int barCount) | ||
Sets the warm up period by resolving a start date that would send that amount of data into the algorithm. The highest (smallest) resolution in the securities collection will be used. For example, if an algorithm has minute and daily data and 200 bars are requested, that would use 200 minute bars. More... | |||
void | SetWarmUp (int barCount) | ||
Sets the warm up period by resolving a start date that would send that amount of data into the algorithm. The highest (smallest) resolution in the securities collection will be used. For example, if an algorithm has minute and daily data and 200 bars are requested, that would use 200 minute bars. More... | |||
void | SetWarmup (int barCount, Resolution? resolution) | ||
Sets the warm up period by resolving a start date that would send that amount of data into the algorithm. More... | |||
void | SetWarmUp (int barCount, Resolution? resolution) | ||
Sets the warm up period by resolving a start date that would send that amount of data into the algorithm. More... | |||
void | SetFinishedWarmingUp () | ||
Sets IAlgorithm.IsWarmingUp to false to indicate this algorithm has finished its warm up More... | |||
IEnumerable< Slice > | History (TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
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. More... | |||
IEnumerable< Slice > | History (int periods, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
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. More... | |||
IEnumerable< BaseDataCollection > | History (Universe universe, int periods, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
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. More... | |||
IEnumerable< BaseDataCollection > | History (Universe universe, TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for all symbols of the requested type over the requested span. The symbol's configured values for resolution and fill forward behavior will be used The symbols must exist in the Securities collection. More... | |||
IEnumerable< BaseDataCollection > | History (Universe universe, DateTime start, DateTime end, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection. More... | |||
IEnumerable< DataDictionary< T > > | History< T > (TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for all symbols of the requested type over the requested span. The symbol's configured values for resolution and fill forward behavior will be used The symbols must exist in the Securities collection. More... | |||
IEnumerable< DataDictionary< T > > | History< T > (IEnumerable< Symbol > symbols, TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbols over the requested span. The symbols must exist in the Securities collection. More... | |||
IEnumerable< DataDictionary< T > > | History< T > (IEnumerable< Symbol > symbols, int periods, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbols. The exact number of bars will be returned for each symbol. This may result in some data start earlier/later than others due to when various exchanges are open. The symbols must exist in the Securities collection. More... | |||
IEnumerable< DataDictionary< T > > | History< T > (IEnumerable< Symbol > symbols, DateTime start, DateTime end, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection. More... | |||
IEnumerable< T > | History< T > (Symbol symbol, TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbol over the request span. The symbol must exist in the Securities collection. More... | |||
IEnumerable< TradeBar > | History (Symbol symbol, int periods, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IEnumerable< T > | History< T > (Symbol symbol, int periods, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IEnumerable< T > | History< T > (Symbol symbol, DateTime start, DateTime end, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbol between the specified dates. The symbol must exist in the Securities collection. More... | |||
IEnumerable< TradeBar > | History (Symbol symbol, TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbol over the request span. The symbol must exist in the Securities collection. More... | |||
IEnumerable< TradeBar > | History (Symbol symbol, DateTime start, DateTime end, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbol over the request span. The symbol must exist in the Securities collection. More... | |||
IEnumerable< Slice > | History (IEnumerable< Symbol > symbols, TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbols over the requested span. The symbol's configured values for resolution and fill forward behavior will be used The symbols must exist in the Securities collection. More... | |||
IEnumerable< Slice > | History (IEnumerable< Symbol > symbols, int periods, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbols. The exact number of bars will be returned for each symbol. This may result in some data start earlier/later than others due to when various exchanges are open. The symbols must exist in the Securities collection. More... | |||
IEnumerable< Slice > | History (IEnumerable< Symbol > symbols, DateTime start, DateTime end, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) | ||
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection. More... | |||
IEnumerable< Slice > | History (HistoryRequest request) | ||
Executes the specified history request More... | |||
IEnumerable< Slice > | History (IEnumerable< HistoryRequest > requests) | ||
Executes the specified history requests More... | |||
IEnumerable< BaseData > | GetLastKnownPrices (Security security) | ||
Yields data to warmup a security for all it's subscribed data types More... | |||
IEnumerable< BaseData > | GetLastKnownPrices (Symbol symbol) | ||
Yields data to warmup a security for all it's subscribed data types More... | |||
BaseData | GetLastKnownPrice (Security security) | ||
Get the last known price using the history provider. Useful for seeding securities with the correct price More... | |||
AccelerationBands | ABANDS (Symbol symbol, int period, decimal width=4, MovingAverageType movingAverageType=MovingAverageType.Simple, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new Acceleration Bands indicator. More... | |||
AccumulationDistribution | AD (Symbol symbol, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new AccumulationDistribution indicator. More... | |||
AccumulationDistributionOscillator | ADOSC (Symbol symbol, int fastPeriod, int slowPeriod, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new AccumulationDistributionOscillator indicator. More... | |||
Alpha | A (Symbol target, Symbol reference, int alphaPeriod=1, int betaPeriod=252, Resolution? resolution=null, decimal? riskFreeRate=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a Alpha indicator for the given target symbol in relation with the reference used. The indicator will be automatically updated on the given resolution. More... | |||
AverageRange | AR (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new Average Range (AR) indicator. More... | |||
AutoRegressiveIntegratedMovingAverage | ARIMA (Symbol symbol, int arOrder, int diffOrder, int maOrder, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new ARIMA indicator. More... | |||
AverageDirectionalIndex | ADX (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new Average Directional Index indicator. The indicator will be automatically updated on the given resolution. More... | |||
AwesomeOscillator | AO (Symbol symbol, int fastPeriod, int slowPeriod, MovingAverageType type, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new Awesome Oscillator from the specified periods. More... | |||
AverageDirectionalMovementIndexRating | ADXR (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new AverageDirectionalMovementIndexRating indicator. More... | |||
ArnaudLegouxMovingAverage | ALMA (Symbol symbol, int period, int sigma=6, decimal offset=0.85m, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new ArnaudLegouxMovingAverage indicator. More... | |||
AbsolutePriceOscillator | APO (Symbol symbol, int fastPeriod, int slowPeriod, MovingAverageType movingAverageType, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new AbsolutePriceOscillator indicator. More... | |||
AroonOscillator | AROON (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta) More... | |||
AroonOscillator | AROON (Symbol symbol, int upPeriod, int downPeriod, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta) More... | |||
AverageTrueRange | ATR (Symbol symbol, int period, MovingAverageType type=MovingAverageType.Simple, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new AverageTrueRange indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
AugenPriceSpike | APS (Symbol symbol, int period=3, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates an AugenPriceSpike indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
BollingerBands | BB (Symbol symbol, int period, decimal k, MovingAverageType movingAverageType=MovingAverageType.Simple, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation More... | |||
Beta | B (Symbol target, Symbol reference, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a Beta indicator for the given target symbol in relation with the reference used. The indicator will be automatically updated on the given resolution. More... | |||
BalanceOfPower | BOP (Symbol symbol, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new Balance Of Power indicator. The indicator will be automatically updated on the given resolution. More... | |||
CoppockCurve | CC (Symbol symbol, int shortRocPeriod=11, int longRocPeriod=14, int lwmaPeriod=10, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Initializes a new instance of the CoppockCurve indicator More... | |||
Correlation | C (Symbol target, Symbol reference, int period, CorrelationType correlationType=CorrelationType.Pearson, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a Correlation indicator for the given target symbol in relation with the reference used. The indicator will be automatically updated on the given resolution. More... | |||
CommodityChannelIndex | CCI (Symbol symbol, int period, MovingAverageType movingAverageType=MovingAverageType.Simple, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new CommodityChannelIndex indicator. The indicator will be automatically updated on the given resolution. More... | |||
ChoppinessIndex | CHOP (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new ChoppinessIndex indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
ChandeKrollStop | CKS (Symbol symbol, int atrPeriod, decimal atrMult, int period, MovingAverageType movingAverageType=MovingAverageType.Wilders, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
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. More... | |||
ChaikinMoneyFlow | CMF (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new ChaikinMoneyFlow indicator. More... | |||
ChandeMomentumOscillator | CMO (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new ChandeMomentumOscillator indicator. More... | |||
DeMarkerIndicator | DEM (Symbol symbol, int period, MovingAverageType type, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
DonchianChannel | DCH (Symbol symbol, int upperPeriod, int lowerPeriod, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
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. More... | |||
DonchianChannel | DCH (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Overload shorthand to create a new symmetric Donchian Channel indicator which has the upper and lower channels set to the same period length. More... | |||
Delta | D (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType? optionModel=null, OptionPricingModelType? ivModel=null, Resolution? resolution=null) | ||
Creates a new Delta indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
Delta | Δ (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, OptionPricingModelType? ivModel=null, Resolution? resolution=null) | ||
Creates a new Delta indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
DoubleExponentialMovingAverage | DEMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new DoubleExponentialMovingAverage indicator. More... | |||
DerivativeOscillator | DO (Symbol symbol, int rsiPeriod, int smoothingRsiPeriod, int doubleSmoothingRsiPeriod, int signalLinePeriod, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new DerivativeOscillator indicator. More... | |||
DetrendedPriceOscillator | DPO (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new DetrendedPriceOscillator indicator. More... | |||
ExponentialMovingAverage | EMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
ExponentialMovingAverage | EMA (Symbol symbol, int period, decimal smoothingFactor, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
EaseOfMovementValue | EMV (Symbol symbol, int period=1, int scale=10000, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates an EaseOfMovementValue indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
FilteredIdentity | FilteredIdentity (Symbol symbol, Func< IBaseData, IBaseDataBar > selector=null, Func< IBaseData, bool > filter=null, string fieldName=null) | ||
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
FilteredIdentity | FilteredIdentity (Symbol symbol, Resolution resolution, Func< IBaseData, IBaseDataBar > selector=null, Func< IBaseData, bool > filter=null, string fieldName=null) | ||
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
FilteredIdentity | FilteredIdentity (Symbol symbol, TimeSpan resolution, Func< IBaseData, IBaseDataBar > selector=null, Func< IBaseData, bool > filter=null, string fieldName=null) | ||
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
ForceIndex | FI (Symbol symbol, int period, MovingAverageType type=MovingAverageType.Exponential, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new ForceIndex indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
FisherTransform | FISH (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates an FisherTransform indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
FractalAdaptiveMovingAverage | FRAMA (Symbol symbol, int period, int longPeriod=198, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates an FractalAdaptiveMovingAverage (FRAMA) indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
Gamma | G (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType? optionModel=null, OptionPricingModelType? ivModel=null, Resolution? resolution=null) | ||
Creates a new Gamma indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
Gamma | Γ (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, OptionPricingModelType? ivModel=null, Resolution? resolution=null) | ||
Creates a new Gamma indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
HeikinAshi | HeikinAshi (Symbol symbol, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new Heikin-Ashi indicator. More... | |||
HurstExponent | HE (Symbol symbol, int period, int maxLag=20, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
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. More... | |||
HilbertTransform | HT (Symbol symbol, int length, decimal inPhaseMultiplicationFactor, decimal quadratureMultiplicationFactor, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Hilbert Transform indicator More... | |||
HullMovingAverage | HMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new HullMovingAverage indicator. The Hull moving average is a series of nested weighted moving averages, is fast and smooth. More... | |||
InternalBarStrength | IBS (Symbol symbol, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new InternalBarStrength indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
IchimokuKinkoHyo | ICHIMOKU (Symbol symbol, int tenkanPeriod, int kijunPeriod, int senkouAPeriod, int senkouBPeriod, int senkouADelayPeriod, int senkouBDelayPeriod, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
Identity | Identity (Symbol symbol, Func< IBaseData, decimal > selector=null, string fieldName=null) | ||
Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
Identity | Identity (Symbol symbol, Resolution resolution, Func< IBaseData, decimal > selector=null, string fieldName=null) | ||
Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
Identity | Identity (Symbol symbol, TimeSpan resolution, Func< IBaseData, decimal > selector=null, string fieldName=null) | ||
Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
ImpliedVolatility | IV (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType? optionModel=null, Resolution? resolution=null) | ||
Creates a new ImpliedVolatility indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
KaufmanAdaptiveMovingAverage | KAMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new KaufmanAdaptiveMovingAverage indicator. More... | |||
KaufmanAdaptiveMovingAverage | KAMA (Symbol symbol, int period, int fastEmaPeriod, int slowEmaPeriod, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new KaufmanAdaptiveMovingAverage indicator. More... | |||
KaufmanEfficiencyRatio | KER (Symbol symbol, int period=2, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates an KaufmanEfficiencyRatio indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
KeltnerChannels | KCH (Symbol symbol, int period, decimal k, MovingAverageType movingAverageType=MovingAverageType.Simple, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new Keltner Channels indicator. The indicator will be automatically updated on the given resolution. More... | |||
LogReturn | LOGR (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new LogReturn indicator. More... | |||
LeastSquaresMovingAverage | LSMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates and registers a new Least Squares Moving Average instance. More... | |||
LinearWeightedMovingAverage | LWMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new LinearWeightedMovingAverage indicator. This indicator will linearly distribute the weights across the periods. More... | |||
MovingAverageConvergenceDivergence | MACD (Symbol symbol, int fastPeriod, int slowPeriod, int signalPeriod, MovingAverageType type=MovingAverageType.Exponential, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a MACD indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
MeanAbsoluteDeviation | MAD (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new MeanAbsoluteDeviation indicator. More... | |||
MesaAdaptiveMovingAverage | MAMA (Symbol symbol, decimal fastLimit=0.5m, decimal slowLimit=0.05m, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
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. More... | |||
VolumeProfile | VP (Symbol symbol, int period=2, decimal valueAreaVolumePercentage=0.70m, decimal priceRangeRoundOff=0.05m, Resolution resolution=Resolution.Daily, Func< IBaseData, TradeBar > selector=null) | ||
Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution. More... | |||
TimeProfile | TP (Symbol symbol, int period=2, decimal valueAreaVolumePercentage=0.70m, decimal priceRangeRoundOff=0.05m, Resolution resolution=Resolution.Daily, Func< IBaseData, TradeBar > selector=null) | ||
Creates an Market Profile indicator for the symbol with Time Price Opportunity (TPO) mode. The indicator will be automatically updated on the given resolution. More... | |||
TimeSeriesForecast | TSF (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Time Series Forecast indicator More... | |||
Maximum | MAX (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Maximum indicator to compute the maximum value More... | |||
MoneyFlowIndex | MFI (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new MoneyFlowIndex indicator. The indicator will be automatically updated on the given resolution. More... | |||
MassIndex | MASS (Symbol symbol, int emaPeriod=9, int sumPeriod=25, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new Mass Index indicator. The indicator will be automatically updated on the given resolution. More... | |||
MidPoint | MIDPOINT (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new MidPoint indicator. More... | |||
MidPrice | MIDPRICE (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new MidPrice indicator. More... | |||
Minimum | MIN (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Minimum indicator to compute the minimum value More... | |||
Momentum | MOM (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
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. More... | |||
MomersionIndicator | MOMERSION (Symbol symbol, int? minPeriod, int fullPeriod, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Momersion indicator. More... | |||
MomentumPercent | MOMP (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
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. More... | |||
NormalizedAverageTrueRange | NATR (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new NormalizedAverageTrueRange indicator. More... | |||
OnBalanceVolume | OBV (Symbol symbol, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
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. More... | |||
PivotPointsHighLow | PPHL (Symbol symbol, int lengthHigh, int lengthLow, int lastStoredValues=100, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new PivotPointsHighLow indicator More... | |||
PercentagePriceOscillator | PPO (Symbol symbol, int fastPeriod, int slowPeriod, MovingAverageType movingAverageType, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new PercentagePriceOscillator indicator. More... | |||
ParabolicStopAndReverse | PSAR (Symbol symbol, decimal afStart=0.02m, decimal afIncrement=0.02m, decimal afMax=0.2m, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new Parabolic SAR indicator More... | |||
RegressionChannel | RC (Symbol symbol, int period, decimal k, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new RegressionChannel indicator which will compute the LinearRegression, UpperChannel and LowerChannel lines, the intercept and slope More... | |||
RelativeMovingAverage | RMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Relative Moving Average indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
RateOfChange | ROC (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
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. More... | |||
RateOfChangePercent | ROCP (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
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. More... | |||
RateOfChangeRatio | ROCR (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new RateOfChangeRatio indicator. More... | |||
RelativeStrengthIndex | RSI (Symbol symbol, int period, MovingAverageType movingAverageType=MovingAverageType.Wilders, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
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. More... | |||
RelativeVigorIndex | RVI (Symbol symbol, int period, MovingAverageType movingAverageType=MovingAverageType.Simple, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new RelativeVigorIndex indicator. More... | |||
RelativeDailyVolume | RDV (Symbol symbol, int period=2, Resolution resolution=Resolution.Daily, Func< IBaseData, TradeBar > selector=null) | ||
Creates an RelativeDailyVolume indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
Rho | R (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType? optionModel=null, OptionPricingModelType? ivModel=null, Resolution? resolution=null) | ||
Creates a new Rho indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
Rho | ρ (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, OptionPricingModelType? ivModel=null, Resolution? resolution=null) | ||
Creates a new Rho indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
StochasticRelativeStrengthIndex | SRSI (Symbol symbol, int rsiPeriod, int stochPeriod, int kSmoothingPeriod, int dSmoothingPeriod, MovingAverageType movingAverageType=MovingAverageType.Simple, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Stochastic RSI indicator which will compute the K and D More... | |||
SuperTrend | STR (Symbol symbol, int period, decimal multiplier, MovingAverageType movingAverageType=MovingAverageType.Wilders, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new SuperTrend indicator. More... | |||
SharpeRatio | SR (Symbol symbol, int sharpePeriod, decimal? riskFreeRate=null, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new SharpeRatio indicator. More... | |||
SortinoRatio | SORTINO (Symbol symbol, int sortinoPeriod, double minimumAcceptableReturn=0.0, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Sortino indicator. More... | |||
SqueezeMomentum | SM (Symbol symbol, int bollingerPeriod=20, decimal bollingerMultiplier=2m, int keltnerPeriod=20, decimal keltnerMultiplier=1.5m, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
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. More... | |||
SimpleMovingAverage | SMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates an SimpleMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
SchaffTrendCycle | STC (Symbol symbol, int cyclePeriod, int fastPeriod, int slowPeriod, MovingAverageType movingAverageType=MovingAverageType.Exponential, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Schaff Trend Cycle indicator More... | |||
SmoothedOnBalanceVolume | SOBV (Symbol symbol, int period, MovingAverageType type=MovingAverageType.Simple, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new SmoothedOnBalanceVolume indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
StandardDeviation | STD (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new StandardDeviation indicator. This will return the population standard deviation of samples over the specified period. More... | |||
TargetDownsideDeviation | TDD (Symbol symbol, int period, double minimumAcceptableReturn=0, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
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. More... | |||
Stochastic | STO (Symbol symbol, int period, int kPeriod, int dPeriod, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new Stochastic indicator. More... | |||
Stochastic | STO (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Overload short hand to create a new Stochastic indicator; defaulting to the 3 period for dStoch More... | |||
PremierStochasticOscillator | PSO (Symbol symbol, int period, int emaPeriod, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new instance of the Premier Stochastic Oscillator for the specified symbol. More... | |||
Sum | SUM (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Sum indicator. More... | |||
SwissArmyKnife | SWISS (Symbol symbol, int period, double delta, SwissArmyKnifeTool tool, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates Swiss Army Knife transformation for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
Theta | T (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType? optionModel=null, OptionPricingModelType? ivModel=null, Resolution? resolution=null) | ||
Creates a new Theta indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
Theta | Θ (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, OptionPricingModelType? ivModel=null, Resolution? resolution=null) | ||
Creates a new Theta indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
T3MovingAverage | T3 (Symbol symbol, int period, decimal volumeFactor=0.7m, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new T3MovingAverage indicator. More... | |||
TripleExponentialMovingAverage | TEMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new TripleExponentialMovingAverage indicator. More... | |||
TrueStrengthIndex | TSI (Symbol symbol, int longTermPeriod=25, int shortTermPeriod=13, int signalPeriod=7, MovingAverageType signalType=MovingAverageType.Exponential, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a TrueStrengthIndex indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
TrueRange | TR (Symbol symbol, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new TrueRange indicator. More... | |||
TriangularMovingAverage | TRIMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new TriangularMovingAverage indicator. More... | |||
Trix | TRIX (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Trix indicator. More... | |||
UltimateOscillator | ULTOSC (Symbol symbol, int period1, int period2, int period3, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new UltimateOscillator indicator. More... | |||
Vega | V (Symbol symbol, Symbol mirrorOption=null, decimal? riskFreeRate=null, decimal? dividendYield=null, OptionPricingModelType? optionModel=null, OptionPricingModelType? ivModel=null, Resolution? resolution=null) | ||
Creates a new Vega indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
VariableIndexDynamicAverage | VIDYA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Chande's Variable Index Dynamic Average indicator. More... | |||
Variance | VAR (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Variance indicator. This will return the population variance of samples over the specified period. More... | |||
Variance | V (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new Variance indicator. This will return the population variance of samples over the specified period. More... | |||
ValueAtRisk | VAR (Symbol symbol, int period, double confidenceLevel, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new ValueAtRisk indicator. More... | |||
VolumeWeightedAveragePriceIndicator | VWAP (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
IntradayVwap | VWAP (Symbol symbol) | ||
Creates the canonical VWAP indicator that resets each day. The indicator will be automatically updated on the security's configured resolution. More... | |||
VolumeWeightedMovingAverage | VWMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new VolumeWeightedMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
Vortex | VTX (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new Vortex indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
WilliamsPercentR | WILR (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
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. More... | |||
WilderMovingAverage | WWMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a WilderMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
WilderSwingIndex | SI (Symbol symbol, decimal limitMove, Resolution? resolution=Resolution.Daily, Func< IBaseData, TradeBar > selector=null) | ||
Creates a Wilder Swing Index (SI) indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
WilderAccumulativeSwingIndex | ASI (Symbol symbol, decimal limitMove, Resolution? resolution=Resolution.Daily, Func< IBaseData, TradeBar > selector=null) | ||
Creates a Wilder Accumulative Swing Index (ASI) indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
ArmsIndex | TRIN (IEnumerable< Symbol > symbols, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new Arms Index indicator More... | |||
ArmsIndex | TRIN (Symbol[] symbols, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new Arms Index indicator More... | |||
AdvanceDeclineRatio | ADR (IEnumerable< Symbol > symbols, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new Advance/Decline Ratio indicator More... | |||
AdvanceDeclineVolumeRatio | ADVR (IEnumerable< Symbol > symbols, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new Advance/Decline Volume Ratio indicator More... | |||
AdvanceDeclineDifference | ADDIFF (IEnumerable< Symbol > symbols, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new Advance/Decline Difference indicator More... | |||
McGinleyDynamic | MGD (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a new McGinley Dynamic indicator More... | |||
McClellanOscillator | MOSC (IEnumerable< Symbol > symbols, int fastPeriod=19, int slowPeriod=39, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new McClellan Oscillator indicator More... | |||
McClellanOscillator | MOSC (Symbol[] symbols, int fastPeriod=19, int slowPeriod=39, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new McClellan Oscillator indicator More... | |||
McClellanSummationIndex | MSI (IEnumerable< Symbol > symbols, int fastPeriod=19, int slowPeriod=39, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new McClellan Summation Index indicator More... | |||
McClellanSummationIndex | MSI (Symbol[] symbols, int fastPeriod=19, int slowPeriod=39, Resolution? resolution=null, Func< IBaseData, TradeBar > selector=null) | ||
Creates a new McClellan Summation Index indicator More... | |||
RogersSatchellVolatility | RSV (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, IBaseDataBar > selector=null) | ||
Creates a new RogersSatchellVolatility indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
ZeroLagExponentialMovingAverage | ZLEMA (Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Creates a ZeroLagExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution. More... | |||
string | CreateIndicatorName (Symbol symbol, FormattableString type, Resolution? resolution) | ||
Creates a new name for an indicator created with the convenience functions (SMA, EMA, ect...) More... | |||
string | CreateIndicatorName (Symbol symbol, string type, Resolution? resolution) | ||
Creates a new name for an indicator created with the convenience functions (SMA, EMA, ect...) More... | |||
void | RegisterIndicator (Symbol symbol, IndicatorBase< IndicatorDataPoint > indicator, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
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. More... | |||
void | RegisterIndicator (Symbol symbol, IndicatorBase< IndicatorDataPoint > indicator, TimeSpan? resolution=null, Func< IBaseData, decimal > selector=null) | ||
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. More... | |||
void | RegisterIndicator (Symbol symbol, IndicatorBase< IndicatorDataPoint > indicator, IDataConsolidator consolidator, Func< IBaseData, decimal > selector=null) | ||
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator. More... | |||
void | RegisterIndicator< T > (Symbol symbol, IndicatorBase< T > indicator, Resolution? resolution=null) | ||
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator. More... | |||
void | RegisterIndicator< T > (Symbol symbol, IndicatorBase< T > indicator, Resolution? resolution, Func< IBaseData, T > selector) | ||
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator. More... | |||
void | RegisterIndicator< T > (Symbol symbol, IndicatorBase< T > indicator, TimeSpan? resolution, Func< IBaseData, T > selector=null) | ||
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator. More... | |||
void | RegisterIndicator< T > (Symbol symbol, IndicatorBase< T > indicator, IDataConsolidator consolidator, Func< IBaseData, T > selector=null) | ||
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator. More... | |||
void | UnregisterIndicator (IndicatorBase indicator) | ||
Will unregister an indicator and it's associated consolidator instance so they stop receiving data updates More... | |||
void | DeregisterIndicator (IndicatorBase indicator) | ||
Will deregister an indicator and it's associated consolidator instance so they stop receiving data updates More... | |||
void | WarmUpIndicator (Symbol symbol, IndicatorBase< IndicatorDataPoint > indicator, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Warms up a given indicator with historical data More... | |||
void | WarmUpIndicator (IEnumerable< Symbol > symbols, IndicatorBase< IndicatorDataPoint > indicator, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Warms up a given indicator with historical data More... | |||
void | WarmUpIndicator (Symbol symbol, IndicatorBase< IndicatorDataPoint > indicator, TimeSpan period, Func< IBaseData, decimal > selector=null) | ||
Warms up a given indicator with historical data More... | |||
void | WarmUpIndicator< T > (Symbol symbol, IndicatorBase< T > indicator, Resolution? resolution=null, Func< IBaseData, T > selector=null) | ||
Warms up a given indicator with historical data More... | |||
void | WarmUpIndicator< T > (IEnumerable< Symbol > symbols, IndicatorBase< T > indicator, Resolution? resolution=null, Func< IBaseData, T > selector=null) | ||
Warms up a given indicator with historical data More... | |||
void | WarmUpIndicator< T > (Symbol symbol, IndicatorBase< T > indicator, TimeSpan period, Func< IBaseData, T > selector=null) | ||
Warms up a given indicator with historical data More... | |||
IDataConsolidator | ResolveConsolidator (Symbol symbol, Resolution? resolution, Type dataType=null) | ||
Gets the default consolidator for the specified symbol and resolution More... | |||
IDataConsolidator | ResolveConsolidator (Symbol symbol, TimeSpan? timeSpan, Type dataType=null) | ||
Gets the default consolidator for the specified symbol and resolution More... | |||
IDataConsolidator | Consolidate (Symbol symbol, Resolution period, Action< TradeBar > handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate (Symbol symbol, TimeSpan period, Action< TradeBar > handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate (Symbol symbol, Resolution period, Action< QuoteBar > handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate (Symbol symbol, TimeSpan period, Action< QuoteBar > handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate< T > (Symbol symbol, TimeSpan period, Action< T > handler) | ||
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match. More... | |||
IDataConsolidator | Consolidate< T > (Symbol symbol, Resolution period, TickType? tickType, Action< T > handler) | ||
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match. More... | |||
IDataConsolidator | Consolidate< T > (Symbol symbol, TimeSpan period, TickType? tickType, Action< T > handler) | ||
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match. More... | |||
IDataConsolidator | Consolidate (Symbol symbol, Func< DateTime, CalendarInfo > calendar, Action< QuoteBar > handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate (Symbol symbol, Func< DateTime, CalendarInfo > calendar, Action< TradeBar > handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate< T > (Symbol symbol, Func< DateTime, CalendarInfo > calendar, Action< T > handler) | ||
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match. More... | |||
IDataConsolidator | Consolidate< T > (Symbol symbol, Func< DateTime, CalendarInfo > calendar, TickType? tickType, Action< T > handler) | ||
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match. More... | |||
IndicatorHistory | IndicatorHistory (IndicatorBase< IndicatorDataPoint > indicator, Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory (IndicatorBase< IndicatorDataPoint > indicator, IEnumerable< Symbol > symbols, int period, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Gets the historical data of an indicator for the specified symbols. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory< T > (IndicatorBase< T > indicator, Symbol symbol, int period, Resolution? resolution=null, Func< IBaseData, T > selector=null) | ||
Gets the historical data of a bar indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory< T > (IndicatorBase< T > indicator, IEnumerable< Symbol > symbols, int period, Resolution? resolution=null, Func< IBaseData, T > selector=null) | ||
Gets the historical data of a bar indicator for the specified symbols. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory (IndicatorBase< IndicatorDataPoint > indicator, Symbol symbol, TimeSpan span, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory (IndicatorBase< IndicatorDataPoint > indicator, IEnumerable< Symbol > symbols, TimeSpan span, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory< T > (IndicatorBase< T > indicator, IEnumerable< Symbol > symbols, TimeSpan span, Resolution? resolution=null, Func< IBaseData, T > selector=null) | ||
Gets the historical data of a bar indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory< T > (IndicatorBase< T > indicator, Symbol symbol, TimeSpan span, Resolution? resolution=null, Func< IBaseData, T > selector=null) | ||
Gets the historical data of a bar indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory (IndicatorBase< IndicatorDataPoint > indicator, IEnumerable< Symbol > symbols, DateTime start, DateTime end, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Gets the historical data of an indicator for the specified symbols. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory (IndicatorBase< IndicatorDataPoint > indicator, Symbol symbol, DateTime start, DateTime end, Resolution? resolution=null, Func< IBaseData, decimal > selector=null) | ||
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory< T > (IndicatorBase< T > indicator, Symbol symbol, DateTime start, DateTime end, Resolution? resolution=null, Func< IBaseData, T > selector=null) | ||
Gets the historical data of a bar indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory< T > (IndicatorBase< T > indicator, IEnumerable< Symbol > symbols, DateTime start, DateTime end, Resolution? resolution=null, Func< IBaseData, T > selector=null) | ||
Gets the historical data of a bar indicator for the specified symbols. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory (IndicatorBase< IndicatorDataPoint > indicator, IEnumerable< Slice > history, Func< IBaseData, decimal > selector=null) | ||
Gets the historical data of an indicator and convert it into pandas.DataFrame More... | |||
IndicatorHistory | IndicatorHistory< T > (IndicatorBase< T > indicator, IEnumerable< Slice > history, Func< IBaseData, T > selector=null) | ||
Gets the historical data of an bar indicator and convert it into pandas.DataFrame More... | |||
void | AddChart (Chart chart) | ||
Add a Chart object to algorithm collection More... | |||
void | Plot (string series, decimal value) | ||
Plot a chart using string series name, with value. More... | |||
void | Record (string series, int value) | ||
Plot a chart using string series name, with int value. Alias of Plot(); More... | |||
void | Record (string series, double value) | ||
Plot a chart using string series name, with double value. Alias of Plot(); More... | |||
void | Record (string series, decimal value) | ||
Plot a chart using string series name, with decimal value. Alias of Plot(); More... | |||
void | Plot (string series, double value) | ||
Plot a chart using string series name, with double value. More... | |||
void | Plot (string series, int value) | ||
Plot a chart using string series name, with int value. More... | |||
void | Plot (string series, float value) | ||
Plot a chart using string series name, with float value. More... | |||
void | Plot (string chart, string series, double value) | ||
Plot a chart to string chart name, using string series name, with double value. More... | |||
void | Plot (string chart, string series, int value) | ||
Plot a chart to string chart name, using string series name, with int value More... | |||
void | Plot (string chart, string series, float value) | ||
Plot a chart to string chart name, using string series name, with float value More... | |||
void | Plot (string chart, string series, decimal value) | ||
Plot a value to a chart of string-chart name, with string series name, and decimal value. If chart does not exist, create it. More... | |||
void | Plot (string series, double open, double high, double low, double close) | ||
Plot a candlestick to the default/primary chart series by the given series name. More... | |||
void | Plot (string series, float open, float high, float low, float close) | ||
Plot a candlestick to the default/primary chart series by the given series name. More... | |||
void | Plot (string series, int open, int high, int low, int close) | ||
Plot a candlestick to the default/primary chart series by the given series name. More... | |||
void | Plot (string series, decimal open, decimal high, decimal low, decimal close) | ||
Plot a candlestick to the default/primary chart series by the given series name. More... | |||
void | Plot (string chart, string series, double open, double high, double low, double close) | ||
Plot a candlestick to the given series of the given chart. More... | |||
void | Plot (string chart, string series, float open, float high, float low, float close) | ||
Plot a candlestick to the given series of the given chart. More... | |||
void | Plot (string chart, string series, int open, int high, int low, int close) | ||
Plot a candlestick to the given series of the given chart. More... | |||
void | Plot (string chart, string series, decimal open, decimal high, decimal low, decimal close) | ||
Plot a candlestick to a chart of string-chart name, with string series name, and decimal value. If chart does not exist, create it. More... | |||
void | Plot (string series, TradeBar bar) | ||
Plot a candlestick to the given series of the given chart. More... | |||
void | Plot (string chart, string series, TradeBar bar) | ||
Plot a candlestick to the given series of the given chart. More... | |||
void | AddSeries (string chart, string series, SeriesType seriesType, string unit="$") | ||
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. More... | |||
void | Plot (string chart, params IndicatorBase[] indicators) | ||
Plots the value of each indicator on the chart More... | |||
void | PlotIndicator (string chart, params IndicatorBase[] indicators) | ||
Automatically plots each indicator when a new value is available More... | |||
void | PlotIndicator (string chart, bool waitForReady, params IndicatorBase[] indicators) | ||
Automatically plots each indicator when a new value is available, optionally waiting for indicator.IsReady to return true More... | |||
void | SetRuntimeStatistic (string name, string value) | ||
Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI. More... | |||
void | SetRuntimeStatistic (string name, decimal value) | ||
Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI. More... | |||
void | SetRuntimeStatistic (string name, int value) | ||
Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI. More... | |||
void | SetRuntimeStatistic (string name, double value) | ||
Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI. More... | |||
void | SetSummaryStatistic (string name, string value) | ||
Set a custom summary statistic for the algorithm. More... | |||
void | SetSummaryStatistic (string name, int value) | ||
Set a custom summary statistic for the algorithm. More... | |||
void | SetSummaryStatistic (string name, double value) | ||
Set a custom summary statistic for the algorithm. More... | |||
void | SetSummaryStatistic (string name, decimal value) | ||
Set a custom summary statistic for the algorithm. More... | |||
IEnumerable< Chart > | GetChartUpdates (bool clearChartData=false) | ||
Get the chart updates by fetch the recent points added and return for dynamic Charting. More... | |||
void | SetPandasConverter () | ||
Sets pandas converter More... | |||
Security | AddData (PyObject type, string ticker, Resolution? resolution=null) | ||
AddData 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). This method is meant for custom data types that require a ticker, but have no underlying Symbol. Examples of data sources that meet this criteria are U.S. Treasury Yield Curve Rates and Trading Economics data More... | |||
Security | AddData (PyObject type, Symbol underlying, Resolution? resolution=null) | ||
AddData 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). This adds a Symbol to the Underlying property in the custom data Symbol object. Use this method when adding custom data with a ticker from the past, such as "AOL" before it became "TWX", or if you need to filter using custom data and place trades on the Symbol associated with the custom data. More... | |||
Security | AddData (PyObject type, string ticker, Resolution? resolution, DateTimeZone timeZone, bool fillForward=false, decimal leverage=1.0m) | ||
AddData a new user defined data source, requiring only the minimum config options. This method is meant for custom data types that require a ticker, but have no underlying Symbol. Examples of data sources that meet this criteria are U.S. Treasury Yield Curve Rates and Trading Economics data More... | |||
Security | AddData (PyObject type, Symbol underlying, Resolution? resolution, DateTimeZone timeZone, bool fillForward=false, decimal leverage=1.0m) | ||
AddData a new user defined data source, requiring only the minimum config options. This adds a Symbol to the Underlying property in the custom data Symbol object. Use this method when adding custom data with a ticker from the past, such as "AOL" before it became "TWX", or if you need to filter using custom data and place trades on the Symbol associated with the custom data. More... | |||
Security | AddData (Type dataType, string ticker, Resolution? resolution, DateTimeZone timeZone, bool fillForward=false, decimal leverage=1.0m) | ||
AddData a new user defined data source, requiring only the minimum config options. This method is meant for custom data types that require a ticker, but have no underlying Symbol. Examples of data sources that meet this criteria are U.S. Treasury Yield Curve Rates and Trading Economics data More... | |||
Security | AddData (Type dataType, Symbol underlying, Resolution? resolution=null, DateTimeZone timeZone=null, bool fillForward=false, decimal leverage=1.0m) | ||
AddData a new user defined data source, requiring only the minimum config options. This adds a Symbol to the Underlying property in the custom data Symbol object. Use this method when adding custom data with a ticker from the past, such as "AOL" before it became "TWX", or if you need to filter using custom data and place trades on the Symbol associated with the custom data. More... | |||
Security | AddData (PyObject type, string ticker, SymbolProperties properties, SecurityExchangeHours exchangeHours, Resolution? resolution=null, bool fillForward=false, decimal leverage=1.0m) | ||
AddData a new user defined data source including symbol properties and exchange hours, all other vars are not required and will use defaults. This overload reflects the C# equivalent for custom properties and market hours More... | |||
void | AddFutureOption (Symbol futureSymbol, PyObject optionFilter) | ||
Creates and adds a new Future Option contract to the algorithm. More... | |||
Universe | AddUniverse (PyObject pyObject) | ||
Creates a new universe and adds it to the algorithm. This is for coarse fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork) More... | |||
Universe | AddUniverse (PyObject pyObject, PyObject pyfine) | ||
Creates a new universe and adds it to the algorithm. This is for coarse and fine fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork) More... | |||
Universe | AddUniverse (string name, Resolution resolution, PyObject pySelector) | ||
Creates a new universe and adds it to the algorithm. This can be used to return a list of string symbols retrieved from anywhere and will loads those symbols under the US Equity market. More... | |||
Universe | AddUniverse (string name, PyObject pySelector) | ||
Creates a new universe and adds it to the algorithm. This can be used to return a list of string symbols retrieved from anywhere and will loads those symbols under the US Equity market. More... | |||
Universe | AddUniverse (SecurityType securityType, string name, Resolution resolution, string market, UniverseSettings universeSettings, PyObject pySelector) | ||
Creates a new user defined universe that will fire on the requested resolution during market hours. More... | |||
Universe | AddUniverse (PyObject T, string name, PyObject selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings More... | |||
Universe | AddUniverse (PyObject T, string name, Resolution resolution, PyObject selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Market.USA and UniverseSettings More... | |||
Universe | AddUniverse (PyObject T, string name, Resolution resolution, UniverseSettings universeSettings, PyObject selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, and Market.USA More... | |||
Universe | AddUniverse (PyObject T, string name, UniverseSettings universeSettings, PyObject selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, and Market.USA More... | |||
Universe | AddUniverse (PyObject T, SecurityType securityType, string name, Resolution resolution, string market, PyObject selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. More... | |||
Universe | AddUniverse (PyObject T, SecurityType securityType, string name, Resolution resolution, string market, UniverseSettings universeSettings, PyObject selector) | ||
Creates a new universe and adds it to the algorithm More... | |||
Universe | AddUniverse (Type dataType, SecurityType? securityType=null, string name=null, Resolution? resolution=null, string market=null, UniverseSettings universeSettings=null, PyObject pySelector=null) | ||
Creates a new universe and adds it to the algorithm More... | |||
void | AddUniverseOptions (PyObject universe, PyObject optionFilter) | ||
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 More... | |||
void | RegisterIndicator (Symbol symbol, PyObject indicator, Resolution? resolution=null, PyObject selector=null) | ||
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator. More... | |||
void | RegisterIndicator (Symbol symbol, PyObject indicator, TimeSpan? resolution=null, PyObject selector=null) | ||
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator. More... | |||
void | RegisterIndicator (Symbol symbol, PyObject indicator, PyObject pyObject, PyObject selector=null) | ||
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator. More... | |||
void | RegisterIndicator (Symbol symbol, PyObject indicator, IDataConsolidator consolidator, PyObject selector=null) | ||
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator. More... | |||
void | WarmUpIndicator (Symbol symbol, PyObject indicator, Resolution? resolution=null, PyObject selector=null) | ||
Warms up a given indicator with historical data More... | |||
void | WarmUpIndicator (Symbol symbol, PyObject indicator, TimeSpan period, PyObject selector=null) | ||
Warms up a given indicator with historical data More... | |||
void | Plot (string series, PyObject pyObject) | ||
Plot a chart using string series name, with value. More... | |||
void | Plot (string chart, Indicator first, Indicator second=null, Indicator third=null, Indicator fourth=null) | ||
Plots the value of each indicator on the chart More... | |||
void | Plot (string chart, BarIndicator first, BarIndicator second=null, BarIndicator third=null, BarIndicator fourth=null) | ||
Plots the value of each indicator on the chart More... | |||
void | Plot (string chart, TradeBarIndicator first, TradeBarIndicator second=null, TradeBarIndicator third=null, TradeBarIndicator fourth=null) | ||
Plots the value of each indicator on the chart More... | |||
void | PlotIndicator (string chart, PyObject first, PyObject second=null, PyObject third=null, PyObject fourth=null) | ||
Automatically plots each indicator when a new value is available More... | |||
void | PlotIndicator (string chart, bool waitForReady, PyObject first, PyObject second=null, PyObject third=null, PyObject fourth=null) | ||
Automatically plots each indicator when a new value is available More... | |||
FilteredIdentity | FilteredIdentity (Symbol symbol, PyObject selector=null, PyObject filter=null, string fieldName=null) | ||
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
FilteredIdentity | FilteredIdentity (Symbol symbol, Resolution resolution, PyObject selector=null, PyObject filter=null, string fieldName=null) | ||
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
FilteredIdentity | FilteredIdentity (Symbol symbol, TimeSpan resolution, PyObject selector=null, PyObject filter=null, string fieldName=null) | ||
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution More... | |||
PyObject | History (PyObject tickers, int periods, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null, bool flatten=false) | ||
Gets the historical data for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
PyObject | History (PyObject tickers, TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null, bool flatten=false) | ||
Gets the historical data for the specified symbols over the requested span. The symbols must exist in the Securities collection. More... | |||
PyObject | History (PyObject tickers, DateTime start, DateTime end, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null, bool flatten=false) | ||
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection. More... | |||
PyObject | History (PyObject type, PyObject tickers, DateTime start, DateTime end, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null, bool flatten=false) | ||
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection. More... | |||
PyObject | History (PyObject type, PyObject tickers, int periods, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null, bool flatten=false) | ||
Gets the historical data for the specified symbols. The exact number of bars will be returned for each symbol. This may result in some data start earlier/later than others due to when various exchanges are open. The symbols must exist in the Securities collection. More... | |||
PyObject | History (PyObject type, PyObject tickers, TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null, bool flatten=false) | ||
Gets the historical data for the specified symbols over the requested span. The symbols must exist in the Securities collection. More... | |||
PyObject | History (PyObject type, Symbol symbol, DateTime start, DateTime end, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null, bool flatten=false) | ||
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection. More... | |||
PyObject | History (PyObject type, Symbol symbol, int periods, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null, bool flatten=false) | ||
Gets the historical data for the specified symbols. The exact number of bars will be returned for each symbol. This may result in some data start earlier/later than others due to when various exchanges are open. The symbols must exist in the Securities collection. More... | |||
PyObject | History (PyObject type, Symbol symbol, TimeSpan span, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null, bool flatten=false) | ||
Gets the historical data for the specified symbols over the requested span. The symbols must exist in the Securities collection. More... | |||
void | SetBenchmark (PyObject benchmark) | ||
Sets the specified function as the benchmark, this function provides the value of the benchmark at each date/time requested More... | |||
void | SetBrokerageModel (PyObject model) | ||
Sets the brokerage to emulate in backtesting or paper trading. This can be used to set a custom brokerage model. More... | |||
void | SetBrokerageMessageHandler (PyObject handler) | ||
Sets the implementation used to handle messages from the brokerage. The default implementation will forward messages to debug or error and when a BrokerageMessageType.Error occurs, the algorithm is stopped. More... | |||
void | SetRiskFreeInterestRateModel (PyObject model) | ||
Sets the risk free interest rate model to be used in the algorithm More... | |||
void | SetSecurityInitializer (PyObject securityInitializer) | ||
Sets the security initializer function, used to initialize/configure securities after creation More... | |||
string | Download (string address, PyObject headers) | ||
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI. More... | |||
string | Download (string address, PyObject headers, string userName, string password) | ||
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI. More... | |||
void | Debug (PyObject message) | ||
Send a debug message to the web console: More... | |||
void | Error (PyObject message) | ||
Send a string error message to the Console. More... | |||
void | Log (PyObject message) | ||
Added another method for logging if user guessed. More... | |||
void | Quit (PyObject message) | ||
Terminate the algorithm after processing the current event handler. More... | |||
IDataConsolidator | Consolidate (Symbol symbol, Resolution period, PyObject handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate (Symbol symbol, Resolution period, TickType? tickType, PyObject handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate (Symbol symbol, TimeSpan period, PyObject handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate (Symbol symbol, TimeSpan period, TickType? tickType, PyObject handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IDataConsolidator | Consolidate (Symbol symbol, Func< DateTime, CalendarInfo > calendar, PyObject handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
ScheduledEvent | Train (PyObject trainingCode) | ||
Schedules the provided training code to execute immediately More... | |||
ScheduledEvent | Train (IDateRule dateRule, ITimeRule timeRule, PyObject trainingCode) | ||
Schedules the training code to run using the specified date and time rules More... | |||
IDataConsolidator | Consolidate (Symbol symbol, Func< DateTime, CalendarInfo > calendar, TickType? tickType, PyObject handler) | ||
Registers the handler to receive consolidated data for the specified symbol More... | |||
IndicatorHistory | IndicatorHistory (PyObject indicator, PyObject symbol, int period, Resolution? resolution=null, PyObject selector=null) | ||
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory (PyObject indicator, PyObject symbol, TimeSpan span, Resolution? resolution=null, PyObject selector=null) | ||
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory (PyObject indicator, PyObject symbol, DateTime start, DateTime end, Resolution? resolution=null, PyObject selector=null) | ||
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection. More... | |||
IndicatorHistory | IndicatorHistory (PyObject indicator, IEnumerable< Slice > history, PyObject selector=null) | ||
Gets the historical data of an indicator and convert it into pandas.DataFrame More... | |||
List< OrderTicket > | Liquidate (PyObject symbols, bool asynchronous=false, string tag="Liquidated", IOrderProperties orderProperties=null) | ||
Liquidate your portfolio holdings More... | |||
void | AddCommand (PyObject type) | ||
Register a command type to be used More... | |||
OptionChains | OptionChains (PyObject symbols, bool flatten=false) | ||
Get the option chains for the specified symbols at the current time (Time) More... | |||
string | Link (PyObject command) | ||
Get an authenticated link to execute the given command instance More... | |||
OrderTicket | Buy (Symbol symbol, int quantity) | ||
Buy Stock (Alias of Order) More... | |||
OrderTicket | Buy (Symbol symbol, double quantity) | ||
Buy Stock (Alias of Order) More... | |||
OrderTicket | Buy (Symbol symbol, decimal quantity) | ||
Buy Stock (Alias of Order) More... | |||
OrderTicket | Buy (Symbol symbol, float quantity) | ||
Buy Stock (Alias of Order) More... | |||
OrderTicket | Sell (Symbol symbol, int quantity) | ||
Sell stock (alias of Order) More... | |||
OrderTicket | Sell (Symbol symbol, double quantity) | ||
Sell stock (alias of Order) More... | |||
OrderTicket | Sell (Symbol symbol, float quantity) | ||
Sell stock (alias of Order) More... | |||
OrderTicket | Sell (Symbol symbol, decimal quantity) | ||
Sell stock (alias of Order) More... | |||
OrderTicket | Order (Symbol symbol, double quantity) | ||
Issue an order/trade for asset: Alias wrapper for Order(string, int); More... | |||
OrderTicket | Order (Symbol symbol, int quantity) | ||
Issue an order/trade for asset More... | |||
OrderTicket | Order (Symbol symbol, decimal quantity) | ||
Issue an order/trade for asset More... | |||
OrderTicket | Order (Symbol symbol, decimal quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Wrapper for market order method: submit a new order for quantity of symbol using type order. More... | |||
OrderTicket | MarketOrder (Symbol symbol, int quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Market order implementation: Send a market order and wait for it to be filled. More... | |||
OrderTicket | MarketOrder (Symbol symbol, double quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Market order implementation: Send a market order and wait for it to be filled. More... | |||
OrderTicket | MarketOrder (Symbol symbol, decimal quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Market order implementation: Send a market order and wait for it to be filled. More... | |||
OrderTicket | MarketOrder (Security security, decimal quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Market order implementation: Send a market order and wait for it to be filled. More... | |||
OrderTicket | MarketOnOpenOrder (Symbol symbol, double quantity, string tag="", IOrderProperties orderProperties=null) | ||
Market on open order implementation: Send a market order when the exchange opens More... | |||
OrderTicket | MarketOnOpenOrder (Symbol symbol, int quantity, string tag="", IOrderProperties orderProperties=null) | ||
Market on open order implementation: Send a market order when the exchange opens More... | |||
OrderTicket | MarketOnOpenOrder (Symbol symbol, decimal quantity, string tag="", IOrderProperties orderProperties=null) | ||
Market on open order implementation: Send a market order when the exchange opens More... | |||
OrderTicket | MarketOnCloseOrder (Symbol symbol, int quantity, string tag="", IOrderProperties orderProperties=null) | ||
Market on close order implementation: Send a market order when the exchange closes More... | |||
OrderTicket | MarketOnCloseOrder (Symbol symbol, double quantity, string tag="", IOrderProperties orderProperties=null) | ||
Market on close order implementation: Send a market order when the exchange closes More... | |||
OrderTicket | MarketOnCloseOrder (Symbol symbol, decimal quantity, string tag="", IOrderProperties orderProperties=null) | ||
Market on close order implementation: Send a market order when the exchange closes More... | |||
OrderTicket | LimitOrder (Symbol symbol, int quantity, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
Send a limit order to the transaction handler: More... | |||
OrderTicket | LimitOrder (Symbol symbol, double quantity, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
Send a limit order to the transaction handler: More... | |||
OrderTicket | LimitOrder (Symbol symbol, decimal quantity, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
Send a limit order to the transaction handler: More... | |||
OrderTicket | StopMarketOrder (Symbol symbol, int quantity, decimal stopPrice, string tag="", IOrderProperties orderProperties=null) | ||
Create a stop market order and return the newly created order id; or negative if the order is invalid More... | |||
OrderTicket | StopMarketOrder (Symbol symbol, double quantity, decimal stopPrice, string tag="", IOrderProperties orderProperties=null) | ||
Create a stop market order and return the newly created order id; or negative if the order is invalid More... | |||
OrderTicket | StopMarketOrder (Symbol symbol, decimal quantity, decimal stopPrice, string tag="", IOrderProperties orderProperties=null) | ||
Create a stop market order and return the newly created order id; or negative if the order is invalid More... | |||
OrderTicket | TrailingStopOrder (Symbol symbol, int quantity, decimal trailingAmount, bool trailingAsPercentage, string tag="", IOrderProperties orderProperties=null) | ||
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. More... | |||
OrderTicket | TrailingStopOrder (Symbol symbol, double quantity, decimal trailingAmount, bool trailingAsPercentage, string tag="", IOrderProperties orderProperties=null) | ||
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. More... | |||
OrderTicket | TrailingStopOrder (Symbol symbol, decimal quantity, decimal trailingAmount, bool trailingAsPercentage, string tag="", IOrderProperties orderProperties=null) | ||
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. More... | |||
OrderTicket | TrailingStopOrder (Symbol symbol, int quantity, decimal stopPrice, decimal trailingAmount, bool trailingAsPercentage, string tag="", IOrderProperties orderProperties=null) | ||
Create a trailing stop order and return the newly created order id; or negative if the order is invalid More... | |||
OrderTicket | TrailingStopOrder (Symbol symbol, double quantity, decimal stopPrice, decimal trailingAmount, bool trailingAsPercentage, string tag="", IOrderProperties orderProperties=null) | ||
Create a trailing stop order and return the newly created order id; or negative if the order is invalid More... | |||
OrderTicket | TrailingStopOrder (Symbol symbol, decimal quantity, decimal stopPrice, decimal trailingAmount, bool trailingAsPercentage, string tag="", IOrderProperties orderProperties=null) | ||
Create a trailing stop order and return the newly created order id; or negative if the order is invalid More... | |||
OrderTicket | StopLimitOrder (Symbol symbol, int quantity, decimal stopPrice, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
Send a stop limit order to the transaction handler: More... | |||
OrderTicket | StopLimitOrder (Symbol symbol, double quantity, decimal stopPrice, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
Send a stop limit order to the transaction handler: More... | |||
OrderTicket | StopLimitOrder (Symbol symbol, decimal quantity, decimal stopPrice, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
Send a stop limit order to the transaction handler: More... | |||
OrderTicket | LimitIfTouchedOrder (Symbol symbol, int quantity, decimal triggerPrice, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
Send a limit if touched order to the transaction handler: More... | |||
OrderTicket | LimitIfTouchedOrder (Symbol symbol, double quantity, decimal triggerPrice, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
Send a limit if touched order to the transaction handler: More... | |||
OrderTicket | LimitIfTouchedOrder (Symbol symbol, decimal quantity, decimal triggerPrice, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
Send a limit if touched order to the transaction handler: More... | |||
OrderTicket | ExerciseOption (Symbol optionSymbol, int quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Send an exercise order to the transaction handler More... | |||
IEnumerable< OrderTicket > | Buy (OptionStrategy strategy, int quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Buy Option Strategy (Alias of Order) More... | |||
IEnumerable< OrderTicket > | Sell (OptionStrategy strategy, int quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Sell Option Strategy (alias of Order) More... | |||
IEnumerable< OrderTicket > | Order (OptionStrategy strategy, int quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Issue an order/trade for buying/selling an option strategy More... | |||
List< OrderTicket > | ComboMarketOrder (List< Leg > legs, int quantity, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Issue a combo market order/trade for multiple assets More... | |||
List< OrderTicket > | ComboLegLimitOrder (List< Leg > legs, int quantity, string tag="", IOrderProperties orderProperties=null) | ||
Issue a combo leg limit order/trade for multiple assets, each having its own limit price. More... | |||
List< OrderTicket > | ComboLimitOrder (List< Leg > legs, int quantity, decimal limitPrice, string tag="", IOrderProperties orderProperties=null) | ||
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. More... | |||
OrderTicket | SubmitOrderRequest (SubmitOrderRequest request) | ||
Will submit an order request to the algorithm More... | |||
List< OrderTicket > | Liquidate (Symbol symbol=null, bool asynchronous=false, string tag="Liquidated", IOrderProperties orderProperties=null) | ||
Liquidate your portfolio holdings More... | |||
List< OrderTicket > | Liquidate (IEnumerable< Symbol > symbols, bool asynchronous=false, string tag="Liquidated", IOrderProperties orderProperties=null) | ||
Liquidate your portfolio holdings More... | |||
List< int > | Liquidate (Symbol symbolToLiquidate, string tag) | ||
Liquidate all holdings and cancel open orders. Called at the end of day for tick-strategies. More... | |||
void | SetMaximumOrders (int max) | ||
Maximum number of orders for the algorithm More... | |||
void | SetHoldings (List< PortfolioTarget > targets, bool liquidateExistingHoldings=false, string tag="", IOrderProperties orderProperties=null) | ||
Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin. More... | |||
void | SetHoldings (Symbol symbol, double percentage, bool liquidateExistingHoldings=false, string tag="", IOrderProperties orderProperties=null) | ||
Alias for SetHoldings to avoid the M-decimal errors. More... | |||
void | SetHoldings (Symbol symbol, float percentage, bool liquidateExistingHoldings=false, string tag="", IOrderProperties orderProperties=null) | ||
Alias for SetHoldings to avoid the M-decimal errors. More... | |||
void | SetHoldings (Symbol symbol, int percentage, bool liquidateExistingHoldings=false, string tag="", IOrderProperties orderProperties=null) | ||
Alias for SetHoldings to avoid the M-decimal errors. More... | |||
void | SetHoldings (Symbol symbol, decimal percentage, bool liquidateExistingHoldings=false, string tag="", IOrderProperties orderProperties=null) | ||
Automatically place a market order which will set the holdings to between 100% or -100% of PORTFOLIO VALUE. E.g. SetHoldings("AAPL", 0.1); SetHoldings("IBM", -0.2); -> Sets portfolio as long 10% APPL and short 20% IBM E.g. SetHoldings("AAPL", 2); -> Sets apple to 2x leveraged with all our cash. If the market is closed, place a market on open order. More... | |||
decimal | CalculateOrderQuantity (Symbol symbol, double target) | ||
Calculate the order quantity to achieve target-percent holdings. More... | |||
decimal | CalculateOrderQuantity (Symbol symbol, decimal target) | ||
Calculate the order quantity to achieve target-percent holdings. More... | |||
OrderTicket | Order (Symbol symbol, int quantity, OrderType type, bool asynchronous=false, string tag="", IOrderProperties orderProperties=null) | ||
Obsolete implementation of Order method accepting a OrderType. This was deprecated since it was impossible to generate other orders via this method. Any calls to this method will always default to a Market Order. More... | |||
OrderTicket | Order (Symbol symbol, decimal quantity, OrderType type) | ||
Obsolete method for placing orders. More... | |||
OrderTicket | Order (Symbol symbol, int quantity, OrderType type) | ||
Obsolete method for placing orders. More... | |||
bool | IsMarketOpen (Symbol symbol) | ||
Determines if the exchange for the specified symbol is open at the current time. More... | |||
void | OnEndOfTimeStep () | ||
Invoked at the end of every time step. This allows the algorithm to process events before advancing to the next time step. More... | |||
Universe | AddUniverse (Universe universe) | ||
Adds the universe to the algorithm More... | |||
Universe | AddUniverse< T > (Func< IEnumerable< BaseData >, IEnumerable< Symbol >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings More... | |||
Universe | AddUniverse< T > (Func< IEnumerable< BaseData >, IEnumerable< string >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings More... | |||
Universe | AddUniverse< T > (string name, Func< IEnumerable< BaseData >, IEnumerable< Symbol >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings More... | |||
Universe | AddUniverse< T > (string name, Func< IEnumerable< BaseData >, IEnumerable< string >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings More... | |||
Universe | AddUniverse< T > (string name, UniverseSettings universeSettings, Func< IEnumerable< BaseData >, IEnumerable< Symbol >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, and Market.USA More... | |||
Universe | AddUniverse< T > (string name, UniverseSettings universeSettings, Func< IEnumerable< BaseData >, IEnumerable< string >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, and Market.USA More... | |||
Universe | AddUniverse< T > (string name, Resolution resolution, Func< IEnumerable< BaseData >, IEnumerable< Symbol >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Market.USA and UniverseSettings More... | |||
Universe | AddUniverse< T > (string name, Resolution resolution, Func< IEnumerable< BaseData >, IEnumerable< string >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Market.USA and UniverseSettings More... | |||
Universe | AddUniverse< T > (string name, Resolution resolution, UniverseSettings universeSettings, Func< IEnumerable< BaseData >, IEnumerable< Symbol >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, and Market.USA More... | |||
Universe | AddUniverse< T > (string name, Resolution resolution, UniverseSettings universeSettings, Func< IEnumerable< BaseData >, IEnumerable< string >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, and Market.USA More... | |||
Universe | AddUniverse< T > (string name, Resolution resolution, string market, Func< IEnumerable< BaseData >, IEnumerable< Symbol >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. More... | |||
Universe | AddUniverse< T > (SecurityType securityType, string name, Resolution resolution, string market, Func< IEnumerable< BaseData >, IEnumerable< string >> selector) | ||
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. More... | |||
Universe | AddUniverse< T > (SecurityType securityType, string name, Resolution resolution, string market, UniverseSettings universeSettings, Func< IEnumerable< BaseData >, IEnumerable< string >> selector) | ||
Creates a new universe and adds it to the algorithm More... | |||
Universe | AddUniverse< T > (string name=null, Resolution? resolution=null, string market=null, UniverseSettings universeSettings=null, Func< IEnumerable< BaseData >, IEnumerable< Symbol >> selector=null) | ||
Creates a new universe and adds it to the algorithm More... | |||
Universe | AddUniverse (Func< IEnumerable< Fundamental >, IEnumerable< Symbol >> selector) | ||
Creates a new universe and adds it to the algorithm. This is for coarse fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork) More... | |||
Universe | AddUniverse (IDateRule dateRule, Func< IEnumerable< Fundamental >, IEnumerable< Symbol >> selector) | ||
Creates a new universe and adds it to the algorithm. This is for coarse fundamental US Equity data and will be executed based on the provided IDateRule in the NewYork time zone (TimeZones.NewYork) More... | |||
Universe | AddUniverse (Func< IEnumerable< CoarseFundamental >, IEnumerable< Symbol >> coarseSelector, Func< IEnumerable< FineFundamental >, IEnumerable< Symbol >> fineSelector) | ||
Creates a new universe and adds it to the algorithm. This is for coarse and fine fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork) More... | |||
Universe | AddUniverse (Universe universe, Func< IEnumerable< Fundamental >, IEnumerable< Symbol >> fineSelector) | ||
Creates a new universe and adds it to the algorithm. This is for fine fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork) More... | |||
Universe | AddUniverse (string name, Func< DateTime, IEnumerable< string >> selector) | ||
Creates a new universe and adds it to the algorithm. This can be used to return a list of string symbols retrieved from anywhere and will loads those symbols under the US Equity market. More... | |||
Universe | AddUniverse (string name, Resolution resolution, Func< DateTime, IEnumerable< string >> selector) | ||
Creates a new universe and adds it to the algorithm. This can be used to return a list of string symbols retrieved from anywhere and will loads those symbols under the US Equity market. More... | |||
Universe | AddUniverse (SecurityType securityType, string name, Resolution resolution, string market, UniverseSettings universeSettings, Func< DateTime, IEnumerable< string >> selector) | ||
Creates a new user defined universe that will fire on the requested resolution during market hours. More... | |||
void | AddUniverseOptions (Symbol underlyingSymbol, Func< OptionFilterUniverse, OptionFilterUniverse > optionFilter) | ||
Adds a new universe that creates options of the security by monitoring any changes in the Universe the provided security is in. Additionally, a filter can be applied to the options generated when the universe of the security changes. More... | |||
void | AddUniverseOptions (Universe universe, Func< OptionFilterUniverse, OptionFilterUniverse > optionFilter) | ||
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 More... | |||
Static Public Member Functions | |
static IDataConsolidator | CreateConsolidator (TimeSpan period, Type consolidatorInputType, TickType? tickType=null) |
Creates a new consolidator for the specified period, generating the requested output type. More... | |
Public Attributes | |
IReadOnlyDictionary< Symbol, Security > | ActiveSecurities => UniverseManager.ActiveSecurities |
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. More... | |
string | AccountCurrency => Portfolio.CashBook.AccountCurrency |
Gets the account currency More... | |
ITimeKeeper | TimeKeeper => _timeKeeper |
Gets the time keeper instance More... | |
DateTime | StartDate => _startDate |
Value of the user set start-date from the backtest. More... | |
Protected Member Functions | |
IEnumerable< DataDictionary< T > > | GetDataTypedHistory< T > (IEnumerable< HistoryRequest > requests) |
Centralized logic to get data typed history for a given list of requests. More... | |
IEnumerable< HistoryRequest > | CreateDateRangeHistoryRequests (IEnumerable< Symbol > symbols, DateTime startAlgoTz, DateTime endAlgoTz, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) |
Helper method to create history requests from a date range More... | |
IEnumerable< HistoryRequest > | CreateDateRangeHistoryRequests (IEnumerable< Symbol > symbols, Type requestedType, DateTime startAlgoTz, DateTime endAlgoTz, Resolution? resolution=null, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) |
Helper method to create history requests from a date range with custom data type More... | |
PyObject | GetDataFrame (IEnumerable< Slice > data, bool flatten, Type dataType=null) |
Converts an enumerable of Slice into a Python Pandas data frame More... | |
PyObject | GetDataFrame< T > (IEnumerable< T > data, bool flatten) |
Converts an enumerable of BaseData into a Python Pandas data frame More... | |
Static Protected Attributes | |
const int | MaxNameAndTagsLength = 200 |
Maximum length of the name or tags of a backtest More... | |
const int | MaxTagsCount = 100 |
Maximum number of tags allowed for a backtest More... | |
Properties | |
MarketHoursDatabase | MarketHoursDatabase [get] |
Gets the market hours database in use by this algorithm More... | |
SymbolPropertiesDatabase | SymbolPropertiesDatabase [get] |
Gets the symbol properties database in use by this algorithm More... | |
SecurityManager | Securities [get, set] |
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. More... | |
SecurityPortfolioManager | Portfolio [get, set] |
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 More... | |
SubscriptionManager | SubscriptionManager [get, set] |
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. More... | |
SignalExportManager | SignalExport [get] |
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 More... | |
int | ProjectId [get, set] |
The project id associated with this algorithm if any More... | |
IBrokerageModel | BrokerageModel [get] |
Gets the brokerage model - used to model interactions with specific brokerages. More... | |
BrokerageName | BrokerageName [get] |
Gets the brokerage name. More... | |
IBrokerageMessageHandler | BrokerageMessageHandler [get, set] |
Gets the brokerage message handler used to decide what to do with each message sent from the brokerage More... | |
IRiskFreeInterestRateModel | RiskFreeInterestRateModel [get] |
Gets the risk free interest rate model used to get the interest rates More... | |
NotificationManager | Notify [get, set] |
Notification Manager for Sending Live Runtime Notifications to users about important events. More... | |
ScheduleManager | Schedule [get] |
Gets schedule manager for adding/removing scheduled events More... | |
AlgorithmStatus | Status [get, set] |
Gets or sets the current status of the algorithm More... | |
ISecurityInitializer | SecurityInitializer [get] |
Gets an instance that is to be used to initialize newly created securities. More... | |
ITradeBuilder | TradeBuilder [get] |
Gets the Trade Builder to generate trades from executions More... | |
CandlestickPatterns | CandlestickPatterns [get] |
Gets an instance to access the candlestick pattern helper methods More... | |
DateRules | DateRules [get] |
Gets the date rules helper object to make specifying dates for events easier More... | |
TimeRules | TimeRules [get] |
Gets the time rules helper object to make specifying times for events easier More... | |
TradingCalendar | TradingCalendar [get] |
Gets trading calendar populated with trading events More... | |
IAlgorithmSettings | Settings [get] |
Gets the user settings for the algorithm More... | |
IOptionChainProvider | OptionChainProvider [get] |
Gets the option chain provider, used to get the list of option contracts for an underlying symbol More... | |
IFutureChainProvider | FutureChainProvider [get] |
Gets the future chain provider, used to get the list of future contracts for an underlying symbol More... | |
IOrderProperties | DefaultOrderProperties [get, set] |
Gets the default order properties More... | |
string | Name [get, set] |
Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id. More... | |
HashSet< string >?? | Tags [get, set] |
A list of tags associated with the algorithm or the backtest, useful for categorization More... | |
DateTime | Time [get] |
Read-only value for current time frontier of the algorithm in terms of the TimeZone More... | |
DateTime | UtcTime [get] |
Current date/time in UTC. More... | |
DateTimeZone | TimeZone [get] |
Gets the time zone used for the Time property. The default value is TimeZones.NewYork More... | |
DateTime | EndDate [get] |
Value of the user set start-date from the backtest. Controls the period of the backtest. More... | |
string | AlgorithmId [get] |
Algorithm Id for this backtest or live algorithm. More... | |
bool | LiveMode [get] |
Boolean property indicating the algorithm is currently running in live mode. More... | |
AlgorithmMode | AlgorithmMode [get] |
Algorithm running mode. More... | |
DeploymentTarget | DeploymentTarget [get] |
Deployment target, either local or cloud. More... | |
ConcurrentQueue< string > | DebugMessages [get, set] |
Storage for debugging messages before the event handler has passed control back to the Lean Engine. More... | |
ConcurrentQueue< string > | LogMessages [get, set] |
Storage for log messages before the event handlers have passed control back to the Lean Engine. More... | |
Exception | RunTimeError [get, set] |
Gets the run time error from the algorithm, or null if none was encountered. More... | |
ConcurrentQueue< string > | ErrorMessages [get, set] |
List of error messages generated by the user's code calling the "Error" function. More... | |
Slice | CurrentSlice [get] |
Returns the current Slice object More... | |
ObjectStore | ObjectStore [get] |
Gets the object store, used for persistence More... | |
StatisticsResults??? | Statistics [get] |
The current statistics for the running algorithm. More... | |
IBenchmark | Benchmark [get] |
Benchmark More... | |
bool | DebugMode [get, set] |
Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets More... | |
IUniverseSelectionModel | UniverseSelection [get, set] |
Gets or sets the universe selection model. More... | |
IAlphaModel | Alpha [get, set] |
Gets or sets the alpha model More... | |
InsightManager | Insights [get] |
Gets the insight manager More... | |
IPortfolioConstructionModel | PortfolioConstruction [get, set] |
Gets or sets the portfolio construction model More... | |
IExecutionModel | Execution [get, set] |
Gets or sets the execution model More... | |
IRiskManagementModel | RiskManagement [get, set] |
Gets or sets the risk management model More... | |
IHistoryProvider | HistoryProvider [get, set] |
Gets or sets the history provider for the algorithm More... | |
bool | IsWarmingUp [get] |
Gets whether or not this algorithm is still warming up More... | |
bool | EnableAutomaticIndicatorWarmUp [get, set] |
Gets whether or not WarmUpIndicator is allowed to warm up indicators More... | |
ConcurrentDictionary< string, string > | RuntimeStatistics = new ConcurrentDictionary<string, string>() [get] |
Access to the runtime statistics property. User provided statistics. More... | |
virtual PandasConverter | PandasConverter [get] |
PandasConverter for this Algorithm More... | |
SecurityTransactionManager | Transactions [get, set] |
Transaction Manager - Process transaction fills and order management. More... | |
UniverseManager | UniverseManager [get] |
Gets universe manager which holds universes keyed by their symbol More... | |
UniverseSettings | UniverseSettings [get] |
Gets the universe settings to be used when adding securities via universe selection More... | |
UniverseDefinitions | Universe [get] |
Gets a helper that provides pre-defined universe definitions, such as top dollar volume More... | |
Events | |
AlgorithmEvent< GeneratedInsightsCollection > | InsightsGenerated |
Event fired when the algorithm generates insights More... | |
AlgorithmEvent< string > | NameUpdated |
Event fired algorithm's name is changed More... | |
AlgorithmEvent< HashSet< string > > | TagsUpdated |
Event fired when the tag collection is updated More... | |
QC Algorithm Base Class - Handle the basic requirements of a trading algorithm, allowing user to focus on event methods. The QCAlgorithm class implements Portfolio, Securities, Transactions and Data Subscription Management.
Definition at line 67 of file QCAlgorithm.cs.
QuantConnect.Algorithm.QCAlgorithm.QCAlgorithm | ( | ) |
QCAlgorithm Base Class Constructor - Initialize the underlying QCAlgorithm components. QCAlgorithm manages the transactions, portfolio, charting and security subscriptions for the users algorithms.
Definition at line 158 of file QCAlgorithm.cs.
|
virtual |
Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.
Reimplemented in QuantConnect.Report.PortfolioLooperAlgorithm.
Definition at line 754 of file QCAlgorithm.cs.
|
virtual |
Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method
Definition at line 766 of file QCAlgorithm.cs.
|
virtual |
Called when the algorithm has completed initialization and warm up.
Definition at line 842 of file QCAlgorithm.cs.
string QuantConnect.Algorithm.QCAlgorithm.GetParameter | ( | string | name, |
string | defaultValue = null |
||
) |
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 | The name of the parameter to get |
defaultValue | The default value to return |
Definition at line 854 of file QCAlgorithm.cs.
int QuantConnect.Algorithm.QCAlgorithm.GetParameter | ( | string | name, |
int | defaultValue | ||
) |
Gets the parameter with the specified name parsed as an integer. If a parameter with the specified name does not exist, or the conversion is not possible, the given default value is returned
name | The name of the parameter to get |
defaultValue | The default value to return |
Definition at line 867 of file QCAlgorithm.cs.
double QuantConnect.Algorithm.QCAlgorithm.GetParameter | ( | string | name, |
double | defaultValue | ||
) |
Gets the parameter with the specified name parsed as a double. If a parameter with the specified name does not exist, or the conversion is not possible, the given default value is returned
name | The name of the parameter to get |
defaultValue | The default value to return |
Definition at line 880 of file QCAlgorithm.cs.
decimal QuantConnect.Algorithm.QCAlgorithm.GetParameter | ( | string | name, |
decimal | defaultValue | ||
) |
Gets the parameter with the specified name parsed as a decimal. If a parameter with the specified name does not exist, or the conversion is not possible, the given default value is returned
name | The name of the parameter to get |
defaultValue | The default value to return |
Definition at line 894 of file QCAlgorithm.cs.
IReadOnlyDictionary<string, string> QuantConnect.Algorithm.QCAlgorithm.GetParameters | ( | ) |
Gets a read-only dictionary with all current parameters
Definition at line 904 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetParameters | ( | Dictionary< string, string > | parameters | ) |
Sets the parameters from the dictionary
parameters | Dictionary containing the parameter names to values |
Definition at line 914 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetAvailableDataTypes | ( | Dictionary< SecurityType, List< TickType >> | availableDataTypes | ) |
Set the available data feeds in the SecurityManager
availableDataTypes | The different TickType each Security supports |
Definition at line 933 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetSecurityInitializer | ( | ISecurityInitializer | securityInitializer | ) |
Sets the security initializer, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities.
securityInitializer | The security initializer |
Definition at line 953 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetSecurityInitializer | ( | Action< Security, bool > | securityInitializer | ) |
Sets the security initializer function, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities.
securityInitializer | The security initializer function |
Definition at line 979 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetSecurityInitializer | ( | Action< Security > | securityInitializer | ) |
Sets the security initializer function, used to initialize/configure securities after creation. The initializer will be applied to all universes and manually added securities.
securityInitializer | The security initializer function |
Definition at line 991 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetOptionChainProvider | ( | IOptionChainProvider | optionChainProvider | ) |
Sets the option chain provider, used to get the list of option contracts for an underlying symbol
optionChainProvider | The option chain provider |
Definition at line 1001 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetFutureChainProvider | ( | IFutureChainProvider | futureChainProvider | ) |
Sets the future chain provider, used to get the list of future contracts for an underlying symbol
futureChainProvider | The future chain provider |
Definition at line 1011 of file QCAlgorithm.cs.
|
virtual |
Event - v3.0 DATA EVENT HANDLER: (Pattern) Basic template for user to override for receiving all subscription data in a single event
TradeBars bars = slice.Bars; Ticks ticks = slice.Ticks; TradeBar spy = slice["SPY"]; List{Tick} aaplTicks = slice["AAPL"] Quandl oil = slice["OIL"] dynamic anySymbol = slice[symbol]; DataDictionary{Quandl} allQuandlData = slice.Get{Quand} Quandl oil = slice.Get{Quandl}("OIL")
slice | The current slice of data keyed by symbol string |
Definition at line 1031 of file QCAlgorithm.cs.
|
virtual |
Event handler to be called when there's been a split event
splits | The current time slice splits |
Definition at line 1067 of file QCAlgorithm.cs.
|
virtual |
Event handler to be called when there's been a dividend event
dividends | The current time slice dividends |
Definition at line 1076 of file QCAlgorithm.cs.
|
virtual |
Event handler to be called when there's been a delistings event
delistings | The current time slice delistings |
Definition at line 1085 of file QCAlgorithm.cs.
|
virtual |
Event handler to be called when there's been a symbol changed event
symbolsChanged | The current time slice symbol changed events |
Definition at line 1094 of file QCAlgorithm.cs.
|
virtual |
Event fired each time the we add/remove securities from the data feed
changes | Security additions/removals for this time step |
Definition at line 1104 of file QCAlgorithm.cs.
|
virtual |
Margin call event handler. This method is called right before the margin call orders are placed in the market.
requests | The orders to be executed to bring this algorithm within margin limits |
Definition at line 1114 of file QCAlgorithm.cs.
|
virtual |
Margin call warning event handler. This method is called when Portfolio.MarginRemaining is under 5% of your Portfolio.TotalPortfolioValue
Definition at line 1123 of file QCAlgorithm.cs.
|
virtual |
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).
Method is called 10 minutes before closing to allow user to close out position.
Deprecated because different assets have different market close times, and because Python does not support two methods with the same name
Definition at line 1135 of file QCAlgorithm.cs.
|
virtual |
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).
This method is left for backwards compatibility and is invoked via OnEndOfDay(Symbol), if that method is override then this method will not be called without a called to base.OnEndOfDay(string)
symbol | Asset symbol for this end of day event. Forex and equities have different closing hours. |
Definition at line 1149 of file QCAlgorithm.cs.
|
virtual |
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 | Asset symbol for this end of day event. Forex and equities have different closing hours. |
Definition at line 1158 of file QCAlgorithm.cs.
|
virtual |
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.
Definition at line 1167 of file QCAlgorithm.cs.
|
virtual |
Order fill event handler. On an order fill update the resulting information is passed to this method.
orderEvent | Order event details containing details of the events |
This method can be called asynchronously and so should only be used by seasoned C# experts. Ensure you use proper locks on thread-unsafe objects
Definition at line 1178 of file QCAlgorithm.cs.
|
virtual |
Option assignment event handler. On an option assignment event for short legs the resulting information is passed to this method.
assignmentEvent | Option exercise event details containing details of the assignment |
This method can be called asynchronously and so should only be used by seasoned C# experts. Ensure you use proper locks on thread-unsafe objects
Definition at line 1189 of file QCAlgorithm.cs.
|
virtual |
Brokerage message event handler. This method is called for all types of brokerage messages.
Definition at line 1200 of file QCAlgorithm.cs.
|
virtual |
Brokerage disconnected event handler. This method is called when the brokerage connection is lost.
Definition at line 1209 of file QCAlgorithm.cs.
|
virtual |
Brokerage reconnected event handler. This method is called when the brokerage connection is restored after a disconnection.
Definition at line 1218 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetDateTime | ( | DateTime | frontier | ) |
Update the internal algorithm time frontier.
For internal use only to advance time.
frontier | Current utc datetime. |
Definition at line 1229 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetTimeZone | ( | string | timeZone | ) |
Sets the time zone of the Time property in the algorithm
timeZone | The desired time zone |
Definition at line 1243 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetTimeZone | ( | DateTimeZone | timeZone | ) |
Sets the time zone of the Time property in the algorithm
timeZone | The desired time zone |
Definition at line 1263 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBrokerageModel | ( | BrokerageName | brokerage, |
AccountType | accountType = AccountType.Margin |
||
) |
Sets the brokerage to emulate in backtesting or paper trading. This can be used for brokerages that have been implemented in LEAN
brokerage | The brokerage to emulate |
accountType | The account type (Cash or Margin) |
Definition at line 1301 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBrokerageModel | ( | IBrokerageModel | model | ) |
Sets the brokerage to emulate in backtesting or paper trading. This can be used to set a custom brokerage model.
model | The brokerage model to use |
Definition at line 1312 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBrokerageMessageHandler | ( | IBrokerageMessageHandler | handler | ) |
Sets the implementation used to handle messages from the brokerage. The default implementation will forward messages to debug or error and when a BrokerageMessageType.Error occurs, the algorithm is stopped.
handler | The message handler to use |
Definition at line 1347 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetRiskFreeInterestRateModel | ( | IRiskFreeInterestRateModel | model | ) |
Sets the risk free interest rate model to be used in the algorithm
model | The risk free interest rate model to use |
Definition at line 1357 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBenchmark | ( | SecurityType | securityType, |
string | symbol | ||
) |
Sets the benchmark used for computing statistics of the algorithm to the specified symbol
symbol | symbol to use as the benchmark |
securityType | Is the symbol an equity, forex, base, etc. Default SecurityType.Equity |
Must use symbol that is available to the trade engine in your data store(not strictly enforced)
Definition at line 1374 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBenchmark | ( | string | ticker | ) |
Sets the benchmark used for computing statistics of the algorithm to the specified ticker, defaulting to SecurityType.Equity if the ticker doesn't exist in the algorithm
ticker | Ticker to use as the benchmark |
Overload to accept ticker without passing SecurityType. If ticker is in portfolio it will use that SecurityType, otherwise will default to SecurityType.Equity
Definition at line 1402 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBenchmark | ( | Symbol | symbol | ) |
Sets the benchmark used for computing statistics of the algorithm to the specified symbol
symbol | symbol to use as the benchmark |
Definition at line 1431 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBenchmark | ( | Func< DateTime, decimal > | benchmark | ) |
Sets the specified function as the benchmark, this function provides the value of the benchmark at each date/time requested
benchmark | The benchmark producing function |
Definition at line 1450 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetName | ( | string | name | ) |
Sets name to the currently running backtest
name | The name for the backtest |
Definition at line 1478 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddTag | ( | string | tag | ) |
Adds a tag to the algorithm
tag | The tag to add |
Definition at line 1487 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetTags | ( | HashSet< string > | tags | ) |
Sets the tags for the algorithm
tags | The tags |
Definition at line 1513 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetAccountCurrency | ( | string | accountCurrency, |
decimal? | startingCash = null |
||
) |
Sets the account currency cash symbol this algorithm is to manage, as well as the starting cash in this currency if given
Has to be called during Initialize before calling SetCash(decimal) or adding any Security
accountCurrency | The account currency cash symbol to set |
startingCash | The account currency starting cash to set |
Definition at line 1527 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetCash | ( | double | startingCash | ) |
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.
startingCash | Starting cash for the strategy backtest |
Alias of SetCash(decimal)
Definition at line 1554 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetCash | ( | int | startingCash | ) |
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.
startingCash | Starting cash for the strategy backtest |
Alias of SetCash(decimal)
Definition at line 1566 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetCash | ( | decimal | startingCash | ) |
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.
startingCash | Starting cash for the strategy backtest |
Definition at line 1577 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetCash | ( | string | symbol, |
decimal | startingCash, | ||
decimal | conversionRate = 0 |
||
) |
Set the cash for the specified symbol
symbol | The cash symbol to set |
startingCash | Decimal cash value of portfolio |
conversionRate | The current conversion rate for the |
Definition at line 1596 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetStartDate | ( | int | year, |
int | month, | ||
int | day | ||
) |
Set the start date for backtest.
day | Int starting date 1-30 |
month | Int month starting date |
year | Int year starting date |
Wrapper for SetStartDate(DateTime). Must be less than end date. Ignored in live trading mode.
Definition at line 1619 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetEndDate | ( | int | year, |
int | month, | ||
int | day | ||
) |
Set the end date for a backtest run
day | Int end date 1-30 |
month | Int month end date |
year | Int year end date |
Wrapper for SetEndDate(datetime).
Definition at line 1645 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetAlgorithmId | ( | string | algorithmId | ) |
Set the algorithm id (backtestId or live deployId for the algorithm).
algorithmId | String Algorithm Id |
Intended for internal QC Lean Engine use only as a setter for AlgorithmId
Definition at line 1668 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetStartDate | ( | DateTime | start | ) |
Set the start date for the backtest
start | Datetime Start date for backtest |
Must be less than end date and within data available
Definition at line 1680 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetEndDate | ( | DateTime | end | ) |
Set the end date for a backtest.
end | Datetime value for end date |
Must be greater than the start date
Definition at line 1721 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetLocked | ( | ) |
Lock the algorithm initialization to avoid user modifiying cash and data stream subscriptions
Intended for Internal QC Lean Engine use only to prevent accidental manipulation of important properties
Definition at line 1749 of file QCAlgorithm.cs.
bool QuantConnect.Algorithm.QCAlgorithm.GetLocked | ( | ) |
Gets whether or not this algorithm has been locked and fully initialized
Definition at line 1762 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetLiveMode | ( | bool | live | ) |
Set live mode state of the algorithm run: Public setter for the algorithm property LiveMode.
Definition at line 1771 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetAlgorithmMode | ( | AlgorithmMode | algorithmMode | ) |
Sets the algorithm running mode
algorithmMode | Algorithm mode |
Definition at line 1792 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetDeploymentTarget | ( | DeploymentTarget | deploymentTarget | ) |
Sets the algorithm deployment target
deploymentTarget | Deployment target |
Definition at line 1805 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetTradeBuilder | ( | ITradeBuilder | tradeBuilder | ) |
Set the ITradeBuilder implementation to generate trades from executions and market price updates
Definition at line 1817 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddSecurity | ( | SecurityType | securityType, |
string | ticker, | ||
Resolution? | resolution = null , |
||
bool | fillForward = true , |
||
bool | extendedMarketHours = false , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null |
||
) |
Add specified data to our data subscriptions. QuantConnect will funnel this data to the handle data routine.
securityType | MarketType Type: Equity, Commodity, Future, FOREX or Crypto |
ticker | The security ticker |
resolution | Resolution of the Data Required |
fillForward | When no data available on a tradebar, return the last data that was generated |
extendedMarketHours | Use extended market hours data |
dataMappingMode | The contract mapping mode to use for the security |
dataNormalizationMode | The price scaling mode to use for the security |
Definition at line 1835 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddSecurity | ( | SecurityType | securityType, |
string | ticker, | ||
Resolution? | resolution, | ||
bool | fillForward, | ||
decimal | leverage, | ||
bool | extendedMarketHours, | ||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null |
||
) |
Add specified data to required list. QC will funnel this data to the handle data routine.
securityType | MarketType Type: Equity, Commodity, Future, FOREX or Crypto |
ticker | The security ticker |
resolution | Resolution of the Data Required |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
extendedMarketHours | Use extended market hours data |
dataMappingMode | The contract mapping mode to use for the security |
dataNormalizationMode | The price scaling mode to use for the security |
AddSecurity(SecurityType securityType, Symbol symbol, Resolution resolution, bool fillForward, decimal leverage, bool extendedMarketHours)
Definition at line 1854 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddSecurity | ( | SecurityType | securityType, |
string | ticker, | ||
Resolution? | resolution, | ||
string | market, | ||
bool | fillForward, | ||
decimal | leverage, | ||
bool | extendedMarketHours, | ||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null |
||
) |
Set a required SecurityType-symbol and resolution for algorithm
securityType | MarketType Type: Equity, Commodity, Future, FOREX or Crypto |
ticker | The security ticker, e.g. AAPL |
resolution | Resolution of the MarketType required: MarketData, Second or Minute |
market | The market the requested security belongs to, such as 'usa' or 'fxcm' |
fillForward | If true, returns the last available data even if none in that timeslice. |
leverage | leverage for this security |
extendedMarketHours | Use extended market hours data |
dataMappingMode | The contract mapping mode to use for the security |
dataNormalizationMode | The price scaling mode to use for the security |
Definition at line 1873 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddSecurity | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage , |
||
bool | extendedMarketHours = false , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int | contractDepthOffset = 0 |
||
) |
Set a required SecurityType-symbol and resolution for algorithm
symbol | The security Symbol |
resolution | Resolution of the MarketType required: MarketData, Second or Minute |
fillForward | If true, returns the last available data even if none in that timeslice. |
leverage | leverage for this security |
extendedMarketHours | Use extended market hours data |
dataMappingMode | The contract mapping mode to use for the security |
dataNormalizationMode | The price scaling mode to use for the security |
contractDepthOffset | The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract |
Definition at line 1928 of file QCAlgorithm.cs.
Equity QuantConnect.Algorithm.QCAlgorithm.AddEquity | ( | string | ticker, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage , |
||
bool | extendedMarketHours = false , |
||
DataNormalizationMode? | dataNormalizationMode = null |
||
) |
Creates and adds a new Equity security to the algorithm
ticker | The equity ticker symbol |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The equity's market,
|
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
leverage | The requested leverage for this equity. Default is set by SecurityInitializer |
extendedMarketHours | True to send data during pre and post market sessions. Default is |
false
dataNormalizationMode | The price scaling mode to use for the equity |
Definition at line 2053 of file QCAlgorithm.cs.
Option QuantConnect.Algorithm.QCAlgorithm.AddOption | ( | string | underlying, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage |
||
) |
Creates and adds a new equity Option security to the algorithm
underlying | The underlying equity ticker |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The equity's market,
|
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
leverage | The requested leverage for this equity. Default is set by SecurityInitializer |
Definition at line 2069 of file QCAlgorithm.cs.
Option QuantConnect.Algorithm.QCAlgorithm.AddOption | ( | Symbol | underlying, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage |
||
) |
Creates and adds a new Option security to the algorithm. This method can be used to add options with non-equity asset classes to the algorithm (e.g. Future Options).
underlying | Underlying asset Symbol to use as the option's underlying |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The option's market,
|
fillForward | 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 | The requested leverage for the |
KeyNotFoundException |
Definition at line 2096 of file QCAlgorithm.cs.
Option QuantConnect.Algorithm.QCAlgorithm.AddOption | ( | Symbol | underlying, |
string | targetOption, | ||
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage |
||
) |
Creates and adds a new Option security to the algorithm. This method can be used to add options with non-equity asset classes to the algorithm (e.g. Future Options).
underlying | Underlying asset Symbol to use as the option's underlying |
targetOption | 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 | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The option's market,
|
fillForward | 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 | The requested leverage for the |
KeyNotFoundException |
Definition at line 2115 of file QCAlgorithm.cs.
Future QuantConnect.Algorithm.QCAlgorithm.AddFuture | ( | string | ticker, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage , |
||
bool | extendedMarketHours = false , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int | contractDepthOffset = 0 |
||
) |
Creates and adds a new Future security to the algorithm
ticker | The future ticker |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The futures market,
|
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
leverage | The requested leverage for this equity. Default is set by SecurityInitializer |
extendedMarketHours | Use extended market hours data |
dataMappingMode | The contract mapping mode to use for the continuous future contract |
dataNormalizationMode | The price scaling mode to use for the continuous future contract |
contractDepthOffset | 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 |
Definition at line 2164 of file QCAlgorithm.cs.
Future QuantConnect.Algorithm.QCAlgorithm.AddFutureContract | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage , |
||
bool | extendedMarketHours = false |
||
) |
Creates and adds a new single Future contract to the algorithm
symbol | The futures contract symbol |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
leverage | The requested leverage for this equity. Default is set by SecurityInitializer |
extendedMarketHours | Use extended market hours data |
Definition at line 2200 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddFutureOption | ( | Symbol | symbol, |
Func< OptionFilterUniverse, OptionFilterUniverse > | optionFilter = null |
||
) |
Creates and adds a new Future Option contract to the algorithm.
symbol | The Future canonical symbol (i.e. Symbol returned from AddFuture) |
optionFilter | Filter to apply to option contracts loaded as part of the universe |
ArgumentException | The symbol provided is not canonical. |
Definition at line 2214 of file QCAlgorithm.cs.
Option QuantConnect.Algorithm.QCAlgorithm.AddFutureOptionContract | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage , |
||
bool | extendedMarketHours = false |
||
) |
Adds a future option contract to the algorithm.
symbol | Option contract Symbol |
resolution | Resolution of the option contract, i.e. the granularity of the data |
fillForward | If true, this will fill in missing data points with the previous data point |
leverage | The leverage to apply to the option contract |
extendedMarketHours | Use extended market hours data |
ArgumentException | Symbol is canonical (i.e. a generic Symbol returned from AddFuture or AddOption(string, Resolution?, string, bool, decimal)) |
Definition at line 2235 of file QCAlgorithm.cs.
IndexOption QuantConnect.Algorithm.QCAlgorithm.AddIndexOption | ( | string | underlying, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true |
||
) |
Creates and adds index options to the algorithm.
underlying | The underlying ticker of the Index Option |
resolution | Resolution of the index option contracts, i.e. the granularity of the data |
market | The foreign exchange trading market,
|
fillForward | If true, this will fill in missing data points with the previous data point |
Definition at line 2255 of file QCAlgorithm.cs.
IndexOption QuantConnect.Algorithm.QCAlgorithm.AddIndexOption | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
bool | fillForward = true |
||
) |
Creates and adds index options to the algorithm.
symbol | The Symbol of the Security returned from AddIndex |
resolution | Resolution of the index option contracts, i.e. the granularity of the data |
fillForward | If true, this will fill in missing data points with the previous data point |
Definition at line 2268 of file QCAlgorithm.cs.
IndexOption QuantConnect.Algorithm.QCAlgorithm.AddIndexOption | ( | Symbol | symbol, |
string | targetOption, | ||
Resolution? | resolution = null , |
||
bool | fillForward = true |
||
) |
Creates and adds index options to the algorithm.
symbol | The Symbol of the Security returned from AddIndex |
targetOption | 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 of the index option contracts, i.e. the granularity of the data |
fillForward | If true, this will fill in missing data points with the previous data point |
Definition at line 2282 of file QCAlgorithm.cs.
IndexOption QuantConnect.Algorithm.QCAlgorithm.AddIndexOption | ( | string | underlying, |
string | targetOption, | ||
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true |
||
) |
Creates and adds index options to the algorithm.
underlying | The underlying ticker of the Index Option |
targetOption | 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 of the index option contracts, i.e. the granularity of the data |
market | The foreign exchange trading market,
|
fillForward | If true, this will fill in missing data points with the previous data point |
Definition at line 2302 of file QCAlgorithm.cs.
IndexOption QuantConnect.Algorithm.QCAlgorithm.AddIndexOptionContract | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
bool | fillForward = true |
||
) |
Adds an index option contract to the algorithm.
symbol | Symbol of the index option contract |
resolution | Resolution of the index option contract, i.e. the granularity of the data |
fillForward | If true, this will fill in missing data points with the previous data point |
ArgumentException | The provided Symbol is not an Index Option |
Definition at line 2323 of file QCAlgorithm.cs.
Option QuantConnect.Algorithm.QCAlgorithm.AddOptionContract | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage , |
||
bool | extendedMarketHours = false |
||
) |
Creates and adds a new single Option contract to the algorithm
symbol | The option contract symbol |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
leverage | The requested leverage for this equity. Default is set by SecurityInitializer |
extendedMarketHours | Use extended market hours data |
Definition at line 2343 of file QCAlgorithm.cs.
Forex QuantConnect.Algorithm.QCAlgorithm.AddForex | ( | string | ticker, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage |
||
) |
Creates and adds a new Forex security to the algorithm
ticker | The currency pair |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The foreign exchange trading market,
|
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
leverage | The requested leverage for this equity. Default is set by SecurityInitializer |
Definition at line 2433 of file QCAlgorithm.cs.
Cfd QuantConnect.Algorithm.QCAlgorithm.AddCfd | ( | string | ticker, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage |
||
) |
Creates and adds a new Cfd security to the algorithm
ticker | The currency pair |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The cfd trading market,
|
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
leverage | The requested leverage for this equity. Default is set by SecurityInitializer |
Definition at line 2448 of file QCAlgorithm.cs.
Index QuantConnect.Algorithm.QCAlgorithm.AddIndex | ( | string | ticker, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true |
||
) |
Creates and adds a new Index security to the algorithm
ticker | The currency pair |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The index trading market,
|
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
Definition at line 2463 of file QCAlgorithm.cs.
Crypto QuantConnect.Algorithm.QCAlgorithm.AddCrypto | ( | string | ticker, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage |
||
) |
Creates and adds a new Crypto security to the algorithm
ticker | The currency pair |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The cfd trading market,
|
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
leverage | The requested leverage for this equity. Default is set by SecurityInitializer |
Definition at line 2479 of file QCAlgorithm.cs.
CryptoFuture QuantConnect.Algorithm.QCAlgorithm.AddCryptoFuture | ( | string | ticker, |
Resolution? | resolution = null , |
||
string | market = null , |
||
bool | fillForward = true , |
||
decimal | leverage = Security.NullLeverage |
||
) |
Creates and adds a new CryptoFuture security to the algorithm
ticker | The currency pair |
resolution | The Resolution of market data, Tick, Second, Minute, Hour, or Daily. Default is Resolution.Minute |
market | The cfd trading market,
|
fillForward | If true, returns the last available data even if none in that timeslice. Default is |
true
leverage | The requested leverage for this equity. Default is set by SecurityInitializer |
Definition at line 2494 of file QCAlgorithm.cs.
bool QuantConnect.Algorithm.QCAlgorithm.RemoveOptionContract | ( | Symbol | symbol | ) |
Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings
symbol | The symbol of the security to be removed |
Sugar syntax for AddOptionContract
Definition at line 2506 of file QCAlgorithm.cs.
bool QuantConnect.Algorithm.QCAlgorithm.RemoveSecurity | ( | Symbol | symbol | ) |
Removes the security with the specified symbol. This will cancel all open orders and then liquidate any existing holdings
symbol | The symbol of the security to be removed |
Definition at line 2517 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData< T > | ( | string | ticker, |
Resolution? | resolution = null |
||
) |
AddData
T | 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) |
ticker | Key/Ticker for data |
resolution | Resolution of the data |
Generic type T must implement base data
T | : | IBaseData | |
T | : | new() |
Definition at line 2602 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData< T > | ( | Symbol | underlying, |
Resolution? | resolution = null |
||
) |
AddData
T | 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) |
underlying | The underlying symbol for the custom data |
resolution | Resolution of the data |
Generic type T must implement base data
T | : | IBaseData | |
T | : | new() |
Definition at line 2621 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData< T > | ( | string | ticker, |
Resolution? | resolution, | ||
bool | fillForward, | ||
decimal | leverage = 1.0m |
||
) |
AddData
T | 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) |
ticker | Key/Ticker for data |
resolution | Resolution of the Data Required |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
Generic type T must implement base data
T | : | IBaseData | |
T | : | new() |
Definition at line 2643 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData< T > | ( | Symbol | underlying, |
Resolution? | resolution, | ||
bool | fillForward, | ||
decimal | leverage = 1.0m |
||
) |
AddData
T | 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) |
underlying | The underlying symbol for the custom data |
resolution | Resolution of the Data Required |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
Generic type T must implement base data
T | : | IBaseData | |
T | : | new() |
Definition at line 2660 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData< T > | ( | string | ticker, |
Resolution? | resolution, | ||
DateTimeZone | timeZone, | ||
bool | fillForward = false , |
||
decimal | leverage = 1.0m |
||
) |
AddData
T | a new user defined data source, requiring only the minimum config options. |
ticker | Key/Ticker for data |
resolution | Resolution of the Data Required |
timeZone | Specifies the time zone of the raw data |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
Generic type T must implement base data
T | : | IBaseData | |
T | : | new() |
Definition at line 2677 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData< T > | ( | Symbol | underlying, |
Resolution? | resolution, | ||
DateTimeZone | timeZone, | ||
bool | fillForward = false , |
||
decimal | leverage = 1.0m |
||
) |
AddData
T | a new user defined data source, requiring only the minimum config options. |
underlying | The underlying symbol for the custom data |
resolution | Resolution of the Data Required |
timeZone | Specifies the time zone of the raw data |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
Generic type T must implement base data
T | : | IBaseData | |
T | : | new() |
Definition at line 2694 of file QCAlgorithm.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData< T > | ( | string | ticker, |
SymbolProperties | properties, | ||
SecurityExchangeHours | exchangeHours, | ||
Resolution? | resolution = null , |
||
bool | fillForward = false , |
||
decimal | leverage = 1.0m |
||
) |
AddData
T | a new user defined data source including symbol properties and exchange hours, all other vars are not required and will use defaults. |
ticker | Key/Ticker for data |
properties | The properties of this new custom data |
exchangeHours | The Exchange hours of this symbol |
resolution | Resolution of the Data Required |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
T | : | IBaseData | |
T | : | new() |
Definition at line 2712 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Debug | ( | string | message | ) |
Send a debug message to the web console:
message | Message to send to debug console |
Definition at line 2732 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Debug | ( | int | message | ) |
Send a debug message to the web console:
message | Message to send to debug console |
Definition at line 2746 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Debug | ( | double | message | ) |
Send a debug message to the web console:
message | Message to send to debug console |
Definition at line 2758 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Debug | ( | decimal | message | ) |
Send a debug message to the web console:
message | Message to send to debug console |
Definition at line 2770 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Log | ( | string | message | ) |
Added another method for logging if user guessed.
message | String message to log. |
Definition at line 2782 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Log | ( | int | message | ) |
Added another method for logging if user guessed.
message | Int message to log. |
Definition at line 2795 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Log | ( | double | message | ) |
Added another method for logging if user guessed.
message | Double message to log. |
Definition at line 2807 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Log | ( | decimal | message | ) |
Added another method for logging if user guessed.
message | Decimal message to log. |
Definition at line 2819 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Error | ( | string | message | ) |
Send a string error message to the Console.
message | Message to display in errors grid |
Definition at line 2831 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Error | ( | int | message | ) |
Send a int error message to the Console.
message | Message to display in errors grid |
Definition at line 2845 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Error | ( | double | message | ) |
Send a double error message to the Console.
message | Message to display in errors grid |
Definition at line 2857 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Error | ( | decimal | message | ) |
Send a decimal error message to the Console.
message | Message to display in errors grid |
Definition at line 2869 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Error | ( | Exception | error | ) |
Send a string error message to the Console.
error | Exception object captured from a try catch loop |
Definition at line 2881 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.Quit | ( | string | message = "" | ) |
Terminate the algorithm after processing the current event handler.
message | Exit message to display on quitting |
Definition at line 2894 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetQuit | ( | bool | quit | ) |
Set the Quit flag property of the algorithm.
Intended for internal use by the QuantConnect Lean Engine only.
quit | Boolean quit state |
Definition at line 2907 of file QCAlgorithm.cs.
Symbol QuantConnect.Algorithm.QCAlgorithm.Symbol | ( | string | ticker | ) |
Converts the string 'ticker' symbol into a full Symbol object This requires that the string 'ticker' has been added to the algorithm
ticker | The ticker symbol. This should be the ticker symbol as it was added to the algorithm |
Definition at line 2924 of file QCAlgorithm.cs.
string QuantConnect.Algorithm.QCAlgorithm.Ticker | ( | Symbol | symbol | ) |
For the given symbol will resolve the ticker it used at the current algorithm date
symbol | The symbol to get the ticker for |
Definition at line 2936 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetHistoryProvider | ( | IHistoryProvider | historyProvider | ) |
Set the historical data provider
historyProvider | Historical data provider |
Definition at line 2978 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetRunTimeError | ( | Exception | exception | ) |
Set the runtime error
exception | Represents error that occur during execution |
Definition at line 2993 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetStatus | ( | AlgorithmStatus | status | ) |
Set the state of a live deployment
status | Live deployment status |
Definition at line 3008 of file QCAlgorithm.cs.
string QuantConnect.Algorithm.QCAlgorithm.Download | ( | string | address | ) |
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI.
address | A string containing the URI to download |
string QuantConnect.Algorithm.QCAlgorithm.Download | ( | string | address, |
IEnumerable< KeyValuePair< string, string >> | headers | ||
) |
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI.
address | A string containing the URI to download |
headers | Defines header values to add to the request |
string QuantConnect.Algorithm.QCAlgorithm.Download | ( | string | address, |
IEnumerable< KeyValuePair< string, string >> | headers, | ||
string | userName, | ||
string | password | ||
) |
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI.
address | A string containing the URI to download |
headers | Defines header values to add to the request |
userName | The user name associated with the credentials |
password | The password for the user name associated with the credentials |
Definition at line 3045 of file QCAlgorithm.cs.
ScheduledEvent QuantConnect.Algorithm.QCAlgorithm.Train | ( | Action | trainingCode | ) |
Schedules the provided training code to execute immediately
trainingCode | The training code to be invoked |
Definition at line 3056 of file QCAlgorithm.cs.
ScheduledEvent QuantConnect.Algorithm.QCAlgorithm.Train | ( | IDateRule | dateRule, |
ITimeRule | timeRule, | ||
Action | trainingCode | ||
) |
Schedules the training code to run using the specified date and time rules
dateRule | Specifies what dates the event should run |
timeRule | Specifies the times on those dates the event should run |
trainingCode | The training code to be invoked |
Definition at line 3069 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetCurrentSlice | ( | Slice | slice | ) |
Sets the current slice
slice | The Slice object |
Definition at line 3097 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetApi | ( | IApi | api | ) |
Provide the API for the algorithm.
api | Initiated API |
Definition at line 3108 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetObjectStore | ( | IObjectStore | objectStore | ) |
Sets the object store
objectStore | The object store |
Definition at line 3119 of file QCAlgorithm.cs.
bool QuantConnect.Algorithm.QCAlgorithm.Shortable | ( | Symbol | symbol | ) |
Determines if the Symbol is shortable at the brokerage
symbol | Symbol to check if shortable |
Definition at line 3130 of file QCAlgorithm.cs.
bool QuantConnect.Algorithm.QCAlgorithm.Shortable | ( | Symbol | symbol, |
decimal | shortQuantity, | ||
int? | updateOrderId = null |
||
) |
Determines if the Symbol is shortable at the brokerage
symbol | Symbol to check if shortable |
shortQuantity | Order's quantity to check if it is currently shortable, taking into account current holdings and open orders |
updateOrderId | 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 |
Definition at line 3145 of file QCAlgorithm.cs.
long QuantConnect.Algorithm.QCAlgorithm.ShortableQuantity | ( | Symbol | symbol | ) |
Gets the quantity shortable for the given asset
Definition at line 3178 of file QCAlgorithm.cs.
Symbol QuantConnect.Algorithm.QCAlgorithm.ISIN | ( | string | isin, |
DateTime? | tradingDate = null |
||
) |
Converts an ISIN identifier into a Symbol
isin | The International Securities Identification Number (ISIN) of an asset |
tradingDate | The date that the stock being looked up is/was 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. |
Definition at line 3195 of file QCAlgorithm.cs.
string QuantConnect.Algorithm.QCAlgorithm.ISIN | ( | Symbol | symbol | ) |
Converts a Symbol into an ISIN identifier
symbol | The Symbol |
Definition at line 3207 of file QCAlgorithm.cs.
Symbol QuantConnect.Algorithm.QCAlgorithm.CompositeFIGI | ( | string | compositeFigi, |
DateTime? | tradingDate = null |
||
) |
Converts a composite FIGI identifier into a Symbol
compositeFigi | The composite Financial Instrument Global Identifier (FIGI) of an asset |
tradingDate | The date that the stock being looked up is/was 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. |
The composite FIGI differs from an exchange-level FIGI, in that it identifies an asset across all exchanges in a single country that the asset trades in.
Definition at line 3227 of file QCAlgorithm.cs.
string QuantConnect.Algorithm.QCAlgorithm.CompositeFIGI | ( | Symbol | symbol | ) |
Converts a Symbol into a composite FIGI identifier
symbol | The Symbol |
Definition at line 3239 of file QCAlgorithm.cs.
Symbol QuantConnect.Algorithm.QCAlgorithm.CUSIP | ( | string | cusip, |
DateTime? | tradingDate = null |
||
) |
Converts a CUSIP identifier into a Symbol
cusip | The CUSIP number of an asset |
tradingDate | The date that the stock being looked up is/was 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. |
Definition at line 3255 of file QCAlgorithm.cs.
string QuantConnect.Algorithm.QCAlgorithm.CUSIP | ( | Symbol | symbol | ) |
Converts a Symbol into a CUSIP identifier
symbol | The Symbol |
Definition at line 3267 of file QCAlgorithm.cs.
Symbol QuantConnect.Algorithm.QCAlgorithm.SEDOL | ( | string | sedol, |
DateTime? | tradingDate = null |
||
) |
Converts a SEDOL identifier into a Symbol
sedol | The SEDOL identifier of an asset |
tradingDate | The date that the stock being looked up is/was 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. |
Definition at line 3283 of file QCAlgorithm.cs.
string QuantConnect.Algorithm.QCAlgorithm.SEDOL | ( | Symbol | symbol | ) |
Converts a Symbol into a SEDOL identifier
symbol | The Symbol |
Definition at line 3295 of file QCAlgorithm.cs.
Symbol [] QuantConnect.Algorithm.QCAlgorithm.CIK | ( | int | cik, |
DateTime? | tradingDate = null |
||
) |
Converts a CIK identifier into Symbol array
cik | The CIK identifier of an asset |
tradingDate | The date that the stock being looked up is/was 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. |
Definition at line 3311 of file QCAlgorithm.cs.
int? QuantConnect.Algorithm.QCAlgorithm.CIK | ( | Symbol | symbol | ) |
Converts a Symbol into a CIK identifier
symbol | The Symbol |
Definition at line 3323 of file QCAlgorithm.cs.
Fundamental QuantConnect.Algorithm.QCAlgorithm.Fundamentals | ( | Symbol | symbol | ) |
Get the fundamental data for the requested symbol at the current time
symbol | The Symbol |
Definition at line 3335 of file QCAlgorithm.cs.
List<Fundamental> QuantConnect.Algorithm.QCAlgorithm.Fundamentals | ( | List< Symbol > | symbols | ) |
Get the fundamental data for the requested symbols at the current time
symbols | The Symbol |
Definition at line 3347 of file QCAlgorithm.cs.
OptionChain QuantConnect.Algorithm.QCAlgorithm.OptionChain | ( | Symbol | symbol, |
bool | flatten = false |
||
) |
Get the option chain for the specified symbol at the current time (Time)
symbol | The symbol for which the option chain is asked for. It can be either the canonical option or the underlying symbol. |
flatten | Whether to flatten the resulting data frame. Used from Python when accessing OptionChain.DataFrame. See History(PyObject, int, Resolution?, bool?, bool?, DataMappingMode?, DataNormalizationMode?, int?, bool) |
As of 2024/09/11, future options chain will not contain any additional data (e.g. daily price data, implied volatility and greeks), it will be populated with the contract symbol only. This is expected to change in the future.
Definition at line 3369 of file QCAlgorithm.cs.
OptionChains QuantConnect.Algorithm.QCAlgorithm.OptionChains | ( | IEnumerable< Symbol > | symbols, |
bool | flatten = false |
||
) |
Get the option chains for the specified symbols at the current time (Time)
symbols | The symbols for which the option chain is asked for. It can be either the canonical options or the underlying symbols. |
flatten | Whether to flatten the resulting data frame. Used from Python when accessing OptionChain.DataFrame. See History(PyObject, int, Resolution?, bool?, bool?, DataMappingMode?, DataNormalizationMode?, int?, bool) |
Definition at line 3388 of file QCAlgorithm.cs.
string QuantConnect.Algorithm.QCAlgorithm.Link | ( | object | command | ) |
Get an authenticated link to execute the given command instance
command | The target command |
Definition at line 3426 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddCommand< T > | ( | ) |
Register a command type to be used
T | The command type |
T | : | Command |
Definition at line 3440 of file QCAlgorithm.cs.
CommandResultPacket QuantConnect.Algorithm.QCAlgorithm.RunCommand | ( | CallbackCommand | command | ) |
Run a callback command instance
command | The callback command instance |
Definition at line 3454 of file QCAlgorithm.cs.
|
virtual |
Generic untyped command call handler
data | The associated data |
Definition at line 3487 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetStatisticsService | ( | IStatisticsService | statisticsService | ) |
Sets the statistics service instance to be used by the algorithm
statisticsService | The statistics service instance |
Definition at line 3573 of file QCAlgorithm.cs.
void QuantConnect.Algorithm.QCAlgorithm.FrameworkPostInitialize | ( | ) |
Called by setup handlers after Initialize and allows the algorithm a chance to organize the data gather in the Initialize method
Definition at line 86 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.OnFrameworkData | ( | Slice | slice | ) |
Used to send data updates to algorithm framework models
slice | The current data slice |
Definition at line 106 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.OnFrameworkSecuritiesChanged | ( | SecurityChanges | changes | ) |
Used to send security changes to algorithm framework models
changes | Security additions/removals for this time step |
Definition at line 252 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetUniverseSelection | ( | IUniverseSelectionModel | universeSelection | ) |
Sets the universe selection model
universeSelection | Model defining universes for the algorithm |
Definition at line 271 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddUniverseSelection | ( | IUniverseSelectionModel | universeSelection | ) |
Adds a new universe selection model
universeSelection | Model defining universes for the algorithm to add |
Definition at line 282 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetAlpha | ( | IAlphaModel | alpha | ) |
Sets the alpha model
alpha | Model that generates alpha |
Definition at line 307 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddAlpha | ( | IAlphaModel | alpha | ) |
Adds a new alpha model
alpha | Model that generates alpha to add |
Definition at line 317 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetPortfolioConstruction | ( | IPortfolioConstructionModel | portfolioConstruction | ) |
Sets the portfolio construction model
portfolioConstruction | Model defining how to build a portfolio from insights |
Definition at line 343 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetExecution | ( | IExecutionModel | execution | ) |
Sets the execution model
execution | Model defining how to execute trades to reach a portfolio target |
Definition at line 354 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetRiskManagement | ( | IRiskManagementModel | riskManagement | ) |
Sets the risk management model
riskManagement | Model defining how risk is managed |
Definition at line 365 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddRiskManagement | ( | IRiskManagementModel | riskManagement | ) |
Adds a new risk management model
riskManagement | Model defining how risk is managed to add |
Definition at line 376 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.EmitInsights | ( | params Insight[] | insights | ) |
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 | The array of insights to be emitted |
Definition at line 403 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.EmitInsights | ( | Insight | insight | ) |
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 | The insight to be emitted |
Definition at line 427 of file QCAlgorithm.Framework.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetAlpha | ( | PyObject | alpha | ) |
Sets the alpha model
alpha | Model that generates alpha |
Definition at line 32 of file QCAlgorithm.Framework.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddAlpha | ( | PyObject | alpha | ) |
Adds a new alpha model
alpha | Model that generates alpha to add |
Definition at line 50 of file QCAlgorithm.Framework.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetExecution | ( | PyObject | execution | ) |
Sets the execution model
execution | Model defining how to execute trades to reach a portfolio target |
Definition at line 69 of file QCAlgorithm.Framework.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetPortfolioConstruction | ( | PyObject | portfolioConstruction | ) |
Sets the portfolio construction model
portfolioConstruction | Model defining how to build a portfolio from alphas |
Definition at line 88 of file QCAlgorithm.Framework.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetUniverseSelection | ( | PyObject | universeSelection | ) |
Sets the universe selection model
universeSelection | Model defining universes for the algorithm |
Definition at line 107 of file QCAlgorithm.Framework.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddUniverseSelection | ( | PyObject | universeSelection | ) |
Adds a new universe selection model
universeSelection | Model defining universes for the algorithm to add |
Definition at line 123 of file QCAlgorithm.Framework.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetRiskManagement | ( | PyObject | riskManagement | ) |
Sets the risk management model
riskManagement | Model defining how risk is managed |
Definition at line 139 of file QCAlgorithm.Framework.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddRiskManagement | ( | PyObject | riskManagement | ) |
Adds a new risk management model
riskManagement | Model defining how risk is managed to add |
Definition at line 158 of file QCAlgorithm.Framework.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetWarmup | ( | TimeSpan | timeSpan | ) |
Sets the warm up period to the specified value
timeSpan | The amount of time to warm up, this does not take into account market hours/weekends |
Definition at line 60 of file QCAlgorithm.History.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetWarmUp | ( | TimeSpan | timeSpan | ) |
Sets the warm up period to the specified value
timeSpan | The amount of time to warm up, this does not take into account market hours/weekends |
Definition at line 70 of file QCAlgorithm.History.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetWarmup | ( | TimeSpan | timeSpan, |
Resolution? | resolution | ||
) |
Sets the warm up period to the specified value
timeSpan | The amount of time to warm up, this does not take into account market hours/weekends |
resolution | The resolution to request |
Definition at line 81 of file QCAlgorithm.History.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetWarmUp | ( | TimeSpan | timeSpan, |
Resolution? | resolution | ||
) |
Sets the warm up period to the specified value
timeSpan | The amount of time to warm up, this does not take into account market hours/weekends |
resolution | The resolution to request |
Definition at line 92 of file QCAlgorithm.History.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetWarmup | ( | int | barCount | ) |
Sets the warm up period by resolving a start date that would send that amount of data into the algorithm. The highest (smallest) resolution in the securities collection will be used. For example, if an algorithm has minute and daily data and 200 bars are requested, that would use 200 minute bars.
barCount | The number of data points requested for warm up |
Definition at line 105 of file QCAlgorithm.History.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetWarmUp | ( | int | barCount | ) |
Sets the warm up period by resolving a start date that would send that amount of data into the algorithm. The highest (smallest) resolution in the securities collection will be used. For example, if an algorithm has minute and daily data and 200 bars are requested, that would use 200 minute bars.
barCount | The number of data points requested for warm up |
Definition at line 118 of file QCAlgorithm.History.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetWarmup | ( | int | barCount, |
Resolution? | resolution | ||
) |
Sets the warm up period by resolving a start date that would send that amount of data into the algorithm.
barCount | The number of data points requested for warm up |
resolution | The resolution to request |
Definition at line 130 of file QCAlgorithm.History.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetWarmUp | ( | int | barCount, |
Resolution? | resolution | ||
) |
Sets the warm up period by resolving a start date that would send that amount of data into the algorithm.
barCount | The number of data points requested for warm up |
resolution | The resolution to request |
Definition at line 142 of file QCAlgorithm.History.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetFinishedWarmingUp | ( | ) |
Sets IAlgorithm.IsWarmingUp to false to indicate this algorithm has finished its warm up
Definition at line 151 of file QCAlgorithm.History.cs.
IEnumerable<Slice> QuantConnect.Algorithm.QCAlgorithm.History | ( | TimeSpan | span, |
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
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.
span | The span over which to request data. This is a calendar span, so take into consideration weekends and such |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 236 of file QCAlgorithm.History.cs.
IEnumerable<Slice> QuantConnect.Algorithm.QCAlgorithm.History | ( | int | periods, |
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
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.
periods | The number of bars to request |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 258 of file QCAlgorithm.History.cs.
IEnumerable<BaseDataCollection> QuantConnect.Algorithm.QCAlgorithm.History | ( | Universe | universe, |
int | periods, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
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 | The universe to fetch the data for |
periods | The number of bars to request |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 281 of file QCAlgorithm.History.cs.
IEnumerable<BaseDataCollection> QuantConnect.Algorithm.QCAlgorithm.History | ( | Universe | universe, |
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for all symbols of the requested type over the requested span. The symbol's configured values for resolution and fill forward behavior will be used The symbols must exist in the Securities collection.
universe | The universe to fetch the data for |
span | The span over which to request data. This is a calendar span, so take into consideration weekends and such |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 308 of file QCAlgorithm.History.cs.
IEnumerable<BaseDataCollection> QuantConnect.Algorithm.QCAlgorithm.History | ( | Universe | universe, |
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection.
universe | The universe to fetch the data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 330 of file QCAlgorithm.History.cs.
IEnumerable<DataDictionary<T> > QuantConnect.Algorithm.QCAlgorithm.History< T > | ( | TimeSpan | span, |
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for all symbols of the requested type over the requested span. The symbol's configured values for resolution and fill forward behavior will be used The symbols must exist in the Securities collection.
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
T | : | IBaseData |
Definition at line 355 of file QCAlgorithm.History.cs.
IEnumerable<DataDictionary<T> > QuantConnect.Algorithm.QCAlgorithm.History< T > | ( | IEnumerable< Symbol > | symbols, |
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbols over the requested span. The symbols must exist in the Securities collection.
T | The data type of the symbols |
symbols | The symbols to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
T | : | IBaseData |
Definition at line 380 of file QCAlgorithm.History.cs.
IEnumerable<DataDictionary<T> > QuantConnect.Algorithm.QCAlgorithm.History< T > | ( | IEnumerable< Symbol > | symbols, |
int | periods, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbols. The exact number of bars will be returned for each symbol. This may result in some data start earlier/later than others due to when various exchanges are open. The symbols must exist in the Securities collection.
T | The data type of the symbols |
symbols | The symbols to retrieve historical data for |
periods | The number of bars to request |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
T | : | IBaseData |
Definition at line 406 of file QCAlgorithm.History.cs.
IEnumerable<DataDictionary<T> > QuantConnect.Algorithm.QCAlgorithm.History< T > | ( | IEnumerable< Symbol > | symbols, |
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection.
T | The data type of the symbols |
symbols | The symbols to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
T | : | IBaseData |
Definition at line 433 of file QCAlgorithm.History.cs.
IEnumerable<T> QuantConnect.Algorithm.QCAlgorithm.History< T > | ( | Symbol | symbol, |
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbol over the request span. The symbol must exist in the Securities collection.
T | The data type of the symbol |
symbol | The symbol to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
T | : | IBaseData |
Definition at line 458 of file QCAlgorithm.History.cs.
IEnumerable<TradeBar> QuantConnect.Algorithm.QCAlgorithm.History | ( | Symbol | symbol, |
int | periods, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
symbol | The symbol to retrieve historical data for |
periods | The number of bars to request |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 482 of file QCAlgorithm.History.cs.
IEnumerable<T> QuantConnect.Algorithm.QCAlgorithm.History< T > | ( | Symbol | symbol, |
int | periods, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
T | The data type of the symbol |
symbol | The symbol to retrieve historical data for |
periods | The number of bars to request |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
T | : | IBaseData |
Definition at line 514 of file QCAlgorithm.History.cs.
IEnumerable<T> QuantConnect.Algorithm.QCAlgorithm.History< T > | ( | Symbol | symbol, |
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbol between the specified dates. The symbol must exist in the Securities collection.
symbol | The symbol to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
T | : | IBaseData |
Definition at line 541 of file QCAlgorithm.History.cs.
IEnumerable<TradeBar> QuantConnect.Algorithm.QCAlgorithm.History | ( | Symbol | symbol, |
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbol over the request span. The symbol must exist in the Securities collection.
symbol | The symbol to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 565 of file QCAlgorithm.History.cs.
IEnumerable<TradeBar> QuantConnect.Algorithm.QCAlgorithm.History | ( | Symbol | symbol, |
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbol over the request span. The symbol must exist in the Securities collection.
symbol | The symbol to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 588 of file QCAlgorithm.History.cs.
IEnumerable<Slice> QuantConnect.Algorithm.QCAlgorithm.History | ( | IEnumerable< Symbol > | symbols, |
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbols over the requested span. The symbol's configured values for resolution and fill forward behavior will be used The symbols must exist in the Securities collection.
symbols | The symbols to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 625 of file QCAlgorithm.History.cs.
IEnumerable<Slice> QuantConnect.Algorithm.QCAlgorithm.History | ( | IEnumerable< Symbol > | symbols, |
int | periods, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbols. The exact number of bars will be returned for each symbol. This may result in some data start earlier/later than others due to when various exchanges are open. The symbols must exist in the Securities collection.
symbols | The symbols to retrieve historical data for |
periods | The number of bars to request |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 649 of file QCAlgorithm.History.cs.
IEnumerable<Slice> QuantConnect.Algorithm.QCAlgorithm.History | ( | IEnumerable< Symbol > | symbols, |
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection.
symbols | The symbols to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 |
Definition at line 673 of file QCAlgorithm.History.cs.
IEnumerable<Slice> QuantConnect.Algorithm.QCAlgorithm.History | ( | HistoryRequest | request | ) |
Executes the specified history request
request | the history request to execute |
Definition at line 687 of file QCAlgorithm.History.cs.
IEnumerable<Slice> QuantConnect.Algorithm.QCAlgorithm.History | ( | IEnumerable< HistoryRequest > | requests | ) |
Executes the specified history requests
requests | the history requests to execute |
Definition at line 698 of file QCAlgorithm.History.cs.
Yields data to warmup a security for all it's subscribed data types
security | Security object for which to retrieve historical data |
Definition at line 710 of file QCAlgorithm.History.cs.
Yields data to warmup a security for all it's subscribed data types
symbol | The symbol we want to get seed data for |
Definition at line 722 of file QCAlgorithm.History.cs.
Get the last known price using the history provider. Useful for seeding securities with the correct price
security | Security object for which to retrieve historical data |
Definition at line 796 of file QCAlgorithm.History.cs.
|
protected |
Centralized logic to get data typed history for a given list of requests.
This method will check for Python custom data types in order to call the right Slice.Get dynamic method
T | : | IBaseData |
Definition at line 858 of file QCAlgorithm.History.cs.
|
protected |
Helper method to create history requests from a date range
Definition at line 947 of file QCAlgorithm.History.cs.
|
protected |
Helper method to create history requests from a date range with custom data type
Definition at line 969 of file QCAlgorithm.History.cs.
AccelerationBands QuantConnect.Algorithm.QCAlgorithm.ABANDS | ( | Symbol | symbol, |
int | period, | ||
decimal | width = 4 , |
||
MovingAverageType | movingAverageType = MovingAverageType.Simple , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new Acceleration Bands indicator.
symbol | The symbol whose Acceleration Bands we want. |
period | The period of the three moving average (middle, upper and lower band). |
width | A coefficient specifying the distance between the middle band and upper or lower bands. |
movingAverageType | Type of the moving average. |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar. |
Definition at line 73 of file QCAlgorithm.Indicators.cs.
AccumulationDistribution QuantConnect.Algorithm.QCAlgorithm.AD | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new AccumulationDistribution indicator.
symbol | The symbol whose AD we want |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 91 of file QCAlgorithm.Indicators.cs.
AccumulationDistributionOscillator QuantConnect.Algorithm.QCAlgorithm.ADOSC | ( | Symbol | symbol, |
int | fastPeriod, | ||
int | slowPeriod, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new AccumulationDistributionOscillator indicator.
symbol | The symbol whose ADOSC we want |
fastPeriod | The fast moving average period |
slowPeriod | The slow moving average period |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 110 of file QCAlgorithm.Indicators.cs.
Alpha QuantConnect.Algorithm.QCAlgorithm.A | ( | Symbol | target, |
Symbol | reference, | ||
int | alphaPeriod = 1 , |
||
int | betaPeriod = 252 , |
||
Resolution? | resolution = null , |
||
decimal? | riskFreeRate = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a Alpha indicator for the given target symbol in relation with the reference used. The indicator will be automatically updated on the given resolution.
target | The target symbol whose Alpha value we want |
reference | The reference symbol to compare with the target symbol |
alphaPeriod | The period of the Alpha indicator |
betaPeriod | The period of the Beta indicator |
resolution | The resolution |
riskFreeRate | The risk free rate |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 132 of file QCAlgorithm.Indicators.cs.
AverageRange QuantConnect.Algorithm.QCAlgorithm.AR | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new Average Range (AR) indicator.
symbol | The symbol whose Average Range we want to calculate |
period | The period over which to compute the Average Range |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator. If null, defaults to the Value property of BaseData (x => x.Value). |
Definition at line 157 of file QCAlgorithm.Indicators.cs.
AutoRegressiveIntegratedMovingAverage QuantConnect.Algorithm.QCAlgorithm.ARIMA | ( | Symbol | symbol, |
int | arOrder, | ||
int | diffOrder, | ||
int | maOrder, | ||
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new ARIMA indicator.
symbol | The symbol whose ARIMA indicator we want |
arOrder | AR order (p) – defines the number of past values to consider in the AR component of the model. |
diffOrder | Difference order (d) – defines how many times to difference the model before fitting parameters. |
maOrder | MA order (q) – defines the number of past values to consider in the MA component of the model. |
period | Size of the rolling series to fit onto |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 177 of file QCAlgorithm.Indicators.cs.
AverageDirectionalIndex QuantConnect.Algorithm.QCAlgorithm.ADX | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new Average Directional Index indicator. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose Average Directional Index we seek |
resolution | The resolution. |
period | The period over which to compute the Average Directional Index |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 197 of file QCAlgorithm.Indicators.cs.
AwesomeOscillator QuantConnect.Algorithm.QCAlgorithm.AO | ( | Symbol | symbol, |
int | fastPeriod, | ||
int | slowPeriod, | ||
MovingAverageType | type, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new Awesome Oscillator from the specified periods.
symbol | The symbol whose Awesome Oscillator we seek |
resolution | The resolution. |
fastPeriod | The period of the fast moving average associated with the AO |
slowPeriod | The period of the slow moving average associated with the AO |
type | The type of moving average used when computing the fast and slow term. Defaults to simple moving average. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 216 of file QCAlgorithm.Indicators.cs.
AverageDirectionalMovementIndexRating QuantConnect.Algorithm.QCAlgorithm.ADXR | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new AverageDirectionalMovementIndexRating indicator.
symbol | The symbol whose ADXR we want |
period | The period over which to compute the ADXR |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 234 of file QCAlgorithm.Indicators.cs.
ArnaudLegouxMovingAverage QuantConnect.Algorithm.QCAlgorithm.ALMA | ( | Symbol | symbol, |
int | period, | ||
int | sigma = 6 , |
||
decimal | offset = 0.85m , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new ArnaudLegouxMovingAverage indicator.
symbol | The symbol whose ALMA we want |
period | int - the number of periods to calculate the ALMA |
sigma | int - this parameter is responsible for the shape of the curve coefficients. |
offset | decimal - This parameter allows regulating the smoothness and high sensitivity of the Moving Average. The range for this parameter is [0, 1]. |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 258 of file QCAlgorithm.Indicators.cs.
AbsolutePriceOscillator QuantConnect.Algorithm.QCAlgorithm.APO | ( | Symbol | symbol, |
int | fastPeriod, | ||
int | slowPeriod, | ||
MovingAverageType | movingAverageType, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new AbsolutePriceOscillator indicator.
symbol | The symbol whose APO we want |
fastPeriod | The fast moving average period |
slowPeriod | The slow moving average period |
movingAverageType | The type of moving average to use |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 278 of file QCAlgorithm.Indicators.cs.
AroonOscillator QuantConnect.Algorithm.QCAlgorithm.AROON | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)
symbol | The symbol whose Aroon we seek |
period | The look back period for computing number of periods since maximum and minimum |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 296 of file QCAlgorithm.Indicators.cs.
AroonOscillator QuantConnect.Algorithm.QCAlgorithm.AROON | ( | Symbol | symbol, |
int | upPeriod, | ||
int | downPeriod, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new AroonOscillator indicator which will compute the AroonUp and AroonDown (as well as the delta)
symbol | The symbol whose Aroon we seek |
upPeriod | The look back period for computing number of periods since maximum |
downPeriod | The look back period for computing number of periods since minimum |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 311 of file QCAlgorithm.Indicators.cs.
AverageTrueRange QuantConnect.Algorithm.QCAlgorithm.ATR | ( | Symbol | symbol, |
int | period, | ||
MovingAverageType | type = MovingAverageType.Simple , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new AverageTrueRange indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose ATR we want |
period | The smoothing period used to smooth the computed TrueRange values |
type | The type of smoothing to use |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 331 of file QCAlgorithm.Indicators.cs.
AugenPriceSpike QuantConnect.Algorithm.QCAlgorithm.APS | ( | Symbol | symbol, |
int | period = 3 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates an AugenPriceSpike indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose APS we want |
period | The period of the APS |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 350 of file QCAlgorithm.Indicators.cs.
BollingerBands QuantConnect.Algorithm.QCAlgorithm.BB | ( | Symbol | symbol, |
int | period, | ||
decimal | k, | ||
MovingAverageType | movingAverageType = MovingAverageType.Simple , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new BollingerBands indicator which will compute the MiddleBand, UpperBand, LowerBand, and StandardDeviation
symbol | The symbol whose BollingerBands we seek |
period | The period of the standard deviation and moving average (middle band) |
k | The number of standard deviations specifying the distance between the middle band and upper or lower bands |
movingAverageType | The type of moving average to be used |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 370 of file QCAlgorithm.Indicators.cs.
Beta QuantConnect.Algorithm.QCAlgorithm.B | ( | Symbol | target, |
Symbol | reference, | ||
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a Beta indicator for the given target symbol in relation with the reference used. The indicator will be automatically updated on the given resolution.
target | The target symbol whose Beta value we want |
reference | The reference symbol to compare with the target symbol |
period | The period of the Beta indicator |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 391 of file QCAlgorithm.Indicators.cs.
BalanceOfPower QuantConnect.Algorithm.QCAlgorithm.BOP | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new Balance Of Power indicator. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose Balance Of Power we seek |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 409 of file QCAlgorithm.Indicators.cs.
CoppockCurve QuantConnect.Algorithm.QCAlgorithm.CC | ( | Symbol | symbol, |
int | shortRocPeriod = 11 , |
||
int | longRocPeriod = 14 , |
||
int | lwmaPeriod = 10 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Initializes a new instance of the CoppockCurve indicator
symbol | The symbol whose Coppock Curve we want |
shortRocPeriod | The period for the short ROC |
longRocPeriod | The period for the long ROC |
lwmaPeriod | The period for the LWMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 429 of file QCAlgorithm.Indicators.cs.
Correlation QuantConnect.Algorithm.QCAlgorithm.C | ( | Symbol | target, |
Symbol | reference, | ||
int | period, | ||
CorrelationType | correlationType = CorrelationType.Pearson , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a Correlation indicator for the given target symbol in relation with the reference used. The indicator will be automatically updated on the given resolution.
target | The target symbol of this indicator |
reference | The reference symbol of this indicator |
period | The period of this indicator |
correlationType | Correlation type |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 451 of file QCAlgorithm.Indicators.cs.
CommodityChannelIndex QuantConnect.Algorithm.QCAlgorithm.CCI | ( | Symbol | symbol, |
int | period, | ||
MovingAverageType | movingAverageType = MovingAverageType.Simple , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new CommodityChannelIndex indicator. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose CCI we want |
period | The period over which to compute the CCI |
movingAverageType | The type of moving average to use in computing the typical price average |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 471 of file QCAlgorithm.Indicators.cs.
ChoppinessIndex QuantConnect.Algorithm.QCAlgorithm.CHOP | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new ChoppinessIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose CHOP we want |
period | The input window period used to calculate max high and min low |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 490 of file QCAlgorithm.Indicators.cs.
ChandeKrollStop QuantConnect.Algorithm.QCAlgorithm.CKS | ( | Symbol | symbol, |
int | atrPeriod, | ||
decimal | atrMult, | ||
int | period, | ||
MovingAverageType | movingAverageType = MovingAverageType.Wilders , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
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 | The symbol whose Chande Kroll Stop we seek. |
atrPeriod | The period over which to compute the average true range. |
atrMult | The ATR multiplier to be used to compute stops distance. |
period | The period over which to compute the max of high stop and min of low stop. |
resolution | The resolution. |
movingAverageType | The type of smoothing used to smooth the true range values |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 511 of file QCAlgorithm.Indicators.cs.
ChaikinMoneyFlow QuantConnect.Algorithm.QCAlgorithm.CMF | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new ChaikinMoneyFlow indicator.
symbol | The symbol whose CMF we want |
period | The period over which to compute the CMF |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 528 of file QCAlgorithm.Indicators.cs.
ChandeMomentumOscillator QuantConnect.Algorithm.QCAlgorithm.CMO | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new ChandeMomentumOscillator indicator.
symbol | The symbol whose CMO we want |
period | The period over which to compute the CMO |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 547 of file QCAlgorithm.Indicators.cs.
DonchianChannel QuantConnect.Algorithm.QCAlgorithm.DCH | ( | Symbol | symbol, |
int | upperPeriod, | ||
int | lowerPeriod, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
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 | The symbol whose Donchian Channel we seek. |
upperPeriod | The period over which to compute the upper Donchian Channel. |
lowerPeriod | The period over which to compute the lower Donchian Channel. |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 607 of file QCAlgorithm.Indicators.cs.
DonchianChannel QuantConnect.Algorithm.QCAlgorithm.DCH | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Overload shorthand to create a new symmetric Donchian Channel indicator which has the upper and lower channels set to the same period length.
symbol | The symbol whose Donchian Channel we seek. |
period | The period over which to compute the Donchian Channel. |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 626 of file QCAlgorithm.Indicators.cs.
Delta QuantConnect.Algorithm.QCAlgorithm.D | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType? | optionModel = null , |
||
OptionPricingModelType? | ivModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new Delta indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option for parity calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate Delta |
ivModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 644 of file QCAlgorithm.Indicators.cs.
Delta QuantConnect.Algorithm.QCAlgorithm.Δ | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType | optionModel = OptionPricingModelType.BlackScholes , |
||
OptionPricingModelType? | ivModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new Delta indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option for parity calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate Delta |
ivModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 667 of file QCAlgorithm.Indicators.cs.
DoubleExponentialMovingAverage QuantConnect.Algorithm.QCAlgorithm.DEMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new DoubleExponentialMovingAverage indicator.
symbol | The symbol whose DEMA we want |
period | The period over which to compute the DEMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 682 of file QCAlgorithm.Indicators.cs.
DerivativeOscillator QuantConnect.Algorithm.QCAlgorithm.DO | ( | Symbol | symbol, |
int | rsiPeriod, | ||
int | smoothingRsiPeriod, | ||
int | doubleSmoothingRsiPeriod, | ||
int | signalLinePeriod, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new DerivativeOscillator indicator.
symbol | The symbol whose DO we want |
rsiPeriod | The period over which to compute the RSI |
smoothingRsiPeriod | The period over which to compute the smoothing RSI |
doubleSmoothingRsiPeriod | The period over which to compute the double smoothing RSI |
signalLinePeriod | The period over which to compute the signal line |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 703 of file QCAlgorithm.Indicators.cs.
DetrendedPriceOscillator QuantConnect.Algorithm.QCAlgorithm.DPO | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new DetrendedPriceOscillator indicator.
symbol | The symbol whose DPO we want |
period | The period over which to compute the DPO |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 721 of file QCAlgorithm.Indicators.cs.
ExponentialMovingAverage QuantConnect.Algorithm.QCAlgorithm.EMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose EMA we want |
period | The period of the EMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 740 of file QCAlgorithm.Indicators.cs.
ExponentialMovingAverage QuantConnect.Algorithm.QCAlgorithm.EMA | ( | Symbol | symbol, |
int | period, | ||
decimal | smoothingFactor, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates an ExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose EMA we want |
period | The period of the EMA |
smoothingFactor | The percentage of data from the previous value to be carried into the next value |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 756 of file QCAlgorithm.Indicators.cs.
EaseOfMovementValue QuantConnect.Algorithm.QCAlgorithm.EMV | ( | Symbol | symbol, |
int | period = 1 , |
||
int | scale = 10000 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates an EaseOfMovementValue indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose EMV we want |
period | The period of the EMV |
scale | The length of the outputed value |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 776 of file QCAlgorithm.Indicators.cs.
FilteredIdentity QuantConnect.Algorithm.QCAlgorithm.FilteredIdentity | ( | Symbol | symbol, |
Func< IBaseData, IBaseDataBar > | selector = null , |
||
Func< IBaseData, bool > | filter = null , |
||
string | fieldName = null |
||
) |
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The symbol whose values we want as an indicator |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
filter | Filters the IBaseData send into the indicator, if null defaults to true (x => true) which means no filter |
fieldName | The name of the field being selected |
Definition at line 795 of file QCAlgorithm.Indicators.cs.
FilteredIdentity QuantConnect.Algorithm.QCAlgorithm.FilteredIdentity | ( | Symbol | symbol, |
Resolution | resolution, | ||
Func< IBaseData, IBaseDataBar > | selector = null , |
||
Func< IBaseData, bool > | filter = null , |
||
string | fieldName = null |
||
) |
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The symbol whose values we want as an indicator |
resolution | The desired resolution of the data |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
filter | Filters the IBaseData send into the indicator, if null defaults to true (x => true) which means no filter |
fieldName | The name of the field being selected |
Definition at line 812 of file QCAlgorithm.Indicators.cs.
FilteredIdentity QuantConnect.Algorithm.QCAlgorithm.FilteredIdentity | ( | Symbol | symbol, |
TimeSpan | resolution, | ||
Func< IBaseData, IBaseDataBar > | selector = null , |
||
Func< IBaseData, bool > | filter = null , |
||
string | fieldName = null |
||
) |
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The symbol whose values we want as an indicator |
resolution | The desired resolution of the data |
selector | Selects a value from the BaseData, if null defaults to the .Value property (x => x.Value) |
filter | Filters the IBaseData send into the indicator, if null defaults to true (x => true) which means no filter |
fieldName | The name of the field being selected |
Definition at line 831 of file QCAlgorithm.Indicators.cs.
ForceIndex QuantConnect.Algorithm.QCAlgorithm.FI | ( | Symbol | symbol, |
int | period, | ||
MovingAverageType | type = MovingAverageType.Exponential , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new ForceIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose ForceIndex we want |
period | The smoothing period used to smooth the computed ForceIndex values |
type | The type of smoothing to use |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 850 of file QCAlgorithm.Indicators.cs.
FisherTransform QuantConnect.Algorithm.QCAlgorithm.FISH | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates an FisherTransform indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose FisherTransform we want |
period | The period of the FisherTransform |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 869 of file QCAlgorithm.Indicators.cs.
FractalAdaptiveMovingAverage QuantConnect.Algorithm.QCAlgorithm.FRAMA | ( | Symbol | symbol, |
int | period, | ||
int | longPeriod = 198 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates an FractalAdaptiveMovingAverage (FRAMA) indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose FRAMA we want |
period | The period of the FRAMA |
longPeriod | The long period of the FRAMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 890 of file QCAlgorithm.Indicators.cs.
Gamma QuantConnect.Algorithm.QCAlgorithm.G | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType? | optionModel = null , |
||
OptionPricingModelType? | ivModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new Gamma indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option for parity calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate Gamma |
ivModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 912 of file QCAlgorithm.Indicators.cs.
Gamma QuantConnect.Algorithm.QCAlgorithm.Γ | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType | optionModel = OptionPricingModelType.BlackScholes , |
||
OptionPricingModelType? | ivModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new Gamma indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option for parity calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate Gamma |
ivModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 935 of file QCAlgorithm.Indicators.cs.
HeikinAshi QuantConnect.Algorithm.QCAlgorithm.HeikinAshi | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new Heikin-Ashi indicator.
symbol | The symbol whose Heikin-Ashi we want |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 949 of file QCAlgorithm.Indicators.cs.
HurstExponent QuantConnect.Algorithm.QCAlgorithm.HE | ( | Symbol | symbol, |
int | period, | ||
int | maxLag = 20 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
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 | The symbol for which the Hurst Exponent is calculated. |
period | The number of data points used to calculate the indicator at each step. |
maxLag | The maximum time lag used to compute the tau values for the Hurst Exponent calculation. |
resolution | The resolution |
selector | Function to select a value from the BaseData to input into the indicator. Defaults to using the 'Value' property of BaseData if null. |
Definition at line 970 of file QCAlgorithm.Indicators.cs.
HilbertTransform QuantConnect.Algorithm.QCAlgorithm.HT | ( | Symbol | symbol, |
int | length, | ||
decimal | inPhaseMultiplicationFactor, | ||
decimal | quadratureMultiplicationFactor, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Hilbert Transform indicator
symbol | The symbol whose Hilbert transform we want |
length | The length of the FIR filter used in the calculation of the Hilbert Transform. This parameter determines the number of filter coefficients in the FIR filter. |
inPhaseMultiplicationFactor | The multiplication factor used in the calculation of the in-phase component of the Hilbert Transform. This parameter adjusts the sensitivity and responsiveness of the transform to changes in the input signal. |
quadratureMultiplicationFactor | 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 | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 993 of file QCAlgorithm.Indicators.cs.
HullMovingAverage QuantConnect.Algorithm.QCAlgorithm.HMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new HullMovingAverage indicator. The Hull moving average is a series of nested weighted moving averages, is fast and smooth.
symbol | The symbol whose Hull moving average we want |
period | The period over which to compute the Hull moving average |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1011 of file QCAlgorithm.Indicators.cs.
InternalBarStrength QuantConnect.Algorithm.QCAlgorithm.IBS | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new InternalBarStrength indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose IBS we want |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1029 of file QCAlgorithm.Indicators.cs.
IchimokuKinkoHyo QuantConnect.Algorithm.QCAlgorithm.ICHIMOKU | ( | Symbol | symbol, |
int | tenkanPeriod, | ||
int | kijunPeriod, | ||
int | senkouAPeriod, | ||
int | senkouBPeriod, | ||
int | senkouADelayPeriod, | ||
int | senkouBDelayPeriod, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose ICHIMOKU we want |
tenkanPeriod | The period to calculate the Tenkan-sen period |
kijunPeriod | The period to calculate the Kijun-sen period |
senkouAPeriod | The period to calculate the Tenkan-sen period |
senkouBPeriod | The period to calculate the Tenkan-sen period |
senkouADelayPeriod | The period to calculate the Tenkan-sen period |
senkouBDelayPeriod | The period to calculate the Tenkan-sen period |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1053 of file QCAlgorithm.Indicators.cs.
Identity QuantConnect.Algorithm.QCAlgorithm.Identity | ( | Symbol | symbol, |
Func< IBaseData, decimal > | selector = null , |
||
string | fieldName = null |
||
) |
Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The symbol whose values we want as an indicator |
selector | Selects a value from the BaseData, if null defaults to the .Value property (x => x.Value) |
fieldName | The name of the field being selected |
Definition at line 1072 of file QCAlgorithm.Indicators.cs.
Identity QuantConnect.Algorithm.QCAlgorithm.Identity | ( | Symbol | symbol, |
Resolution | resolution, | ||
Func< IBaseData, decimal > | selector = null , |
||
string | fieldName = null |
||
) |
Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The symbol whose values we want as an indicator |
resolution | The desired resolution of the data |
selector | Selects a value from the BaseData, if null defaults to the .Value property (x => x.Value) |
fieldName | The name of the field being selected |
Definition at line 1088 of file QCAlgorithm.Indicators.cs.
Identity QuantConnect.Algorithm.QCAlgorithm.Identity | ( | Symbol | symbol, |
TimeSpan | resolution, | ||
Func< IBaseData, decimal > | selector = null , |
||
string | fieldName = null |
||
) |
Creates a new Identity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The symbol whose values we want as an indicator |
resolution | The desired resolution of the data |
selector | Selects a value from the BaseData, if null defaults to the .Value property (x => x.Value) |
fieldName | The name of the field being selected |
Definition at line 1106 of file QCAlgorithm.Indicators.cs.
ImpliedVolatility QuantConnect.Algorithm.QCAlgorithm.IV | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType? | optionModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new ImpliedVolatility indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option contract used for parity type calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 1126 of file QCAlgorithm.Indicators.cs.
KaufmanAdaptiveMovingAverage QuantConnect.Algorithm.QCAlgorithm.KAMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new KaufmanAdaptiveMovingAverage indicator.
symbol | The symbol whose KAMA we want |
period | The period of the Efficiency Ratio (ER) of KAMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1145 of file QCAlgorithm.Indicators.cs.
KaufmanAdaptiveMovingAverage QuantConnect.Algorithm.QCAlgorithm.KAMA | ( | Symbol | symbol, |
int | period, | ||
int | fastEmaPeriod, | ||
int | slowEmaPeriod, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new KaufmanAdaptiveMovingAverage indicator.
symbol | The symbol whose KAMA we want |
period | The period of the Efficiency Ratio (ER) |
fastEmaPeriod | The period of the fast EMA used to calculate the Smoothing Constant (SC) |
slowEmaPeriod | The period of the slow EMA used to calculate the Smoothing Constant (SC) |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1161 of file QCAlgorithm.Indicators.cs.
KaufmanEfficiencyRatio QuantConnect.Algorithm.QCAlgorithm.KER | ( | Symbol | symbol, |
int | period = 2 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates an KaufmanEfficiencyRatio indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose EF we want |
period | The period of the EF |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1180 of file QCAlgorithm.Indicators.cs.
KeltnerChannels QuantConnect.Algorithm.QCAlgorithm.KCH | ( | Symbol | symbol, |
int | period, | ||
decimal | k, | ||
MovingAverageType | movingAverageType = MovingAverageType.Simple , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new Keltner Channels indicator. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose Keltner Channel we seek |
period | The period over which to compute the Keltner Channels |
k | The number of multiples of the AverageTrueRange from the middle band of the Keltner Channels |
movingAverageType | Specifies the type of moving average to be used as the middle line of the Keltner Channel |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1201 of file QCAlgorithm.Indicators.cs.
LogReturn QuantConnect.Algorithm.QCAlgorithm.LOGR | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new LogReturn indicator.
symbol | The symbol whose log return we seek |
period | The period of the log return. |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar. |
Definition at line 1219 of file QCAlgorithm.Indicators.cs.
LeastSquaresMovingAverage QuantConnect.Algorithm.QCAlgorithm.LSMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates and registers a new Least Squares Moving Average instance.
symbol | The symbol whose LSMA we seek. |
period | The LSMA period. Normally 14. |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar. |
Definition at line 1237 of file QCAlgorithm.Indicators.cs.
LinearWeightedMovingAverage QuantConnect.Algorithm.QCAlgorithm.LWMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new LinearWeightedMovingAverage indicator. This indicator will linearly distribute the weights across the periods.
symbol | The symbol whose LWMA we want |
period | The period over which to compute the LWMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1256 of file QCAlgorithm.Indicators.cs.
MovingAverageConvergenceDivergence QuantConnect.Algorithm.QCAlgorithm.MACD | ( | Symbol | symbol, |
int | fastPeriod, | ||
int | slowPeriod, | ||
int | signalPeriod, | ||
MovingAverageType | type = MovingAverageType.Exponential , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a MACD indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose MACD we want |
fastPeriod | The period for the fast moving average |
slowPeriod | The period for the slow moving average |
signalPeriod | The period for the signal moving average |
type | The type of moving average to use for the MACD |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1277 of file QCAlgorithm.Indicators.cs.
MeanAbsoluteDeviation QuantConnect.Algorithm.QCAlgorithm.MAD | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new MeanAbsoluteDeviation indicator.
symbol | The symbol whose MeanAbsoluteDeviation we want |
period | The period over which to compute the MeanAbsoluteDeviation |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1295 of file QCAlgorithm.Indicators.cs.
MesaAdaptiveMovingAverage QuantConnect.Algorithm.QCAlgorithm.MAMA | ( | Symbol | symbol, |
decimal | fastLimit = 0.5m , |
||
decimal | slowLimit = 0.05m , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
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 | The symbol for which the MAMA indicator is being created. |
fastLimit | The fast limit for the adaptive moving average. |
slowLimit | The slow limit for the adaptive moving average. |
resolution | The resolution |
selector | Optional function to select a value from the BaseData. Defaults to casting the input to a TradeBar. |
Definition at line 1315 of file QCAlgorithm.Indicators.cs.
VolumeProfile QuantConnect.Algorithm.QCAlgorithm.VP | ( | Symbol | symbol, |
int | period = 2 , |
||
decimal | valueAreaVolumePercentage = 0.70m , |
||
decimal | priceRangeRoundOff = 0.05m , |
||
Resolution | resolution = Resolution.Daily , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates an Market Profile indicator for the symbol with Volume Profile (VOL) mode. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose VP we want |
period | The period of the VP |
valueAreaVolumePercentage | The percentage of volume contained in the value area |
priceRangeRoundOff | How many digits you want to round and the precision. i.e 0.01 round to two digits exactly. |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1335 of file QCAlgorithm.Indicators.cs.
TimeProfile QuantConnect.Algorithm.QCAlgorithm.TP | ( | Symbol | symbol, |
int | period = 2 , |
||
decimal | valueAreaVolumePercentage = 0.70m , |
||
decimal | priceRangeRoundOff = 0.05m , |
||
Resolution | resolution = Resolution.Daily , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
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 | The symbol whose TP we want |
period | The period of the TP |
valueAreaVolumePercentage | The percentage of volume contained in the value area |
priceRangeRoundOff | How many digits you want to round and the precision. i.e 0.01 round to two digits exactly. |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1356 of file QCAlgorithm.Indicators.cs.
TimeSeriesForecast QuantConnect.Algorithm.QCAlgorithm.TSF | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Time Series Forecast indicator
symbol | The symbol whose TSF we want |
period | The period of the TSF |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to Value property of BaseData (x => x.Value) |
Definition at line 1374 of file QCAlgorithm.Indicators.cs.
Maximum QuantConnect.Algorithm.QCAlgorithm.MAX | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Maximum indicator to compute the maximum value
symbol | The symbol whose max we want |
period | The look back period over which to compute the max value |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null and the symbol is of type TradeBar defaults to the High property, otherwise it defaults to Value property of BaseData (x => x.Value) |
Definition at line 1393 of file QCAlgorithm.Indicators.cs.
MoneyFlowIndex QuantConnect.Algorithm.QCAlgorithm.MFI | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new MoneyFlowIndex indicator. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose MFI we want |
period | The period over which to compute the MFI |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1423 of file QCAlgorithm.Indicators.cs.
MassIndex QuantConnect.Algorithm.QCAlgorithm.MASS | ( | Symbol | symbol, |
int | emaPeriod = 9 , |
||
int | sumPeriod = 25 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new Mass Index indicator. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose Mass Index we want. |
emaPeriod | The period used by both EMA. |
sumPeriod | The sum period. |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1443 of file QCAlgorithm.Indicators.cs.
MidPoint QuantConnect.Algorithm.QCAlgorithm.MIDPOINT | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new MidPoint indicator.
symbol | The symbol whose MIDPOINT we want |
period | The period over which to compute the MIDPOINT |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1461 of file QCAlgorithm.Indicators.cs.
MidPrice QuantConnect.Algorithm.QCAlgorithm.MIDPRICE | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new MidPrice indicator.
symbol | The symbol whose MIDPRICE we want |
period | The period over which to compute the MIDPRICE |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1479 of file QCAlgorithm.Indicators.cs.
Minimum QuantConnect.Algorithm.QCAlgorithm.MIN | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Minimum indicator to compute the minimum value
symbol | The symbol whose min we want |
period | The look back period over which to compute the min value |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null and the symbol is of type TradeBar defaults to the Low property, otherwise it defaults to Value property of BaseData (x => x.Value) |
Definition at line 1498 of file QCAlgorithm.Indicators.cs.
Momentum QuantConnect.Algorithm.QCAlgorithm.MOM | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
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 | The symbol whose momentum we want |
period | The period over which to compute the momentum |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1528 of file QCAlgorithm.Indicators.cs.
MomersionIndicator QuantConnect.Algorithm.QCAlgorithm.MOMERSION | ( | Symbol | symbol, |
int? | minPeriod, | ||
int | fullPeriod, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Momersion indicator.
symbol | The symbol whose Momersion we want |
minPeriod | The minimum period over which to compute the Momersion. Must be greater than 3. If null, only full period will be used in computations. |
fullPeriod | The full period over which to compute the Momersion |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1547 of file QCAlgorithm.Indicators.cs.
MomentumPercent QuantConnect.Algorithm.QCAlgorithm.MOMP | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
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 | The symbol whose momentum we want |
period | The period over which to compute the momentum |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1566 of file QCAlgorithm.Indicators.cs.
NormalizedAverageTrueRange QuantConnect.Algorithm.QCAlgorithm.NATR | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new NormalizedAverageTrueRange indicator.
symbol | The symbol whose NATR we want |
period | The period over which to compute the NATR |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1584 of file QCAlgorithm.Indicators.cs.
OnBalanceVolume QuantConnect.Algorithm.QCAlgorithm.OBV | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
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 | The symbol whose On Balance Volume we seek |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1603 of file QCAlgorithm.Indicators.cs.
PivotPointsHighLow QuantConnect.Algorithm.QCAlgorithm.PPHL | ( | Symbol | symbol, |
int | lengthHigh, | ||
int | lengthLow, | ||
int | lastStoredValues = 100 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new PivotPointsHighLow indicator
symbol | The symbol whose PPHL we seek |
lengthHigh | The number of surrounding bars whose high values should be less than the current bar's for the bar high to be marked as high pivot point |
lengthLow | The number of surrounding bars whose low values should be more than the current bar's for the bar low to be marked as low pivot point |
lastStoredValues | The number of last stored indicator values |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1623 of file QCAlgorithm.Indicators.cs.
PercentagePriceOscillator QuantConnect.Algorithm.QCAlgorithm.PPO | ( | Symbol | symbol, |
int | fastPeriod, | ||
int | slowPeriod, | ||
MovingAverageType | movingAverageType, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new PercentagePriceOscillator indicator.
symbol | The symbol whose PPO we want |
fastPeriod | The fast moving average period |
slowPeriod | The slow moving average period |
movingAverageType | The type of moving average to use |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1643 of file QCAlgorithm.Indicators.cs.
ParabolicStopAndReverse QuantConnect.Algorithm.QCAlgorithm.PSAR | ( | Symbol | symbol, |
decimal | afStart = 0.02m , |
||
decimal | afIncrement = 0.02m , |
||
decimal | afMax = 0.2m , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new Parabolic SAR indicator
symbol | The symbol whose PSAR we seek |
afStart | Acceleration factor start value. Normally 0.02 |
afIncrement | Acceleration factor increment value. Normally 0.02 |
afMax | Acceleration factor max value. Normally 0.2 |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1663 of file QCAlgorithm.Indicators.cs.
RegressionChannel QuantConnect.Algorithm.QCAlgorithm.RC | ( | Symbol | symbol, |
int | period, | ||
decimal | k, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new RegressionChannel indicator which will compute the LinearRegression, UpperChannel and LowerChannel lines, the intercept and slope
symbol | The symbol whose RegressionChannel we seek |
period | The period of the standard deviation and least square moving average (linear regression line) |
k | The number of standard deviations specifying the distance between the linear regression and upper or lower channel lines |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1682 of file QCAlgorithm.Indicators.cs.
RelativeMovingAverage QuantConnect.Algorithm.QCAlgorithm.RMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Relative Moving Average indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose relative moving average we seek |
period | The period of the relative moving average |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1700 of file QCAlgorithm.Indicators.cs.
RateOfChange QuantConnect.Algorithm.QCAlgorithm.ROC | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
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 | The symbol whose RateOfChange we want |
period | The period over which to compute the RateOfChange |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1720 of file QCAlgorithm.Indicators.cs.
RateOfChangePercent QuantConnect.Algorithm.QCAlgorithm.ROCP | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
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 | The symbol whose RateOfChangePercent we want |
period | The period over which to compute the RateOfChangePercent |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1739 of file QCAlgorithm.Indicators.cs.
RateOfChangeRatio QuantConnect.Algorithm.QCAlgorithm.ROCR | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new RateOfChangeRatio indicator.
symbol | The symbol whose ROCR we want |
period | The period over which to compute the ROCR |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1757 of file QCAlgorithm.Indicators.cs.
RelativeStrengthIndex QuantConnect.Algorithm.QCAlgorithm.RSI | ( | Symbol | symbol, |
int | period, | ||
MovingAverageType | movingAverageType = MovingAverageType.Wilders , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
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 | The symbol whose RSI we want |
period | The period over which to compute the RSI |
movingAverageType | The type of moving average to use in computing the average gain/loss values |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1777 of file QCAlgorithm.Indicators.cs.
RelativeVigorIndex QuantConnect.Algorithm.QCAlgorithm.RVI | ( | Symbol | symbol, |
int | period, | ||
MovingAverageType | movingAverageType = MovingAverageType.Simple , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new RelativeVigorIndex indicator.
symbol | The symbol whose RVI we want |
period | The period over which to compute the RVI |
movingAverageType | The type of moving average to use |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1796 of file QCAlgorithm.Indicators.cs.
RelativeDailyVolume QuantConnect.Algorithm.QCAlgorithm.RDV | ( | Symbol | symbol, |
int | period = 2 , |
||
Resolution | resolution = Resolution.Daily , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates an RelativeDailyVolume indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose RDV we want |
period | The period of the RDV |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1815 of file QCAlgorithm.Indicators.cs.
Rho QuantConnect.Algorithm.QCAlgorithm.R | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType? | optionModel = null , |
||
OptionPricingModelType? | ivModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new Rho indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option for parity calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate Rho |
ivModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 1837 of file QCAlgorithm.Indicators.cs.
Rho QuantConnect.Algorithm.QCAlgorithm.ρ | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType | optionModel = OptionPricingModelType.BlackScholes , |
||
OptionPricingModelType? | ivModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new Rho indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option for parity calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate Rho |
ivModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 1860 of file QCAlgorithm.Indicators.cs.
StochasticRelativeStrengthIndex QuantConnect.Algorithm.QCAlgorithm.SRSI | ( | Symbol | symbol, |
int | rsiPeriod, | ||
int | stochPeriod, | ||
int | kSmoothingPeriod, | ||
int | dSmoothingPeriod, | ||
MovingAverageType | movingAverageType = MovingAverageType.Simple , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Stochastic RSI indicator which will compute the K and D
symbol | The symbol whose Stochastic RSI we seek |
rsiPeriod | The period of the relative strength index |
stochPeriod | The period of the stochastic indicator |
kSmoothingPeriod | The smoothing period of K output |
dSmoothingPeriod | The smoothing period of D output |
movingAverageType | The type of moving average to be used |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1880 of file QCAlgorithm.Indicators.cs.
SuperTrend QuantConnect.Algorithm.QCAlgorithm.STR | ( | Symbol | symbol, |
int | period, | ||
decimal | multiplier, | ||
MovingAverageType | movingAverageType = MovingAverageType.Wilders , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new SuperTrend indicator.
symbol | The symbol whose SuperTrend indicator we want. |
period | The smoothing period for average true range. |
multiplier | Multiplier to calculate basic upper and lower bands width. |
movingAverageType | Smoother type for average true range, defaults to Wilders. |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 1899 of file QCAlgorithm.Indicators.cs.
SharpeRatio QuantConnect.Algorithm.QCAlgorithm.SR | ( | Symbol | symbol, |
int | sharpePeriod, | ||
decimal? | riskFreeRate = null , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new SharpeRatio indicator.
symbol | The symbol whose RSR we want |
sharpePeriod | Period of historical observation for sharpe ratio calculation |
riskFreeRate | Risk-free rate for sharpe ratio calculation. If not specified, it will use the algorithms' RiskFreeInterestRateModel |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1921 of file QCAlgorithm.Indicators.cs.
SortinoRatio QuantConnect.Algorithm.QCAlgorithm.SORTINO | ( | Symbol | symbol, |
int | sortinoPeriod, | ||
double | minimumAcceptableReturn = 0.0 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Sortino indicator.
symbol | The symbol whose Sortino we want |
sortinoPeriod | Period of historical observation for Sortino ratio calculation |
minimumAcceptableReturn | Minimum acceptable return (eg risk-free rate) for the Sortino ratio calculation |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1945 of file QCAlgorithm.Indicators.cs.
SqueezeMomentum QuantConnect.Algorithm.QCAlgorithm.SM | ( | Symbol | symbol, |
int | bollingerPeriod = 20 , |
||
decimal | bollingerMultiplier = 2m , |
||
int | keltnerPeriod = 20 , |
||
decimal | keltnerMultiplier = 1.5m , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
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 | The symbol for which the indicator is calculated. |
bollingerPeriod | The period for Bollinger Bands. |
bollingerMultiplier | The multiplier for the Bollinger Bands' standard deviation. |
keltnerPeriod | The period for Keltner Channels. |
keltnerMultiplier | The multiplier for the Average True Range in Keltner Channels. |
resolution | The resolution of the data. |
selector | Selects a value from the BaseData to send into the indicator. If null, defaults to the Value property of BaseData (x => x.Value). |
Definition at line 1967 of file QCAlgorithm.Indicators.cs.
SimpleMovingAverage QuantConnect.Algorithm.QCAlgorithm.SMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates an SimpleMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose SMA we want |
period | The period of the SMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1986 of file QCAlgorithm.Indicators.cs.
SchaffTrendCycle QuantConnect.Algorithm.QCAlgorithm.STC | ( | Symbol | symbol, |
int | cyclePeriod, | ||
int | fastPeriod, | ||
int | slowPeriod, | ||
MovingAverageType | movingAverageType = MovingAverageType.Exponential , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Schaff Trend Cycle indicator
symbol | The symbol for the indicator to track |
fastPeriod | The fast moving average period |
slowPeriod | The slow moving average period |
cyclePeriod | The signal period |
movingAverageType | The type of moving average to use |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2008 of file QCAlgorithm.Indicators.cs.
SmoothedOnBalanceVolume QuantConnect.Algorithm.QCAlgorithm.SOBV | ( | Symbol | symbol, |
int | period, | ||
MovingAverageType | type = MovingAverageType.Simple , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new SmoothedOnBalanceVolume indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose SmoothedOnBalanceVolume we want |
period | The smoothing period used to smooth the computed OnBalanceVolume values |
type | The type of smoothing to use |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2028 of file QCAlgorithm.Indicators.cs.
StandardDeviation QuantConnect.Algorithm.QCAlgorithm.STD | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new StandardDeviation indicator. This will return the population standard deviation of samples over the specified period.
symbol | The symbol whose STD we want |
period | The period over which to compute the STD |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2045 of file QCAlgorithm.Indicators.cs.
TargetDownsideDeviation QuantConnect.Algorithm.QCAlgorithm.TDD | ( | Symbol | symbol, |
int | period, | ||
double | minimumAcceptableReturn = 0 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
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 | The symbol whose TDD we want |
period | The period over which to compute the TDD |
resolution | The resolution |
minimumAcceptableReturn | Minimum acceptable return (MAR) for the target downside deviation calculation |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2065 of file QCAlgorithm.Indicators.cs.
Stochastic QuantConnect.Algorithm.QCAlgorithm.STO | ( | Symbol | symbol, |
int | period, | ||
int | kPeriod, | ||
int | dPeriod, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new Stochastic indicator.
symbol | The symbol whose stochastic we seek |
period | The period of the stochastic. Normally 14 |
kPeriod | The sum period of the stochastic. Normally 14 |
dPeriod | The sum period of the stochastic. Normally 3 |
resolution | The resolution. |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2085 of file QCAlgorithm.Indicators.cs.
Stochastic QuantConnect.Algorithm.QCAlgorithm.STO | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Overload short hand to create a new Stochastic indicator; defaulting to the 3 period for dStoch
symbol | The symbol whose stochastic we seek |
resolution | The resolution. |
period | The period of the stochastic. Normally 14 |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2104 of file QCAlgorithm.Indicators.cs.
PremierStochasticOscillator QuantConnect.Algorithm.QCAlgorithm.PSO | ( | Symbol | symbol, |
int | period, | ||
int | emaPeriod, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new instance of the Premier Stochastic Oscillator for the specified symbol.
symbol | The symbol for which the stochastic indicator is being calculated. |
period | The period for calculating the Stochastic K value. |
emaPeriod | The period for the Exponential Moving Average (EMA) used to smooth the Stochastic K. |
resolution | The data resolution (e.g., daily, hourly) for the indicator |
selector | Optional function to select a value from the BaseData. Defaults to casting the input to a TradeBar. |
Definition at line 2119 of file QCAlgorithm.Indicators.cs.
Sum QuantConnect.Algorithm.QCAlgorithm.SUM | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Sum indicator.
symbol | The symbol whose Sum we want |
period | The period over which to compute the Sum |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2136 of file QCAlgorithm.Indicators.cs.
SwissArmyKnife QuantConnect.Algorithm.QCAlgorithm.SWISS | ( | Symbol | symbol, |
int | period, | ||
double | delta, | ||
SwissArmyKnifeTool | tool, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates Swiss Army Knife transformation for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol to use for calculations |
period | The period of the calculation |
delta | The delta scale of the BandStop or BandPass |
tool | The tool os the Swiss Army Knife |
resolution | The resolution |
selector | elects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2157 of file QCAlgorithm.Indicators.cs.
Theta QuantConnect.Algorithm.QCAlgorithm.T | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType? | optionModel = null , |
||
OptionPricingModelType? | ivModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new Theta indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option for parity calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate Theta |
ivModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 2179 of file QCAlgorithm.Indicators.cs.
Theta QuantConnect.Algorithm.QCAlgorithm.Θ | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType | optionModel = OptionPricingModelType.BlackScholes , |
||
OptionPricingModelType? | ivModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new Theta indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option for parity calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate Theta |
ivModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 2202 of file QCAlgorithm.Indicators.cs.
T3MovingAverage QuantConnect.Algorithm.QCAlgorithm.T3 | ( | Symbol | symbol, |
int | period, | ||
decimal | volumeFactor = 0.7m , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new T3MovingAverage indicator.
symbol | The symbol whose T3 we want |
period | The period over which to compute the T3 |
volumeFactor | The volume factor to be used for the T3 (value must be in the [0,1] range, defaults to 0.7) |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2218 of file QCAlgorithm.Indicators.cs.
TripleExponentialMovingAverage QuantConnect.Algorithm.QCAlgorithm.TEMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new TripleExponentialMovingAverage indicator.
symbol | The symbol whose TEMA we want |
period | The period over which to compute the TEMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2236 of file QCAlgorithm.Indicators.cs.
TrueStrengthIndex QuantConnect.Algorithm.QCAlgorithm.TSI | ( | Symbol | symbol, |
int | longTermPeriod = 25 , |
||
int | shortTermPeriod = 13 , |
||
int | signalPeriod = 7 , |
||
MovingAverageType | signalType = MovingAverageType.Exponential , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a TrueStrengthIndex indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose TSI we want |
shortTermPeriod | Period used for the first price change smoothing |
longTermPeriod | Period used for the second (double) price change smoothing |
signalPeriod | The signal period |
signalType | The type of moving average to use for the signal |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2258 of file QCAlgorithm.Indicators.cs.
TrueRange QuantConnect.Algorithm.QCAlgorithm.TR | ( | Symbol | symbol, |
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new TrueRange indicator.
symbol | The symbol whose TR we want |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2276 of file QCAlgorithm.Indicators.cs.
TriangularMovingAverage QuantConnect.Algorithm.QCAlgorithm.TRIMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new TriangularMovingAverage indicator.
symbol | The symbol whose TRIMA we want |
period | The period over which to compute the TRIMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2294 of file QCAlgorithm.Indicators.cs.
Trix QuantConnect.Algorithm.QCAlgorithm.TRIX | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Trix indicator.
symbol | The symbol whose TRIX we want |
period | The period over which to compute the TRIX |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2312 of file QCAlgorithm.Indicators.cs.
UltimateOscillator QuantConnect.Algorithm.QCAlgorithm.ULTOSC | ( | Symbol | symbol, |
int | period1, | ||
int | period2, | ||
int | period3, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new UltimateOscillator indicator.
symbol | The symbol whose ULTOSC we want |
period1 | The first period over which to compute the ULTOSC |
period2 | The second period over which to compute the ULTOSC |
period3 | The third period over which to compute the ULTOSC |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2332 of file QCAlgorithm.Indicators.cs.
Vega QuantConnect.Algorithm.QCAlgorithm.V | ( | Symbol | symbol, |
Symbol | mirrorOption = null , |
||
decimal? | riskFreeRate = null , |
||
decimal? | dividendYield = null , |
||
OptionPricingModelType? | optionModel = null , |
||
OptionPricingModelType? | ivModel = null , |
||
Resolution? | resolution = null |
||
) |
Creates a new Vega indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The option symbol whose values we want as an indicator |
mirrorOption | The mirror option for parity calculation |
riskFreeRate | The risk free rate |
dividendYield | The dividend yield |
optionModel | The option pricing model used to estimate Vega |
ivModel | The option pricing model used to estimate IV |
resolution | The desired resolution of the data |
Definition at line 2354 of file QCAlgorithm.Indicators.cs.
VariableIndexDynamicAverage QuantConnect.Algorithm.QCAlgorithm.VIDYA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Chande's Variable Index Dynamic Average indicator.
symbol | The symbol whose VIDYA we want |
period | The period over which to compute the VIDYA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2373 of file QCAlgorithm.Indicators.cs.
Variance QuantConnect.Algorithm.QCAlgorithm.VAR | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Variance indicator. This will return the population variance of samples over the specified period.
symbol | The symbol whose VAR we want |
period | The period over which to compute the VAR |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2392 of file QCAlgorithm.Indicators.cs.
Variance QuantConnect.Algorithm.QCAlgorithm.V | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new Variance indicator. This will return the population variance of samples over the specified period.
symbol | The symbol whose variance we want |
period | The period over which to compute the variance |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2406 of file QCAlgorithm.Indicators.cs.
ValueAtRisk QuantConnect.Algorithm.QCAlgorithm.VAR | ( | Symbol | symbol, |
int | period, | ||
double | confidenceLevel, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new ValueAtRisk indicator.
symbol | The symbol whose VAR we want |
period | The period over which to compute the VAR |
confidenceLevel | The confidence level for Value at risk calculation |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2424 of file QCAlgorithm.Indicators.cs.
VolumeWeightedAveragePriceIndicator QuantConnect.Algorithm.QCAlgorithm.VWAP | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates an VolumeWeightedAveragePrice (VWAP) indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose VWAP we want |
period | The period of the VWAP |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2443 of file QCAlgorithm.Indicators.cs.
IntradayVwap QuantConnect.Algorithm.QCAlgorithm.VWAP | ( | Symbol | symbol | ) |
Creates the canonical VWAP indicator that resets each day. The indicator will be automatically updated on the security's configured resolution.
symbol | The symbol whose VWAP we want |
Definition at line 2459 of file QCAlgorithm.Indicators.cs.
VolumeWeightedMovingAverage QuantConnect.Algorithm.QCAlgorithm.VWMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new VolumeWeightedMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose VWMA we want |
period | The smoothing period used to smooth the computed VWMA values |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2477 of file QCAlgorithm.Indicators.cs.
Vortex QuantConnect.Algorithm.QCAlgorithm.VTX | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new Vortex indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose VWMA we want |
period | The smoothing period used to smooth the computed VWMA values |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2495 of file QCAlgorithm.Indicators.cs.
WilliamsPercentR QuantConnect.Algorithm.QCAlgorithm.WILR | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
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 | The symbol whose Williams R we want |
period | The period over which to compute the Williams R |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2514 of file QCAlgorithm.Indicators.cs.
WilderMovingAverage QuantConnect.Algorithm.QCAlgorithm.WWMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a WilderMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose WMA we want |
period | The period of the WMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
WWMA for Welles Wilder Moving Average
Definition at line 2534 of file QCAlgorithm.Indicators.cs.
WilderSwingIndex QuantConnect.Algorithm.QCAlgorithm.SI | ( | Symbol | symbol, |
decimal | limitMove, | ||
Resolution? | resolution = Resolution.Daily , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a Wilder Swing Index (SI) indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose SI we want |
limitMove | The maximum daily change in price for the SI |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
SI for Wilder Swing Index
Definition at line 2554 of file QCAlgorithm.Indicators.cs.
WilderAccumulativeSwingIndex QuantConnect.Algorithm.QCAlgorithm.ASI | ( | Symbol | symbol, |
decimal | limitMove, | ||
Resolution? | resolution = Resolution.Daily , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a Wilder Accumulative Swing Index (ASI) indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose ASI we want |
limitMove | The maximum daily change in price for the ASI |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
ASI for Wilder Accumulative Swing Index
Definition at line 2575 of file QCAlgorithm.Indicators.cs.
ArmsIndex QuantConnect.Algorithm.QCAlgorithm.TRIN | ( | IEnumerable< Symbol > | symbols, |
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new Arms Index indicator
symbols | The symbols whose Arms Index we want |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2593 of file QCAlgorithm.Indicators.cs.
ArmsIndex QuantConnect.Algorithm.QCAlgorithm.TRIN | ( | Symbol[] | symbols, |
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new Arms Index indicator
symbols | The symbols whose Arms Index we want |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2606 of file QCAlgorithm.Indicators.cs.
AdvanceDeclineRatio QuantConnect.Algorithm.QCAlgorithm.ADR | ( | IEnumerable< Symbol > | symbols, |
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new Advance/Decline Ratio indicator
symbols | The symbols whose A/D Ratio we want |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2627 of file QCAlgorithm.Indicators.cs.
AdvanceDeclineVolumeRatio QuantConnect.Algorithm.QCAlgorithm.ADVR | ( | IEnumerable< Symbol > | symbols, |
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new Advance/Decline Volume Ratio indicator
symbols | The symbol whose A/D Volume Rate we want |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2648 of file QCAlgorithm.Indicators.cs.
AdvanceDeclineDifference QuantConnect.Algorithm.QCAlgorithm.ADDIFF | ( | IEnumerable< Symbol > | symbols, |
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new Advance/Decline Difference indicator
symbols | The symbols whose A/D Difference we want |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2669 of file QCAlgorithm.Indicators.cs.
McGinleyDynamic QuantConnect.Algorithm.QCAlgorithm.MGD | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a new McGinley Dynamic indicator
symbol | The symbol whose McGinley Dynamic indicator value we want |
period | The period of the McGinley Dynamic indicator |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2691 of file QCAlgorithm.Indicators.cs.
McClellanOscillator QuantConnect.Algorithm.QCAlgorithm.MOSC | ( | IEnumerable< Symbol > | symbols, |
int | fastPeriod = 19 , |
||
int | slowPeriod = 39 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new McClellan Oscillator indicator
symbols | The symbols whose McClellan Oscillator we want |
fastPeriod | Fast period EMA of advance decline difference |
slowPeriod | Slow period EMA of advance decline difference |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2709 of file QCAlgorithm.Indicators.cs.
McClellanOscillator QuantConnect.Algorithm.QCAlgorithm.MOSC | ( | Symbol[] | symbols, |
int | fastPeriod = 19 , |
||
int | slowPeriod = 39 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new McClellan Oscillator indicator
symbols | The symbols whose McClellan Oscillator we want |
fastPeriod | Fast period EMA of advance decline difference |
slowPeriod | Slow period EMA of advance decline difference |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2724 of file QCAlgorithm.Indicators.cs.
McClellanSummationIndex QuantConnect.Algorithm.QCAlgorithm.MSI | ( | IEnumerable< Symbol > | symbols, |
int | fastPeriod = 19 , |
||
int | slowPeriod = 39 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new McClellan Summation Index indicator
symbols | The symbols whose McClellan Summation Index we want |
fastPeriod | Fast period EMA of advance decline difference |
slowPeriod | Slow period EMA of advance decline difference |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2747 of file QCAlgorithm.Indicators.cs.
McClellanSummationIndex QuantConnect.Algorithm.QCAlgorithm.MSI | ( | Symbol[] | symbols, |
int | fastPeriod = 19 , |
||
int | slowPeriod = 39 , |
||
Resolution? | resolution = null , |
||
Func< IBaseData, TradeBar > | selector = null |
||
) |
Creates a new McClellan Summation Index indicator
symbols | The symbols whose McClellan Summation Index we want |
fastPeriod | Fast period EMA of advance decline difference |
slowPeriod | Slow period EMA of advance decline difference |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2762 of file QCAlgorithm.Indicators.cs.
RogersSatchellVolatility QuantConnect.Algorithm.QCAlgorithm.RSV | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, IBaseDataBar > | selector = null |
||
) |
Creates a new RogersSatchellVolatility indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose RogersSatchellVolatility we want |
period | The period of the rolling window used to compute volatility |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar |
Definition at line 2786 of file QCAlgorithm.Indicators.cs.
ZeroLagExponentialMovingAverage QuantConnect.Algorithm.QCAlgorithm.ZLEMA | ( | Symbol | symbol, |
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Creates a ZeroLagExponentialMovingAverage indicator for the symbol. The indicator will be automatically updated on the given resolution.
symbol | The symbol whose ZLEMA we want |
period | The period of the ZLEMA |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2805 of file QCAlgorithm.Indicators.cs.
string QuantConnect.Algorithm.QCAlgorithm.CreateIndicatorName | ( | Symbol | symbol, |
FormattableString | type, | ||
Resolution? | resolution | ||
) |
Creates a new name for an indicator created with the convenience functions (SMA, EMA, ect...)
symbol | The symbol this indicator is registered to |
type | The indicator type, for example, 'SMA(5)' |
resolution | The resolution requested |
Definition at line 2822 of file QCAlgorithm.Indicators.cs.
string QuantConnect.Algorithm.QCAlgorithm.CreateIndicatorName | ( | Symbol | symbol, |
string | type, | ||
Resolution? | resolution | ||
) |
Creates a new name for an indicator created with the convenience functions (SMA, EMA, ect...)
symbol | The symbol this indicator is registered to |
type | The indicator type, for example, 'SMA(5)' |
resolution | The resolution requested |
Definition at line 2835 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator | ( | Symbol | symbol, |
IndicatorBase< IndicatorDataPoint > | indicator, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
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 | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
resolution | The resolution at which to send data to the indicator, null to use the same resolution as the subscription |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2931 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator | ( | Symbol | symbol, |
IndicatorBase< IndicatorDataPoint > | indicator, | ||
TimeSpan? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
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 | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
resolution | The resolution at which to send data to the indicator, null to use the same resolution as the subscription |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2946 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator | ( | Symbol | symbol, |
IndicatorBase< IndicatorDataPoint > | indicator, | ||
IDataConsolidator | consolidator, | ||
Func< IBaseData, decimal > | selector = null |
||
) |
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator.
symbol | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
consolidator | The consolidator to receive raw subscription data |
selector | Selects a value from the BaseData send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 2961 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator< T > | ( | Symbol | symbol, |
IndicatorBase< T > | indicator, | ||
Resolution? | resolution = null |
||
) |
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator.
symbol | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
resolution | The resolution at which to send data to the indicator, null to use the same resolution as the subscription |
T | : | IBaseData |
Definition at line 2985 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator< T > | ( | Symbol | symbol, |
IndicatorBase< T > | indicator, | ||
Resolution? | resolution, | ||
Func< IBaseData, T > | selector | ||
) |
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator.
symbol | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
resolution | The resolution at which to send data to the indicator, null to use the same resolution as the subscription |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
T | : | IBaseData |
Definition at line 3001 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator< T > | ( | Symbol | symbol, |
IndicatorBase< T > | indicator, | ||
TimeSpan? | resolution, | ||
Func< IBaseData, T > | selector = null |
||
) |
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator.
symbol | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
resolution | The resolution at which to send data to the indicator, null to use the same resolution as the subscription |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
T | : | IBaseData |
Definition at line 3017 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator< T > | ( | Symbol | symbol, |
IndicatorBase< T > | indicator, | ||
IDataConsolidator | consolidator, | ||
Func< IBaseData, T > | selector = null |
||
) |
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator.
symbol | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
consolidator | The consolidator to receive raw subscription data |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
T | : | IBaseData |
Definition at line 3033 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.UnregisterIndicator | ( | IndicatorBase | indicator | ) |
Will unregister an indicator and it's associated consolidator instance so they stop receiving data updates
indicator | The indicator instance to unregister |
Definition at line 3073 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.DeregisterIndicator | ( | IndicatorBase | indicator | ) |
Will deregister an indicator and it's associated consolidator instance so they stop receiving data updates
indicator | The indicator instance to deregister |
Definition at line 3084 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.WarmUpIndicator | ( | Symbol | symbol, |
IndicatorBase< IndicatorDataPoint > | indicator, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Warms up a given indicator with historical data
symbol | The symbol whose indicator we want |
indicator | The indicator we want to warm up |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3103 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.WarmUpIndicator | ( | IEnumerable< Symbol > | symbols, |
IndicatorBase< IndicatorDataPoint > | indicator, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Warms up a given indicator with historical data
symbols | The symbols whose indicator we want |
indicator | The indicator we want to warm up |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3117 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.WarmUpIndicator | ( | Symbol | symbol, |
IndicatorBase< IndicatorDataPoint > | indicator, | ||
TimeSpan | period, | ||
Func< IBaseData, decimal > | selector = null |
||
) |
Warms up a given indicator with historical data
symbol | The symbol whose indicator we want |
indicator | The indicator we want to warm up |
period | The necessary period to warm up the indicator |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3134 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.WarmUpIndicator< T > | ( | Symbol | symbol, |
IndicatorBase< T > | indicator, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, T > | selector = null |
||
) |
Warms up a given indicator with historical data
symbol | The symbol whose indicator we want |
indicator | The indicator we want to warm up |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
T | : | class | |
T | : | IBaseData |
Definition at line 3160 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.WarmUpIndicator< T > | ( | IEnumerable< Symbol > | symbols, |
IndicatorBase< T > | indicator, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, T > | selector = null |
||
) |
Warms up a given indicator with historical data
symbols | The symbols whose indicator we want |
indicator | The indicator we want to warm up |
resolution | The resolution |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
T | : | class | |
T | : | IBaseData |
Definition at line 3175 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.WarmUpIndicator< T > | ( | Symbol | symbol, |
IndicatorBase< T > | indicator, | ||
TimeSpan | period, | ||
Func< IBaseData, T > | selector = null |
||
) |
Warms up a given indicator with historical data
symbol | The symbol whose indicator we want |
indicator | The indicator we want to warm up |
period | The necessary period to warm up the indicator |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
T | : | class | |
T | : | IBaseData |
Definition at line 3193 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.ResolveConsolidator | ( | Symbol | symbol, |
Resolution? | resolution, | ||
Type | dataType = null |
||
) |
Gets the default consolidator for the specified symbol and resolution
symbol | The symbol whose data is to be consolidated |
resolution | The resolution for the consolidator, if null, uses the resolution from subscription |
dataType | The data type for this consolidator, if null, uses TradeBar over QuoteBar if present |
Definition at line 3337 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.ResolveConsolidator | ( | Symbol | symbol, |
TimeSpan? | timeSpan, | ||
Type | dataType = null |
||
) |
Gets the default consolidator for the specified symbol and resolution
symbol | The symbol whose data is to be consolidated |
timeSpan | The requested time span for the consolidator, if null, uses the resolution from subscription |
dataType | The data type for this consolidator, if null, uses TradeBar over QuoteBar if present |
Definition at line 3352 of file QCAlgorithm.Indicators.cs.
|
static |
Creates a new consolidator for the specified period, generating the requested output type.
period | The consolidation period |
consolidatorInputType | The desired input type of the consolidator, such as TradeBar or QuoteBar |
tickType | Trade or Quote. Optional, defaults to trade |
Definition at line 3366 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
Resolution | period, | ||
Action< TradeBar > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
handler | Data handler receives new consolidated data when generated |
Definition at line 3422 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
TimeSpan | period, | ||
Action< TradeBar > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
handler | Data handler receives new consolidated data when generated |
Definition at line 3435 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
Resolution | period, | ||
Action< QuoteBar > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
handler | Data handler receives new consolidated data when generated |
Definition at line 3448 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
TimeSpan | period, | ||
Action< QuoteBar > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
handler | Data handler receives new consolidated data when generated |
Definition at line 3461 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate< T > | ( | Symbol | symbol, |
TimeSpan | period, | ||
Action< T > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match.
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
handler | Data handler receives new consolidated data when generated |
T | : | class | |
T | : | IBaseData |
Definition at line 3475 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate< T > | ( | Symbol | symbol, |
Resolution | period, | ||
TickType? | tickType, | ||
Action< T > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match.
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
tickType | The tick type of subscription used as data source for consolidator. Specify null to use first subscription found. |
handler | Data handler receives new consolidated data when generated |
T | : | class | |
T | : | IBaseData |
Definition at line 3495 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate< T > | ( | Symbol | symbol, |
TimeSpan | period, | ||
TickType? | tickType, | ||
Action< T > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match.
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
tickType | The tick type of subscription used as data source for consolidator. Specify null to use first subscription found. |
handler | Data handler receives new consolidated data when generated |
T | : | class | |
T | : | IBaseData |
Definition at line 3511 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
Func< DateTime, CalendarInfo > | calendar, | ||
Action< QuoteBar > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
calendar | The consolidation calendar |
handler | Data handler receives new consolidated data when generated |
Definition at line 3525 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
Func< DateTime, CalendarInfo > | calendar, | ||
Action< TradeBar > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
calendar | The consolidation calendar |
handler | Data handler receives new consolidated data when generated |
Definition at line 3538 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate< T > | ( | Symbol | symbol, |
Func< DateTime, CalendarInfo > | calendar, | ||
Action< T > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match.
symbol | The symbol who's data is to be consolidated |
calendar | The consolidation calendar |
handler | Data handler receives new consolidated data when generated |
T | : | class | |
T | : | IBaseData |
Definition at line 3552 of file QCAlgorithm.Indicators.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate< T > | ( | Symbol | symbol, |
Func< DateTime, CalendarInfo > | calendar, | ||
TickType? | tickType, | ||
Action< T > | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol and tick type. The handler and tick type must match.
symbol | The symbol who's data is to be consolidated |
calendar | The consolidation calendar |
tickType | The tick type of subscription used as data source for consolidator. Specify null to use first subscription found. |
handler | Data handler receives new consolidated data when generated |
T | : | class | |
T | : | IBaseData |
Definition at line 3572 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | IndicatorBase< IndicatorDataPoint > | indicator, |
Symbol | symbol, | ||
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbol | The symbol to retrieve historical data for |
period | The number of bars to request |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3588 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | IndicatorBase< IndicatorDataPoint > | indicator, |
IEnumerable< Symbol > | symbols, | ||
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Gets the historical data of an indicator for the specified symbols. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbols | The symbols to retrieve historical data for |
period | The number of bars to request |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3603 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory< T > | ( | IndicatorBase< T > | indicator, |
Symbol | symbol, | ||
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, T > | selector = null |
||
) |
Gets the historical data of a bar indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbol | The symbol to retrieve historical data for |
period | The number of bars to request |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
T | : | IBaseData |
Definition at line 3624 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory< T > | ( | IndicatorBase< T > | indicator, |
IEnumerable< Symbol > | symbols, | ||
int | period, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, T > | selector = null |
||
) |
Gets the historical data of a bar indicator for the specified symbols. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbols | The symbols to retrieve historical data for |
period | The number of bars to request |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
T | : | IBaseData |
Definition at line 3640 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | IndicatorBase< IndicatorDataPoint > | indicator, |
Symbol | symbol, | ||
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbol | The symbol to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3662 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | IndicatorBase< IndicatorDataPoint > | indicator, |
IEnumerable< Symbol > | symbols, | ||
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbols | The symbols to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3677 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory< T > | ( | IndicatorBase< T > | indicator, |
IEnumerable< Symbol > | symbols, | ||
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, T > | selector = null |
||
) |
Gets the historical data of a bar indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbols | The symbols to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
T | : | IBaseData |
Definition at line 3692 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory< T > | ( | IndicatorBase< T > | indicator, |
Symbol | symbol, | ||
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, T > | selector = null |
||
) |
Gets the historical data of a bar indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbol | The symbol to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
T | : | IBaseData |
Definition at line 3708 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | IndicatorBase< IndicatorDataPoint > | indicator, |
IEnumerable< Symbol > | symbols, | ||
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Gets the historical data of an indicator for the specified symbols. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbols | The symbols to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3725 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | IndicatorBase< IndicatorDataPoint > | indicator, |
Symbol | symbol, | ||
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, decimal > | selector = null |
||
) |
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbol | The symbol to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3742 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory< T > | ( | IndicatorBase< T > | indicator, |
Symbol | symbol, | ||
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, T > | selector = null |
||
) |
Gets the historical data of a bar indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbol | The symbol to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
T | : | IBaseData |
Definition at line 3758 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory< T > | ( | IndicatorBase< T > | indicator, |
IEnumerable< Symbol > | symbols, | ||
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
Func< IBaseData, T > | selector = null |
||
) |
Gets the historical data of a bar indicator for the specified symbols. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbols | The symbols to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
T | : | IBaseData |
Definition at line 3775 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | IndicatorBase< IndicatorDataPoint > | indicator, |
IEnumerable< Slice > | history, | ||
Func< IBaseData, decimal > | selector = null |
||
) |
Gets the historical data of an indicator and convert it into pandas.DataFrame
indicator | The target indicator |
history | Historical data used to calculate the indicator |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 3789 of file QCAlgorithm.Indicators.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory< T > | ( | IndicatorBase< T > | indicator, |
IEnumerable< Slice > | history, | ||
Func< IBaseData, T > | selector = null |
||
) |
Gets the historical data of an bar indicator and convert it into pandas.DataFrame
indicator | Bar indicator |
history | Historical data used to calculate the indicator |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
T | : | IBaseData |
Definition at line 3802 of file QCAlgorithm.Indicators.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddChart | ( | Chart | chart | ) |
Add a Chart object to algorithm collection
chart | Chart object to add to collection. |
Definition at line 56 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
decimal | value | ||
) |
Plot a chart using string series name, with value.
series | Name of the plot series |
value | Value to plot |
Definition at line 68 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Record | ( | string | series, |
int | value | ||
) |
Plot a chart using string series name, with int value. Alias of Plot();
Record(string series, int value)
Definition at line 80 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Record | ( | string | series, |
double | value | ||
) |
Plot a chart using string series name, with double value. Alias of Plot();
Definition at line 90 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Record | ( | string | series, |
decimal | value | ||
) |
Plot a chart using string series name, with decimal value. Alias of Plot();
series | |
value |
Definition at line 102 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
double | value | ||
) |
Plot a chart using string series name, with double value.
Definition at line 113 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
int | value | ||
) |
Plot a chart using string series name, with int value.
Definition at line 122 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
float | value | ||
) |
Plot a chart using string series name, with float value.
Definition at line 132 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
string | series, | ||
double | value | ||
) |
Plot a chart to string chart name, using string series name, with double value.
Definition at line 142 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
string | series, | ||
int | value | ||
) |
Plot a chart to string chart name, using string series name, with int value
Definition at line 152 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
string | series, | ||
float | value | ||
) |
Plot a chart to string chart name, using string series name, with float value
Definition at line 162 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
string | series, | ||
decimal | value | ||
) |
Plot a value to a chart of string-chart name, with string series name, and decimal value. If chart does not exist, create it.
chart | Chart name |
series | Series name |
value | Value of the point |
Definition at line 174 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
double | open, | ||
double | high, | ||
double | low, | ||
double | close | ||
) |
Plot a candlestick to the default/primary chart series by the given series name.
series | Series name |
open | The candlestick open value |
high | The candlestick high value |
low | The candlestick low value |
close | The candlestick close value |
Definition at line 192 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
float | open, | ||
float | high, | ||
float | low, | ||
float | close | ||
) |
Plot a candlestick to the default/primary chart series by the given series name.
series | Series name |
open | The candlestick open value |
high | The candlestick high value |
low | The candlestick low value |
close | The candlestick close value |
Definition at line 207 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
int | open, | ||
int | high, | ||
int | low, | ||
int | close | ||
) |
Plot a candlestick to the default/primary chart series by the given series name.
series | Series name |
open | The candlestick open value |
high | The candlestick high value |
low | The candlestick low value |
close | The candlestick close value |
Definition at line 222 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
decimal | open, | ||
decimal | high, | ||
decimal | low, | ||
decimal | close | ||
) |
Plot a candlestick to the default/primary chart series by the given series name.
series | Name of the plot series |
open | The candlestick open value |
high | The candlestick high value |
low | The candlestick low value |
close | The candlestick close value |
Definition at line 237 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
string | series, | ||
double | open, | ||
double | high, | ||
double | low, | ||
double | close | ||
) |
Plot a candlestick to the given series of the given chart.
chart | Chart name |
series | Series name |
open | The candlestick open value |
high | The candlestick high value |
low | The candlestick low value |
close | The candlestick close value |
Definition at line 254 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
string | series, | ||
float | open, | ||
float | high, | ||
float | low, | ||
float | close | ||
) |
Plot a candlestick to the given series of the given chart.
chart | Chart name |
series | Series name |
open | The candlestick open value |
high | The candlestick high value |
low | The candlestick low value |
close | The candlestick close value |
Definition at line 270 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
string | series, | ||
int | open, | ||
int | high, | ||
int | low, | ||
int | close | ||
) |
Plot a candlestick to the given series of the given chart.
chart | Chart name |
series | Series name |
open | The candlestick open value |
high | The candlestick high value |
low | The candlestick low value |
close | The candlestick close value |
Definition at line 286 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
string | series, | ||
decimal | open, | ||
decimal | high, | ||
decimal | low, | ||
decimal | close | ||
) |
Plot a candlestick to a chart of string-chart name, with string series name, and decimal value. If chart does not exist, create it.
chart | Chart name |
series | Series name |
open | The candlestick open value |
high | The candlestick high value |
low | The candlestick low value |
close | The candlestick close value |
Definition at line 301 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
TradeBar | bar | ||
) |
Plot a candlestick to the given series of the given chart.
series | Name of the plot series |
bar | The trade bar to be plotted to the candlestick series |
Definition at line 316 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
string | series, | ||
TradeBar | bar | ||
) |
Plot a candlestick to the given series of the given chart.
chart | Chart name |
series | Name of the plot series |
bar | The trade bar to be plotted to the candlestick series |
Definition at line 329 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddSeries | ( | string | chart, |
string | series, | ||
SeriesType | seriesType, | ||
string | unit = "$" |
||
) |
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 | The chart name |
series | The series name |
seriesType | The type of series, i.e, Scatter |
unit | The unit of the y axis, usually $ |
Definition at line 388 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
params IndicatorBase[] | indicators | ||
) |
Plots the value of each indicator on the chart
chart | The chart's name |
indicators | The indicators to plot |
Definition at line 406 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.PlotIndicator | ( | string | chart, |
params IndicatorBase[] | indicators | ||
) |
Automatically plots each indicator when a new value is available
Definition at line 419 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.PlotIndicator | ( | string | chart, |
bool | waitForReady, | ||
params IndicatorBase[] | indicators | ||
) |
Automatically plots each indicator when a new value is available, optionally waiting for indicator.IsReady to return true
Definition at line 429 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetRuntimeStatistic | ( | string | name, |
string | value | ||
) |
Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI.
name | Name of your runtime statistic |
value | String value of your runtime statistic |
Definition at line 454 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetRuntimeStatistic | ( | string | name, |
decimal | value | ||
) |
Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI.
name | Name of your runtime statistic |
value | Decimal value of your runtime statistic |
Definition at line 465 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetRuntimeStatistic | ( | string | name, |
int | value | ||
) |
Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI.
name | Name of your runtime statistic |
value | Int value of your runtime statistic |
Definition at line 476 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetRuntimeStatistic | ( | string | name, |
double | value | ||
) |
Set a runtime statistic for the algorithm. Runtime statistics are shown in the top banner of a live algorithm GUI.
name | Name of your runtime statistic |
value | Double value of your runtime statistic |
Definition at line 487 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetSummaryStatistic | ( | string | name, |
string | value | ||
) |
Set a custom summary statistic for the algorithm.
name | Name of the custom summary statistic |
value | Value of the custom summary statistic |
Definition at line 498 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetSummaryStatistic | ( | string | name, |
int | value | ||
) |
Set a custom summary statistic for the algorithm.
name | Name of the custom summary statistic |
value | Value of the custom summary statistic |
Definition at line 509 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetSummaryStatistic | ( | string | name, |
double | value | ||
) |
Set a custom summary statistic for the algorithm.
name | Name of the custom summary statistic |
value | Value of the custom summary statistic |
Definition at line 520 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetSummaryStatistic | ( | string | name, |
decimal | value | ||
) |
Set a custom summary statistic for the algorithm.
name | Name of the custom summary statistic |
value | Value of the custom summary statistic |
Definition at line 531 of file QCAlgorithm.Plotting.cs.
IEnumerable<Chart> QuantConnect.Algorithm.QCAlgorithm.GetChartUpdates | ( | bool | clearChartData = false | ) |
Get the chart updates by fetch the recent points added and return for dynamic Charting.
clearChartData |
GetChartUpdates returns the latest updates since previous request.
Definition at line 543 of file QCAlgorithm.Plotting.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetPandasConverter | ( | ) |
Sets pandas converter
Definition at line 51 of file QCAlgorithm.Python.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData | ( | PyObject | type, |
string | ticker, | ||
Resolution? | resolution = null |
||
) |
AddData 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). This method is meant for custom data types that require a ticker, but have no underlying Symbol. Examples of data sources that meet this criteria are U.S. Treasury Yield Curve Rates and Trading Economics data
type | Data source type |
ticker | Key/Ticker for data |
resolution | Resolution of the data |
Definition at line 67 of file QCAlgorithm.Python.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData | ( | PyObject | type, |
Symbol | underlying, | ||
Resolution? | resolution = null |
||
) |
AddData 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). This adds a Symbol to the Underlying
property in the custom data Symbol object. Use this method when adding custom data with a ticker from the past, such as "AOL" before it became "TWX", or if you need to filter using custom data and place trades on the Symbol associated with the custom data.
type | Data source type |
underlying | The underlying symbol for the custom data |
resolution | Resolution of the data |
We include three optional unused object parameters so that pythonnet chooses the intended method correctly. Previously, calling the overloaded method that accepts a string would instead call this method. Adding the three unused parameters makes it choose the correct method when using a string or Symbol. This is due to pythonnet's method precedence, as viewable here: https://github.com/QuantConnect/pythonnet/blob/9e29755c54e6008cb016e3dd9d75fbd8cd19fcf7/src/runtime/methodbinder.cs#L215
Definition at line 91 of file QCAlgorithm.Python.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData | ( | PyObject | type, |
string | ticker, | ||
Resolution? | resolution, | ||
DateTimeZone | timeZone, | ||
bool | fillForward = false , |
||
decimal | leverage = 1.0m |
||
) |
AddData a new user defined data source, requiring only the minimum config options. This method is meant for custom data types that require a ticker, but have no underlying Symbol. Examples of data sources that meet this criteria are U.S. Treasury Yield Curve Rates and Trading Economics data
type | Data source type |
ticker | Key/Ticker for data |
resolution | Resolution of the Data Required |
timeZone | Specifies the time zone of the raw data |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
Definition at line 109 of file QCAlgorithm.Python.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData | ( | PyObject | type, |
Symbol | underlying, | ||
Resolution? | resolution, | ||
DateTimeZone | timeZone, | ||
bool | fillForward = false , |
||
decimal | leverage = 1.0m |
||
) |
AddData a new user defined data source, requiring only the minimum config options. This adds a Symbol to the Underlying
property in the custom data Symbol object. Use this method when adding custom data with a ticker from the past, such as "AOL" before it became "TWX", or if you need to filter using custom data and place trades on the Symbol associated with the custom data.
type | Data source type |
underlying | The underlying symbol for the custom data |
resolution | Resolution of the Data Required |
timeZone | Specifies the time zone of the raw data |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
We include three optional unused object parameters so that pythonnet chooses the intended method correctly. Previously, calling the overloaded method that accepts a string would instead call this method. Adding the three unused parameters makes it choose the correct method when using a string or Symbol. This is due to pythonnet's method precedence, as viewable here: https://github.com/QuantConnect/pythonnet/blob/9e29755c54e6008cb016e3dd9d75fbd8cd19fcf7/src/runtime/methodbinder.cs#L215
Definition at line 135 of file QCAlgorithm.Python.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData | ( | Type | dataType, |
string | ticker, | ||
Resolution? | resolution, | ||
DateTimeZone | timeZone, | ||
bool | fillForward = false , |
||
decimal | leverage = 1.0m |
||
) |
AddData a new user defined data source, requiring only the minimum config options. This method is meant for custom data types that require a ticker, but have no underlying Symbol. Examples of data sources that meet this criteria are U.S. Treasury Yield Curve Rates and Trading Economics data
dataType | Data source type |
ticker | Key/Ticker for data |
resolution | Resolution of the Data Required |
timeZone | Specifies the time zone of the raw data |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
Definition at line 153 of file QCAlgorithm.Python.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData | ( | Type | dataType, |
Symbol | underlying, | ||
Resolution? | resolution = null , |
||
DateTimeZone | timeZone = null , |
||
bool | fillForward = false , |
||
decimal | leverage = 1.0m |
||
) |
AddData a new user defined data source, requiring only the minimum config options. This adds a Symbol to the Underlying
property in the custom data Symbol object. Use this method when adding custom data with a ticker from the past, such as "AOL" before it became "TWX", or if you need to filter using custom data and place trades on the Symbol associated with the custom data.
dataType | Data source type |
underlying | |
resolution | Resolution of the Data Required |
timeZone | Specifies the time zone of the raw data |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
We include three optional unused object parameters so that pythonnet chooses the intended method correctly. Previously, calling the overloaded method that accepts a string would instead call this method. Adding the three unused parameters makes it choose the correct method when using a string or Symbol. This is due to pythonnet's method precedence, as viewable here: https://github.com/QuantConnect/pythonnet/blob/9e29755c54e6008cb016e3dd9d75fbd8cd19fcf7/src/runtime/methodbinder.cs#L215
Definition at line 198 of file QCAlgorithm.Python.cs.
Security QuantConnect.Algorithm.QCAlgorithm.AddData | ( | PyObject | type, |
string | ticker, | ||
SymbolProperties | properties, | ||
SecurityExchangeHours | exchangeHours, | ||
Resolution? | resolution = null , |
||
bool | fillForward = false , |
||
decimal | leverage = 1.0m |
||
) |
AddData a new user defined data source including symbol properties and exchange hours, all other vars are not required and will use defaults. This overload reflects the C# equivalent for custom properties and market hours
type | Data source type |
ticker | Key/Ticker for data |
properties | The properties of this new custom data |
exchangeHours | The Exchange hours of this symbol |
resolution | Resolution of the Data Required |
fillForward | When no data available on a tradebar, return the last data that was generated |
leverage | Custom leverage per security |
Definition at line 218 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddFutureOption | ( | Symbol | futureSymbol, |
PyObject | optionFilter | ||
) |
Creates and adds a new Future Option contract to the algorithm.
futureSymbol | The Future canonical symbol (i.e. Symbol returned from AddFuture) |
optionFilter | Filter to apply to option contracts loaded as part of the universe |
ArgumentException | The symbol provided is not canonical. |
Definition at line 239 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | PyObject | pyObject | ) |
Creates a new universe and adds it to the algorithm. This is for coarse fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork)
pyObject | Defines an initial coarse selection |
Definition at line 292 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | PyObject | pyObject, |
PyObject | pyfine | ||
) |
Creates a new universe and adds it to the algorithm. This is for coarse and fine fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork)
pyObject | Defines an initial coarse selection or a universe |
pyfine | Defines a more detailed selection with access to more data |
Definition at line 330 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | string | name, |
Resolution | resolution, | ||
PyObject | pySelector | ||
) |
Creates a new universe and adds it to the algorithm. This can be used to return a list of string symbols retrieved from anywhere and will loads those symbols under the US Equity market.
name | A unique name for this universe |
resolution | The resolution this universe should be triggered on |
pySelector | Function delegate that accepts a DateTime and returns a collection of string symbols |
Definition at line 385 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | string | name, |
PyObject | pySelector | ||
) |
Creates a new universe and adds it to the algorithm. This can be used to return a list of string symbols retrieved from anywhere and will loads those symbols under the US Equity market.
name | A unique name for this universe |
pySelector | Function delegate that accepts a DateTime and returns a collection of string symbols |
Definition at line 398 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | SecurityType | securityType, |
string | name, | ||
Resolution | resolution, | ||
string | market, | ||
UniverseSettings | universeSettings, | ||
PyObject | pySelector | ||
) |
Creates a new user defined universe that will fire on the requested resolution during market hours.
securityType | The security type of the universe |
name | A unique name for this universe |
resolution | The resolution this universe should be triggered on |
market | The market of the universe |
universeSettings | The subscription settings used for securities added from this universe |
pySelector | Function delegate that accepts a DateTime and returns a collection of string symbols |
Definition at line 414 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | PyObject | T, |
string | name, | ||
PyObject | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings
T | The data type |
name | A unique name for this universe |
selector | Function delegate that performs selection on the universe data |
Definition at line 429 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | PyObject | T, |
string | name, | ||
Resolution | resolution, | ||
PyObject | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Market.USA and UniverseSettings
T | The data type |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
selector | Function delegate that performs selection on the universe data |
Definition at line 444 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | PyObject | T, |
string | name, | ||
Resolution | resolution, | ||
UniverseSettings | universeSettings, | ||
PyObject | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, and Market.USA
T | The data type |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
universeSettings | The settings used for securities added by this universe |
selector | Function delegate that performs selection on the universe data |
Definition at line 460 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | PyObject | T, |
string | name, | ||
UniverseSettings | universeSettings, | ||
PyObject | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, and Market.USA
T | The data type |
name | A unique name for this universe |
universeSettings | The settings used for securities added by this universe |
selector | Function delegate that performs selection on the universe data |
Definition at line 475 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | PyObject | T, |
SecurityType | securityType, | ||
string | name, | ||
Resolution | resolution, | ||
string | market, | ||
PyObject | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property.
T | The data type |
securityType | The security type the universe produces |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
market | The market for selected symbols |
selector | Function delegate that performs selection on the universe data |
Definition at line 491 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | PyObject | T, |
SecurityType | securityType, | ||
string | name, | ||
Resolution | resolution, | ||
string | market, | ||
UniverseSettings | universeSettings, | ||
PyObject | selector | ||
) |
Creates a new universe and adds it to the algorithm
T | The data type |
securityType | The security type the universe produces |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
market | The market for selected symbols |
universeSettings | The subscription settings to use for newly created subscriptions |
selector | Function delegate that performs selection on the universe data |
Definition at line 507 of file QCAlgorithm.Python.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | Type | dataType, |
SecurityType? | securityType = null , |
||
string | name = null , |
||
Resolution? | resolution = null , |
||
string | market = null , |
||
UniverseSettings | universeSettings = null , |
||
PyObject | pySelector = null |
||
) |
Creates a new universe and adds it to the algorithm
dataType | The data type |
securityType | The security type the universe produces |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
market | The market for selected symbols |
universeSettings | The subscription settings to use for newly created subscriptions |
pySelector | Function delegate that performs selection on the universe data |
Definition at line 523 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddUniverseOptions | ( | PyObject | universe, |
PyObject | optionFilter | ||
) |
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 | The universe we want to chain an option universe selection model too |
optionFilter | The option filter universe to use |
Definition at line 554 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator | ( | Symbol | symbol, |
PyObject | indicator, | ||
Resolution? | resolution = null , |
||
PyObject | selector = null |
||
) |
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator.
symbol | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
resolution | The resolution at which to send data to the indicator, null to use the same resolution as the subscription |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
Definition at line 582 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator | ( | Symbol | symbol, |
PyObject | indicator, | ||
TimeSpan? | resolution = null , |
||
PyObject | selector = null |
||
) |
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator.
symbol | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
resolution | The resolution at which to send data to the indicator, null to use the same resolution as the subscription |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
Definition at line 597 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator | ( | Symbol | symbol, |
PyObject | indicator, | ||
PyObject | pyObject, | ||
PyObject | selector = null |
||
) |
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator.
symbol | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
pyObject | The python object that it is trying to register with, could be consolidator or a timespan |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
Definition at line 612 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.RegisterIndicator | ( | Symbol | symbol, |
PyObject | indicator, | ||
IDataConsolidator | consolidator, | ||
PyObject | selector = null |
||
) |
Registers the consolidator to receive automatic updates as well as configures the indicator to receive updates from the consolidator.
symbol | The symbol to register against |
indicator | The indicator to receive data from the consolidator |
consolidator | The consolidator to receive raw subscription data |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
Definition at line 662 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.WarmUpIndicator | ( | Symbol | symbol, |
PyObject | indicator, | ||
Resolution? | resolution = null , |
||
PyObject | selector = null |
||
) |
Warms up a given indicator with historical data
symbol | The symbol whose indicator we want |
indicator | The indicator we want to warm up |
resolution | The resolution |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
Definition at line 697 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.WarmUpIndicator | ( | Symbol | symbol, |
PyObject | indicator, | ||
TimeSpan | period, | ||
PyObject | selector = null |
||
) |
Warms up a given indicator with historical data
symbol | The symbol whose indicator we want |
indicator | The indicator we want to warm up |
period | The necessary period to warm up the indicator |
selector | Selects a value from the BaseData send into the indicator, if null defaults to a cast (x => (T)x) |
Definition at line 729 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | series, |
PyObject | pyObject | ||
) |
Plot a chart using string series name, with value.
series | Name of the plot series |
pyObject | PyObject with the value to plot |
Definition at line 757 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
Indicator | first, | ||
Indicator | second = null , |
||
Indicator | third = null , |
||
Indicator | fourth = null |
||
) |
Plots the value of each indicator on the chart
chart | The chart's name |
first | The first indicator to plot |
second | The second indicator to plot |
third | The third indicator to plot |
fourth | The fourth indicator to plot |
Definition at line 791 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
BarIndicator | first, | ||
BarIndicator | second = null , |
||
BarIndicator | third = null , |
||
BarIndicator | fourth = null |
||
) |
Plots the value of each indicator on the chart
chart | The chart's name |
first | The first indicator to plot |
second | The second indicator to plot |
third | The third indicator to plot |
fourth | The fourth indicator to plot |
Definition at line 806 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.Plot | ( | string | chart, |
TradeBarIndicator | first, | ||
TradeBarIndicator | second = null , |
||
TradeBarIndicator | third = null , |
||
TradeBarIndicator | fourth = null |
||
) |
Plots the value of each indicator on the chart
chart | The chart's name |
first | The first indicator to plot |
second | The second indicator to plot |
third | The third indicator to plot |
fourth | The fourth indicator to plot |
Definition at line 821 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.PlotIndicator | ( | string | chart, |
PyObject | first, | ||
PyObject | second = null , |
||
PyObject | third = null , |
||
PyObject | fourth = null |
||
) |
Automatically plots each indicator when a new value is available
Definition at line 831 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.PlotIndicator | ( | string | chart, |
bool | waitForReady, | ||
PyObject | first, | ||
PyObject | second = null , |
||
PyObject | third = null , |
||
PyObject | fourth = null |
||
) |
Automatically plots each indicator when a new value is available
Definition at line 842 of file QCAlgorithm.Python.cs.
FilteredIdentity QuantConnect.Algorithm.QCAlgorithm.FilteredIdentity | ( | Symbol | symbol, |
PyObject | selector = null , |
||
PyObject | filter = null , |
||
string | fieldName = null |
||
) |
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The symbol whose values we want as an indicator |
selector | Selects a value from the BaseData, if null defaults to the .Value property (x => x.Value) |
filter | Filters the IBaseData send into the indicator, if null defaults to true (x => true) which means no filter |
fieldName | The name of the field being selected |
Definition at line 858 of file QCAlgorithm.Python.cs.
FilteredIdentity QuantConnect.Algorithm.QCAlgorithm.FilteredIdentity | ( | Symbol | symbol, |
Resolution | resolution, | ||
PyObject | selector = null , |
||
PyObject | filter = null , |
||
string | fieldName = null |
||
) |
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The symbol whose values we want as an indicator |
resolution | The desired resolution of the data |
selector | Selects a value from the BaseData, if null defaults to the .Value property (x => x.Value) |
filter | Filters the IBaseData send into the indicator, if null defaults to true (x => true) which means no filter |
fieldName | The name of the field being selected |
Definition at line 875 of file QCAlgorithm.Python.cs.
FilteredIdentity QuantConnect.Algorithm.QCAlgorithm.FilteredIdentity | ( | Symbol | symbol, |
TimeSpan | resolution, | ||
PyObject | selector = null , |
||
PyObject | filter = null , |
||
string | fieldName = null |
||
) |
Creates a new FilteredIdentity indicator for the symbol The indicator will be automatically updated on the symbol's subscription resolution
symbol | The symbol whose values we want as an indicator |
resolution | The desired resolution of the data |
selector | Selects a value from the BaseData, if null defaults to the .Value property (x => x.Value) |
filter | Filters the IBaseData send into the indicator, if null defaults to true (x => true) which means no filter |
fieldName | The name of the field being selected |
Definition at line 896 of file QCAlgorithm.Python.cs.
PyObject QuantConnect.Algorithm.QCAlgorithm.History | ( | PyObject | tickers, |
int | periods, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null , |
||
bool | flatten = false |
||
) |
Gets the historical data for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
tickers | The symbols to retrieve historical data for |
periods | The number of bars to request |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 | 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. |
Definition at line 925 of file QCAlgorithm.Python.cs.
PyObject QuantConnect.Algorithm.QCAlgorithm.History | ( | PyObject | tickers, |
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null , |
||
bool | flatten = false |
||
) |
Gets the historical data for the specified symbols over the requested span. The symbols must exist in the Securities collection.
tickers | The symbols to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 | 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. |
Definition at line 972 of file QCAlgorithm.Python.cs.
PyObject QuantConnect.Algorithm.QCAlgorithm.History | ( | PyObject | tickers, |
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null , |
||
bool | flatten = false |
||
) |
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection.
tickers | The symbols to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 | 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. |
Definition at line 999 of file QCAlgorithm.Python.cs.
PyObject QuantConnect.Algorithm.QCAlgorithm.History | ( | PyObject | type, |
PyObject | tickers, | ||
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null , |
||
bool | flatten = false |
||
) |
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection.
type | The data type of the symbols |
tickers | The symbols to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 | 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. |
Definition at line 1047 of file QCAlgorithm.Python.cs.
PyObject QuantConnect.Algorithm.QCAlgorithm.History | ( | PyObject | type, |
PyObject | tickers, | ||
int | periods, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null , |
||
bool | flatten = false |
||
) |
Gets the historical data for the specified symbols. The exact number of bars will be returned for each symbol. This may result in some data start earlier/later than others due to when various exchanges are open. The symbols must exist in the Securities collection.
type | The data type of the symbols |
tickers | The symbols to retrieve historical data for |
periods | The number of bars to request |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 | 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. |
Definition at line 1079 of file QCAlgorithm.Python.cs.
PyObject QuantConnect.Algorithm.QCAlgorithm.History | ( | PyObject | type, |
PyObject | tickers, | ||
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null , |
||
bool | flatten = false |
||
) |
Gets the historical data for the specified symbols over the requested span. The symbols must exist in the Securities collection.
type | The data type of the symbols |
tickers | The symbols to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 | 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. |
Definition at line 1113 of file QCAlgorithm.Python.cs.
PyObject QuantConnect.Algorithm.QCAlgorithm.History | ( | PyObject | type, |
Symbol | symbol, | ||
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null , |
||
bool | flatten = false |
||
) |
Gets the historical data for the specified symbols between the specified dates. The symbols must exist in the Securities collection.
type | The data type of the symbols |
symbol | The symbol to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 | 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. |
Definition at line 1141 of file QCAlgorithm.Python.cs.
PyObject QuantConnect.Algorithm.QCAlgorithm.History | ( | PyObject | type, |
Symbol | symbol, | ||
int | periods, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null , |
||
bool | flatten = false |
||
) |
Gets the historical data for the specified symbols. The exact number of bars will be returned for each symbol. This may result in some data start earlier/later than others due to when various exchanges are open. The symbols must exist in the Securities collection.
type | The data type of the symbols |
symbol | The symbol to retrieve historical data for |
periods | The number of bars to request |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 | 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. |
Definition at line 1204 of file QCAlgorithm.Python.cs.
PyObject QuantConnect.Algorithm.QCAlgorithm.History | ( | PyObject | type, |
Symbol | symbol, | ||
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null , |
||
bool | flatten = false |
||
) |
Gets the historical data for the specified symbols over the requested span. The symbols must exist in the Securities collection.
type | The data type of the symbols |
symbol | The symbol to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
fillForward | True to fill forward missing data, false otherwise |
extendedMarketHours | True to include extended market hours data, false otherwise |
dataMappingMode | The contract mapping mode to use for the security history request |
dataNormalizationMode | The price scaling mode to use for the securities history |
contractDepthOffset | 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 | 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. |
Definition at line 1239 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBenchmark | ( | PyObject | benchmark | ) |
Sets the specified function as the benchmark, this function provides the value of the benchmark at each date/time requested
benchmark | The benchmark producing function |
Definition at line 1255 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBrokerageModel | ( | PyObject | model | ) |
Sets the brokerage to emulate in backtesting or paper trading. This can be used to set a custom brokerage model.
model | The brokerage model to use |
Definition at line 1275 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetBrokerageMessageHandler | ( | PyObject | handler | ) |
Sets the implementation used to handle messages from the brokerage. The default implementation will forward messages to debug or error and when a BrokerageMessageType.Error occurs, the algorithm is stopped.
handler | The message handler to use |
Definition at line 1295 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetRiskFreeInterestRateModel | ( | PyObject | model | ) |
Sets the risk free interest rate model to be used in the algorithm
model | The risk free interest rate model to use |
Definition at line 1310 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetSecurityInitializer | ( | PyObject | securityInitializer | ) |
Sets the security initializer function, used to initialize/configure securities after creation
securityInitializer | The security initializer function or class |
Definition at line 1321 of file QCAlgorithm.Python.cs.
string QuantConnect.Algorithm.QCAlgorithm.Download | ( | string | address, |
PyObject | headers | ||
) |
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI.
address | A string containing the URI to download |
headers | Defines header values to add to the request |
string QuantConnect.Algorithm.QCAlgorithm.Download | ( | string | address, |
PyObject | headers, | ||
string | userName, | ||
string | password | ||
) |
Downloads the requested resource as a string. The resource to download is specified as a string containing the URI.
address | A string containing the URI to download |
headers | Defines header values to add to the request |
userName | The user name associated with the credentials |
password | The password for the user name associated with the credentials |
Definition at line 1355 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.Debug | ( | PyObject | message | ) |
Send a debug message to the web console:
message | Message to send to debug console |
Definition at line 1391 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.Error | ( | PyObject | message | ) |
Send a string error message to the Console.
message | Message to display in errors grid |
Definition at line 1403 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.Log | ( | PyObject | message | ) |
Added another method for logging if user guessed.
message | String message to log. |
Definition at line 1415 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.Quit | ( | PyObject | message | ) |
Terminate the algorithm after processing the current event handler.
message | Exit message to display on quitting |
Definition at line 1425 of file QCAlgorithm.Python.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
Resolution | period, | ||
PyObject | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
handler | Data handler receives new consolidated data when generated |
Definition at line 1438 of file QCAlgorithm.Python.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
Resolution | period, | ||
TickType? | tickType, | ||
PyObject | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
tickType | The tick type of subscription used as data source for consolidator. Specify null to use first subscription found. |
handler | Data handler receives new consolidated data when generated |
Definition at line 1452 of file QCAlgorithm.Python.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
TimeSpan | period, | ||
PyObject | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
handler | Data handler receives new consolidated data when generated |
Definition at line 1478 of file QCAlgorithm.Python.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
TimeSpan | period, | ||
TickType? | tickType, | ||
PyObject | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
period | The consolidation period |
tickType | The tick type of subscription used as data source for consolidator. Specify null to use first subscription found. |
handler | Data handler receives new consolidated data when generated |
Definition at line 1492 of file QCAlgorithm.Python.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
Func< DateTime, CalendarInfo > | calendar, | ||
PyObject | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
calendar | The consolidation calendar |
handler | Data handler receives new consolidated data when generated |
Definition at line 1518 of file QCAlgorithm.Python.cs.
ScheduledEvent QuantConnect.Algorithm.QCAlgorithm.Train | ( | PyObject | trainingCode | ) |
Schedules the provided training code to execute immediately
trainingCode | The training code to be invoked |
Definition at line 1529 of file QCAlgorithm.Python.cs.
ScheduledEvent QuantConnect.Algorithm.QCAlgorithm.Train | ( | IDateRule | dateRule, |
ITimeRule | timeRule, | ||
PyObject | trainingCode | ||
) |
Schedules the training code to run using the specified date and time rules
dateRule | Specifies what dates the event should run |
timeRule | Specifies the times on those dates the event should run |
trainingCode | The training code to be invoked |
Definition at line 1542 of file QCAlgorithm.Python.cs.
IDataConsolidator QuantConnect.Algorithm.QCAlgorithm.Consolidate | ( | Symbol | symbol, |
Func< DateTime, CalendarInfo > | calendar, | ||
TickType? | tickType, | ||
PyObject | handler | ||
) |
Registers the handler to receive consolidated data for the specified symbol
symbol | The symbol who's data is to be consolidated |
calendar | The consolidation calendar |
tickType | The tick type of subscription used as data source for consolidator. Specify null to use first subscription found. |
handler | Data handler receives new consolidated data when generated |
Definition at line 1556 of file QCAlgorithm.Python.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | PyObject | indicator, |
PyObject | symbol, | ||
int | period, | ||
Resolution? | resolution = null , |
||
PyObject | selector = null |
||
) |
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbol | The symbol or symbols to retrieve historical data for |
period | The number of bars to request |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1584 of file QCAlgorithm.Python.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | PyObject | indicator, |
PyObject | symbol, | ||
TimeSpan | span, | ||
Resolution? | resolution = null , |
||
PyObject | selector = null |
||
) |
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbol | The symbol or symbols to retrieve historical data for |
span | The span over which to retrieve recent historical data |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1612 of file QCAlgorithm.Python.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | PyObject | indicator, |
PyObject | symbol, | ||
DateTime | start, | ||
DateTime | end, | ||
Resolution? | resolution = null , |
||
PyObject | selector = null |
||
) |
Gets the historical data of an indicator for the specified symbol. The exact number of bars will be returned. The symbol must exist in the Securities collection.
indicator | The target indicator |
symbol | The symbol or symbols to retrieve historical data for |
start | The start time in the algorithm's time zone |
end | The end time in the algorithm's time zone |
resolution | The resolution to request |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1628 of file QCAlgorithm.Python.cs.
IndicatorHistory QuantConnect.Algorithm.QCAlgorithm.IndicatorHistory | ( | PyObject | indicator, |
IEnumerable< Slice > | history, | ||
PyObject | selector = null |
||
) |
Gets the historical data of an indicator and convert it into pandas.DataFrame
indicator | The target indicator |
history | Historical data used to calculate the indicator |
selector | Selects a value from the BaseData to send into the indicator, if null defaults to the Value property of BaseData (x => x.Value) |
Definition at line 1653 of file QCAlgorithm.Python.cs.
List<OrderTicket> QuantConnect.Algorithm.QCAlgorithm.Liquidate | ( | PyObject | symbols, |
bool | asynchronous = false , |
||
string | tag = "Liquidated" , |
||
IOrderProperties | orderProperties = null |
||
) |
Liquidate your portfolio holdings
symbols | List of symbols to liquidate in Python |
asynchronous | Flag to indicate if the symbols should be liquidated asynchronously |
tag | Custom tag to know who is calling this |
orderProperties | Order properties to use |
Definition at line 1678 of file QCAlgorithm.Python.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddCommand | ( | PyObject | type | ) |
Register a command type to be used
type | The command type |
Definition at line 1687 of file QCAlgorithm.Python.cs.
OptionChains QuantConnect.Algorithm.QCAlgorithm.OptionChains | ( | PyObject | symbols, |
bool | flatten = false |
||
) |
Get the option chains for the specified symbols at the current time (Time)
symbols | The symbols for which the option chain is asked for. It can be either the canonical options or the underlying symbols. |
flatten | Whether to flatten the resulting data frame. See History(PyObject, int, Resolution?, bool?, bool?, DataMappingMode?, DataNormalizationMode?, int?, bool) |
Definition at line 1714 of file QCAlgorithm.Python.cs.
string QuantConnect.Algorithm.QCAlgorithm.Link | ( | PyObject | command | ) |
Get an authenticated link to execute the given command instance
command | The target command |
Definition at line 1724 of file QCAlgorithm.Python.cs.
|
protected |
Converts an enumerable of Slice into a Python Pandas data frame
Definition at line 1811 of file QCAlgorithm.Python.cs.
|
protected |
Converts an enumerable of BaseData into a Python Pandas data frame
T | : | IBaseData |
Definition at line 1820 of file QCAlgorithm.Python.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Buy | ( | Symbol | symbol, |
int | quantity | ||
) |
Buy Stock (Alias of Order)
symbol | string Symbol of the asset to trade |
quantity | int Quantity of the asset to trade |
Definition at line 51 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Buy | ( | Symbol | symbol, |
double | quantity | ||
) |
Buy Stock (Alias of Order)
symbol | string Symbol of the asset to trade |
quantity | double Quantity of the asset to trade |
Definition at line 64 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Buy | ( | Symbol | symbol, |
decimal | quantity | ||
) |
Buy Stock (Alias of Order)
symbol | string Symbol of the asset to trade |
quantity | decimal Quantity of the asset to trade |
Definition at line 77 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Buy | ( | Symbol | symbol, |
float | quantity | ||
) |
Buy Stock (Alias of Order)
symbol | string Symbol of the asset to trade |
quantity | float Quantity of the asset to trade |
Definition at line 90 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Sell | ( | Symbol | symbol, |
int | quantity | ||
) |
Sell stock (alias of Order)
symbol | string Symbol of the asset to trade |
quantity | int Quantity of the asset to trade |
Definition at line 104 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Sell | ( | Symbol | symbol, |
double | quantity | ||
) |
Sell stock (alias of Order)
symbol | String symbol to sell |
quantity | Quantity to order |
Definition at line 116 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Sell | ( | Symbol | symbol, |
float | quantity | ||
) |
Sell stock (alias of Order)
symbol | String symbol |
quantity | Quantity to sell |
Definition at line 128 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Sell | ( | Symbol | symbol, |
decimal | quantity | ||
) |
Sell stock (alias of Order)
symbol | String symbol to sell |
quantity | Quantity to sell |
Definition at line 140 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Order | ( | Symbol | symbol, |
double | quantity | ||
) |
Issue an order/trade for asset: Alias wrapper for Order(string, int);
symbol | Symbol to order |
quantity | Quantity to order |
Definition at line 153 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Order | ( | Symbol | symbol, |
int | quantity | ||
) |
Issue an order/trade for asset
symbol | Symbol to order |
quantity | Quantity to order |
Definition at line 165 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Order | ( | Symbol | symbol, |
decimal | quantity | ||
) |
Issue an order/trade for asset
symbol | Symbol to order |
quantity | Quantity to order |
Definition at line 177 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Order | ( | Symbol | symbol, |
decimal | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Wrapper for market order method: submit a new order for quantity of symbol using type order.
symbol | Symbol of the MarketType Required. |
quantity | Number of shares to request. |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 193 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOrder | ( | Symbol | symbol, |
int | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market order implementation: Send a market order and wait for it to be filled.
symbol | Symbol of the MarketType Required. |
quantity | Number of shares to request. |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 208 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOrder | ( | Symbol | symbol, |
double | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market order implementation: Send a market order and wait for it to be filled.
symbol | Symbol of the MarketType Required. |
quantity | Number of shares to request. |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 223 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOrder | ( | Symbol | symbol, |
decimal | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market order implementation: Send a market order and wait for it to be filled.
symbol | Symbol of the MarketType Required. |
quantity | Number of shares to request. |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 238 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOrder | ( | Security | security, |
decimal | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market order implementation: Send a market order and wait for it to be filled.
security | Symbol of the MarketType Required. |
quantity | Number of shares to request. |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 254 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOnOpenOrder | ( | Symbol | symbol, |
double | quantity, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market on open order implementation: Send a market order when the exchange opens
symbol | The symbol to be ordered |
quantity | The number of shares to required |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 296 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOnOpenOrder | ( | Symbol | symbol, |
int | quantity, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market on open order implementation: Send a market order when the exchange opens
symbol | The symbol to be ordered |
quantity | The number of shares to required |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 310 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOnOpenOrder | ( | Symbol | symbol, |
decimal | quantity, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market on open order implementation: Send a market order when the exchange opens
symbol | The symbol to be ordered |
quantity | The number of shares to required |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 324 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOnCloseOrder | ( | Symbol | symbol, |
int | quantity, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market on close order implementation: Send a market order when the exchange closes
symbol | The symbol to be ordered |
quantity | The number of shares to required |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 344 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOnCloseOrder | ( | Symbol | symbol, |
double | quantity, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market on close order implementation: Send a market order when the exchange closes
symbol | The symbol to be ordered |
quantity | The number of shares to required |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 358 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.MarketOnCloseOrder | ( | Symbol | symbol, |
decimal | quantity, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Market on close order implementation: Send a market order when the exchange closes
symbol | The symbol to be ordered |
quantity | The number of shares to required |
tag | Place a custom order property or tag (e.g. indicator data). |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 372 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.LimitOrder | ( | Symbol | symbol, |
int | quantity, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send a limit order to the transaction handler:
symbol | String symbol for the asset |
quantity | Quantity of shares for limit order |
limitPrice | Limit price to fill this order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 393 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.LimitOrder | ( | Symbol | symbol, |
double | quantity, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send a limit order to the transaction handler:
symbol | String symbol for the asset |
quantity | Quantity of shares for limit order |
limitPrice | Limit price to fill this order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 408 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.LimitOrder | ( | Symbol | symbol, |
decimal | quantity, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send a limit order to the transaction handler:
symbol | String symbol for the asset |
quantity | Quantity of shares for limit order |
limitPrice | Limit price to fill this order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 423 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.StopMarketOrder | ( | Symbol | symbol, |
int | quantity, | ||
decimal | stopPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Create a stop market order and return the newly created order id; or negative if the order is invalid
symbol | String symbol for the asset we're trading |
quantity | Quantity to be traded |
stopPrice | Price to fill the stop order |
tag | Optional string data tag for the order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 441 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.StopMarketOrder | ( | Symbol | symbol, |
double | quantity, | ||
decimal | stopPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Create a stop market order and return the newly created order id; or negative if the order is invalid
symbol | String symbol for the asset we're trading |
quantity | Quantity to be traded |
stopPrice | Price to fill the stop order |
tag | Optional string data tag for the order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 456 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.StopMarketOrder | ( | Symbol | symbol, |
decimal | quantity, | ||
decimal | stopPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Create a stop market order and return the newly created order id; or negative if the order is invalid
symbol | String symbol for the asset we're trading |
quantity | Quantity to be traded |
stopPrice | Price to fill the stop order |
tag | Optional string data tag for the order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 471 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.TrailingStopOrder | ( | Symbol | symbol, |
int | quantity, | ||
decimal | trailingAmount, | ||
bool | trailingAsPercentage, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
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 | Trading asset symbol |
quantity | Quantity to be traded |
trailingAmount | The trailing amount to be used to update the stop price |
trailingAsPercentage | Whether the trailingAmount is a percentage or an absolute currency value |
tag | Optional string data tag for the order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 491 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.TrailingStopOrder | ( | Symbol | symbol, |
double | quantity, | ||
decimal | trailingAmount, | ||
bool | trailingAsPercentage, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
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 | Trading asset symbol |
quantity | Quantity to be traded |
trailingAmount | The trailing amount to be used to update the stop price |
trailingAsPercentage | Whether the trailingAmount is a percentage or an absolute currency value |
tag | Optional string data tag for the order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 509 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.TrailingStopOrder | ( | Symbol | symbol, |
decimal | quantity, | ||
decimal | trailingAmount, | ||
bool | trailingAsPercentage, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
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 | Trading asset symbol |
quantity | Quantity to be traded |
trailingAmount | The trailing amount to be used to update the stop price |
trailingAsPercentage | Whether the trailingAmount is a percentage or an absolute currency value |
tag | Optional string data tag for the order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 527 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.TrailingStopOrder | ( | Symbol | symbol, |
int | quantity, | ||
decimal | stopPrice, | ||
decimal | trailingAmount, | ||
bool | trailingAsPercentage, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Create a trailing stop order and return the newly created order id; or negative if the order is invalid
symbol | Trading asset symbol |
quantity | Quantity to be traded |
stopPrice | Initial stop price at which the order should be triggered |
trailingAmount | The trailing amount to be used to update the stop price |
trailingAsPercentage | Whether the trailingAmount is a percentage or an absolute currency value |
tag | Optional string data tag for the order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 548 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.TrailingStopOrder | ( | Symbol | symbol, |
double | quantity, | ||
decimal | stopPrice, | ||
decimal | trailingAmount, | ||
bool | trailingAsPercentage, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Create a trailing stop order and return the newly created order id; or negative if the order is invalid
symbol | Trading asset symbol |
quantity | Quantity to be traded |
stopPrice | Initial stop price at which the order should be triggered |
trailingAmount | The trailing amount to be used to update the stop price |
trailingAsPercentage | Whether the trailingAmount is a percentage or an absolute currency value |
tag | Optional string data tag for the order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 566 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.TrailingStopOrder | ( | Symbol | symbol, |
decimal | quantity, | ||
decimal | stopPrice, | ||
decimal | trailingAmount, | ||
bool | trailingAsPercentage, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Create a trailing stop order and return the newly created order id; or negative if the order is invalid
symbol | Trading asset symbol |
quantity | Quantity to be traded |
stopPrice | Initial stop price at which the order should be triggered |
trailingAmount | The trailing amount to be used to update the stop price |
trailingAsPercentage | Whether the trailingAmount is a percentage or an absolute currency value |
tag | Optional string data tag for the order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 584 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.StopLimitOrder | ( | Symbol | symbol, |
int | quantity, | ||
decimal | stopPrice, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send a stop limit order to the transaction handler:
symbol | String symbol for the asset |
quantity | Quantity of shares for limit order |
stopPrice | Stop price for this order |
limitPrice | Limit price to fill this order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 612 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.StopLimitOrder | ( | Symbol | symbol, |
double | quantity, | ||
decimal | stopPrice, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send a stop limit order to the transaction handler:
symbol | String symbol for the asset |
quantity | Quantity of shares for limit order |
stopPrice | Stop price for this order |
limitPrice | Limit price to fill this order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 628 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.StopLimitOrder | ( | Symbol | symbol, |
decimal | quantity, | ||
decimal | stopPrice, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send a stop limit order to the transaction handler:
symbol | String symbol for the asset |
quantity | Quantity of shares for limit order |
stopPrice | Stop price for this order |
limitPrice | Limit price to fill this order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 644 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.LimitIfTouchedOrder | ( | Symbol | symbol, |
int | quantity, | ||
decimal | triggerPrice, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send a limit if touched order to the transaction handler:
symbol | String symbol for the asset |
quantity | Quantity of shares for limit order |
triggerPrice | Trigger price for this order |
limitPrice | Limit price to fill this order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 663 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.LimitIfTouchedOrder | ( | Symbol | symbol, |
double | quantity, | ||
decimal | triggerPrice, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send a limit if touched order to the transaction handler:
symbol | String symbol for the asset |
quantity | Quantity of shares for limit order |
triggerPrice | Trigger price for this order |
limitPrice | Limit price to fill this order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 679 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.LimitIfTouchedOrder | ( | Symbol | symbol, |
decimal | quantity, | ||
decimal | triggerPrice, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send a limit if touched order to the transaction handler:
symbol | String symbol for the asset |
quantity | Quantity of shares for limit order |
triggerPrice | Trigger price for this order |
limitPrice | Limit price to fill this order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 695 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.ExerciseOption | ( | Symbol | optionSymbol, |
int | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Send an exercise order to the transaction handler
optionSymbol | String symbol for the option position |
quantity | Quantity of options contracts |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 713 of file QCAlgorithm.Trading.cs.
IEnumerable<OrderTicket> QuantConnect.Algorithm.QCAlgorithm.Buy | ( | OptionStrategy | strategy, |
int | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Buy Option Strategy (Alias of Order)
strategy | Specification of the strategy to trade |
quantity | Quantity of the strategy to trade |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 752 of file QCAlgorithm.Trading.cs.
IEnumerable<OrderTicket> QuantConnect.Algorithm.QCAlgorithm.Sell | ( | OptionStrategy | strategy, |
int | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Sell Option Strategy (alias of Order)
strategy | Specification of the strategy to trade |
quantity | Quantity of the strategy to trade |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 767 of file QCAlgorithm.Trading.cs.
IEnumerable<OrderTicket> QuantConnect.Algorithm.QCAlgorithm.Order | ( | OptionStrategy | strategy, |
int | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Issue an order/trade for buying/selling an option strategy
strategy | Specification of the strategy to trade |
quantity | Quantity of the strategy to trade |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 782 of file QCAlgorithm.Trading.cs.
List<OrderTicket> QuantConnect.Algorithm.QCAlgorithm.ComboMarketOrder | ( | List< Leg > | legs, |
int | quantity, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Issue a combo market order/trade for multiple assets
legs | The list of legs the order consists of |
quantity | The total quantity for the order |
asynchronous | Send the order asynchronously (false). Otherwise we'll block until it fills |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 797 of file QCAlgorithm.Trading.cs.
List<OrderTicket> QuantConnect.Algorithm.QCAlgorithm.ComboLegLimitOrder | ( | List< Leg > | legs, |
int | quantity, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Issue a combo leg limit order/trade for multiple assets, each having its own limit price.
legs | The list of legs the order consists of |
quantity | The total quantity for the order |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
ArgumentException | If not every leg has a defined limit price |
Definition at line 812 of file QCAlgorithm.Trading.cs.
List<OrderTicket> QuantConnect.Algorithm.QCAlgorithm.ComboLimitOrder | ( | List< Leg > | legs, |
int | quantity, | ||
decimal | limitPrice, | ||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
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 | The list of legs the order consists of |
quantity | The total quantity for the order |
limitPrice | The compound limit price to use for a ComboLimit order. This limit price will compared to the sum of the assets price in order to fill the order. |
tag | String tag for the order (optional) |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
ArgumentException | If the order type is neither ComboMarket, ComboLimit nor ComboLegLimit |
Definition at line 834 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.SubmitOrderRequest | ( | SubmitOrderRequest | request | ) |
Will submit an order request to the algorithm
request | The request to submit |
Will run order prechecks, which include making sure the algorithm is not warming up, security is added and has data among others
Definition at line 962 of file QCAlgorithm.Trading.cs.
List<OrderTicket> QuantConnect.Algorithm.QCAlgorithm.Liquidate | ( | Symbol | symbol = null , |
bool | asynchronous = false , |
||
string | tag = "Liquidated" , |
||
IOrderProperties | orderProperties = null |
||
) |
Liquidate your portfolio holdings
symbol | Specific asset to liquidate, defaults to all |
asynchronous | Flag to indicate if the symbols should be liquidated asynchronously |
tag | Custom tag to know who is calling this |
orderProperties | Order properties to use |
Definition at line 1208 of file QCAlgorithm.Trading.cs.
List<OrderTicket> QuantConnect.Algorithm.QCAlgorithm.Liquidate | ( | IEnumerable< Symbol > | symbols, |
bool | asynchronous = false , |
||
string | tag = "Liquidated" , |
||
IOrderProperties | orderProperties = null |
||
) |
Liquidate your portfolio holdings
symbols | List of symbols to liquidate, defaults to all |
asynchronous | Flag to indicate if the symbols should be liquidated asynchronously |
tag | Custom tag to know who is calling this |
orderProperties | Order properties to use |
Definition at line 1232 of file QCAlgorithm.Trading.cs.
List<int> QuantConnect.Algorithm.QCAlgorithm.Liquidate | ( | Symbol | symbolToLiquidate, |
string | tag | ||
) |
Liquidate all holdings and cancel open orders. Called at the end of day for tick-strategies.
symbolToLiquidate | Symbol we wish to liquidate |
tag | Custom tag to know who is calling this. |
Definition at line 1301 of file QCAlgorithm.Trading.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetMaximumOrders | ( | int | max | ) |
Maximum number of orders for the algorithm
max |
Definition at line 1311 of file QCAlgorithm.Trading.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetHoldings | ( | List< PortfolioTarget > | targets, |
bool | liquidateExistingHoldings = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Sets holdings for a collection of targets. The implementation will order the provided targets executing first those that reduce a position, freeing margin.
targets | The portfolio desired quantities as percentages |
liquidateExistingHoldings | True will liquidate existing holdings |
tag | Tag the order with a short string. |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 1330 of file QCAlgorithm.Trading.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetHoldings | ( | Symbol | symbol, |
double | percentage, | ||
bool | liquidateExistingHoldings = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Alias for SetHoldings to avoid the M-decimal errors.
symbol | string symbol we wish to hold |
percentage | double percentage of holdings desired |
liquidateExistingHoldings | liquidate existing holdings if necessary to hold this stock |
tag | Tag the order with a short string. |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 1357 of file QCAlgorithm.Trading.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetHoldings | ( | Symbol | symbol, |
float | percentage, | ||
bool | liquidateExistingHoldings = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Alias for SetHoldings to avoid the M-decimal errors.
symbol | string symbol we wish to hold |
percentage | float percentage of holdings desired |
liquidateExistingHoldings | bool liquidate existing holdings if necessary to hold this stock |
tag | Tag the order with a short string. |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 1372 of file QCAlgorithm.Trading.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetHoldings | ( | Symbol | symbol, |
int | percentage, | ||
bool | liquidateExistingHoldings = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Alias for SetHoldings to avoid the M-decimal errors.
symbol | string symbol we wish to hold |
percentage | float percentage of holdings desired |
liquidateExistingHoldings | bool liquidate existing holdings if necessary to hold this stock |
tag | Tag the order with a short string. |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 1387 of file QCAlgorithm.Trading.cs.
void QuantConnect.Algorithm.QCAlgorithm.SetHoldings | ( | Symbol | symbol, |
decimal | percentage, | ||
bool | liquidateExistingHoldings = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Automatically place a market order which will set the holdings to between 100% or -100% of PORTFOLIO VALUE. E.g. SetHoldings("AAPL", 0.1); SetHoldings("IBM", -0.2); -> Sets portfolio as long 10% APPL and short 20% IBM E.g. SetHoldings("AAPL", 2); -> Sets apple to 2x leveraged with all our cash. If the market is closed, place a market on open order.
symbol | Symbol indexer |
percentage | decimal fraction of portfolio to set stock |
liquidateExistingHoldings | bool flag to clean all existing holdings before setting new faction. |
tag | Tag the order with a short string. |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 1405 of file QCAlgorithm.Trading.cs.
decimal QuantConnect.Algorithm.QCAlgorithm.CalculateOrderQuantity | ( | Symbol | symbol, |
double | target | ||
) |
Calculate the order quantity to achieve target-percent holdings.
symbol | Security object we're asking for |
target | Target percentage holdings |
Definition at line 1479 of file QCAlgorithm.Trading.cs.
decimal QuantConnect.Algorithm.QCAlgorithm.CalculateOrderQuantity | ( | Symbol | symbol, |
decimal | target | ||
) |
Calculate the order quantity to achieve target-percent holdings.
symbol | Security object we're asking for |
target | Target percentage holdings, this is an unleveraged value, so if you have 2x leverage and request 100% holdings, it will utilize half of the available margin |
Definition at line 1493 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Order | ( | Symbol | symbol, |
int | quantity, | ||
OrderType | type, | ||
bool | asynchronous = false , |
||
string | tag = "" , |
||
IOrderProperties | orderProperties = null |
||
) |
Obsolete implementation of Order method accepting a OrderType. This was deprecated since it was impossible to generate other orders via this method. Any calls to this method will always default to a Market Order.
symbol | Symbol we want to purchase |
quantity | Quantity to buy, + is long, - short. |
type | Order Type |
asynchronous | Don't wait for the response, just submit order and move on. |
tag | Custom data for this order |
orderProperties | The order properties to use. Defaults to DefaultOrderProperties |
Definition at line 1517 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Order | ( | Symbol | symbol, |
decimal | quantity, | ||
OrderType | type | ||
) |
Obsolete method for placing orders.
symbol | Symbol we want to order |
quantity | The quantity to order |
type | The order type |
Definition at line 1531 of file QCAlgorithm.Trading.cs.
OrderTicket QuantConnect.Algorithm.QCAlgorithm.Order | ( | Symbol | symbol, |
int | quantity, | ||
OrderType | type | ||
) |
Obsolete method for placing orders.
symbol | Symbol we want to order |
quantity | The quantity to order |
type | The order type |
Definition at line 1545 of file QCAlgorithm.Trading.cs.
bool QuantConnect.Algorithm.QCAlgorithm.IsMarketOpen | ( | Symbol | symbol | ) |
Determines if the exchange for the specified symbol is open at the current time.
symbol | The symbol |
Definition at line 1557 of file QCAlgorithm.Trading.cs.
void QuantConnect.Algorithm.QCAlgorithm.OnEndOfTimeStep | ( | ) |
Invoked at the end of every time step. This allows the algorithm to process events before advancing to the next time step.
Definition at line 66 of file QCAlgorithm.Universe.cs.
Adds the universe to the algorithm
universe | The universe to be added |
Definition at line 210 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | Func< IEnumerable< BaseData >, IEnumerable< Symbol >> | selector | ) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings
T | The data type |
selector | Function delegate that performs selection on the universe data |
Definition at line 231 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | Func< IEnumerable< BaseData >, IEnumerable< string >> | selector | ) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings
T | The data type |
selector | Function delegate that performs selection on the universe data |
Definition at line 244 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name, |
Func< IEnumerable< BaseData >, IEnumerable< Symbol >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings
T | The data type |
name | A unique name for this universe |
selector | Function delegate that performs selection on the universe data |
Definition at line 258 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name, |
Func< IEnumerable< BaseData >, IEnumerable< string >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, Market.USA, and UniverseSettings
T | The data type |
name | A unique name for this universe |
selector | Function delegate that performs selection on the universe data |
Definition at line 272 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name, |
UniverseSettings | universeSettings, | ||
Func< IEnumerable< BaseData >, IEnumerable< Symbol >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, and Market.USA
T | The data type |
name | A unique name for this universe |
universeSettings | The settings used for securities added by this universe |
selector | Function delegate that performs selection on the universe data |
Definition at line 287 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name, |
UniverseSettings | universeSettings, | ||
Func< IEnumerable< BaseData >, IEnumerable< string >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Resolution.Daily, and Market.USA
T | The data type |
name | A unique name for this universe |
universeSettings | The settings used for securities added by this universe |
selector | Function delegate that performs selection on the universe data |
Definition at line 302 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name, |
Resolution | resolution, | ||
Func< IEnumerable< BaseData >, IEnumerable< Symbol >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Market.USA and UniverseSettings
T | The data type |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
selector | Function delegate that performs selection on the universe data |
Definition at line 317 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name, |
Resolution | resolution, | ||
Func< IEnumerable< BaseData >, IEnumerable< string >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, Market.USA and UniverseSettings
T | The data type |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
selector | Function delegate that performs selection on the universe data |
Definition at line 332 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name, |
Resolution | resolution, | ||
UniverseSettings | universeSettings, | ||
Func< IEnumerable< BaseData >, IEnumerable< Symbol >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, and Market.USA
T | The data type |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
universeSettings | The settings used for securities added by this universe |
selector | Function delegate that performs selection on the universe data |
Definition at line 348 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name, |
Resolution | resolution, | ||
UniverseSettings | universeSettings, | ||
Func< IEnumerable< BaseData >, IEnumerable< string >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property. This universe will use the defaults of SecurityType.Equity, and Market.USA
T | The data type |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
universeSettings | The settings used for securities added by this universe |
selector | Function delegate that performs selection on the universe data |
Definition at line 364 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name, |
Resolution | resolution, | ||
string | market, | ||
Func< IEnumerable< BaseData >, IEnumerable< Symbol >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property.
T | The data type |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
market | The market for selected symbols |
selector | Function delegate that performs selection on the universe data |
Definition at line 379 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | SecurityType | securityType, |
string | name, | ||
Resolution | resolution, | ||
string | market, | ||
Func< IEnumerable< BaseData >, IEnumerable< string >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This will use the default universe settings specified via the UniverseSettings property.
T | The data type |
securityType | The security type the universe produces |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
market | The market for selected symbols |
selector | Function delegate that performs selection on the universe data |
Definition at line 395 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | SecurityType | securityType, |
string | name, | ||
Resolution | resolution, | ||
string | market, | ||
UniverseSettings | universeSettings, | ||
Func< IEnumerable< BaseData >, IEnumerable< string >> | selector | ||
) |
Creates a new universe and adds it to the algorithm
T | The data type |
securityType | The security type the universe produces |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
market | The market for selected symbols |
universeSettings | The subscription settings to use for newly created subscriptions |
selector | Function delegate that performs selection on the universe data |
Definition at line 411 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse< T > | ( | string | name = null , |
Resolution? | resolution = null , |
||
string | market = null , |
||
UniverseSettings | universeSettings = null , |
||
Func< IEnumerable< BaseData >, IEnumerable< Symbol >> | selector = null |
||
) |
Creates a new universe and adds it to the algorithm
T | The data type |
name | A unique name for this universe |
resolution | The expected resolution of the universe data |
market | The market for selected symbols |
universeSettings | The subscription settings to use for newly created subscriptions |
selector | Function delegate that performs selection on the universe data |
Definition at line 426 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | Func< IEnumerable< Fundamental >, IEnumerable< Symbol >> | selector | ) |
Creates a new universe and adds it to the algorithm. This is for coarse fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork)
selector | Defines an initial coarse selection |
Definition at line 438 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | IDateRule | dateRule, |
Func< IEnumerable< Fundamental >, IEnumerable< Symbol >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This is for coarse fundamental US Equity data and will be executed based on the provided IDateRule in the NewYork time zone (TimeZones.NewYork)
dateRule | Date rule that will be used to set the Data.UniverseSelection.UniverseSettings.Schedule |
selector | Defines an initial coarse selection |
Definition at line 450 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | Func< IEnumerable< CoarseFundamental >, IEnumerable< Symbol >> | coarseSelector, |
Func< IEnumerable< FineFundamental >, IEnumerable< Symbol >> | fineSelector | ||
) |
Creates a new universe and adds it to the algorithm. This is for coarse and fine fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork)
coarseSelector | Defines an initial coarse selection |
fineSelector | Defines a more detailed selection with access to more data |
Definition at line 464 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | Universe | universe, |
Func< IEnumerable< Fundamental >, IEnumerable< Symbol >> | fineSelector | ||
) |
Creates a new universe and adds it to the algorithm. This is for fine fundamental US Equity data and will be executed on day changes in the NewYork time zone (TimeZones.NewYork)
universe | The universe to be filtered with fine fundamental selection |
fineSelector | Defines a more detailed selection with access to more data |
Definition at line 478 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | string | name, |
Func< DateTime, IEnumerable< string >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This can be used to return a list of string symbols retrieved from anywhere and will loads those symbols under the US Equity market.
name | A unique name for this universe |
selector | Function delegate that accepts a DateTime and returns a collection of string symbols |
Definition at line 490 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | string | name, |
Resolution | resolution, | ||
Func< DateTime, IEnumerable< string >> | selector | ||
) |
Creates a new universe and adds it to the algorithm. This can be used to return a list of string symbols retrieved from anywhere and will loads those symbols under the US Equity market.
name | A unique name for this universe |
resolution | The resolution this universe should be triggered on |
selector | Function delegate that accepts a DateTime and returns a collection of string symbols |
Definition at line 503 of file QCAlgorithm.Universe.cs.
Universe QuantConnect.Algorithm.QCAlgorithm.AddUniverse | ( | SecurityType | securityType, |
string | name, | ||
Resolution | resolution, | ||
string | market, | ||
UniverseSettings | universeSettings, | ||
Func< DateTime, IEnumerable< string >> | selector | ||
) |
Creates a new user defined universe that will fire on the requested resolution during market hours.
securityType | The security type of the universe |
name | A unique name for this universe |
resolution | The resolution this universe should be triggered on |
market | The market of the universe |
universeSettings | The subscription settings used for securities added from this universe |
selector | Function delegate that accepts a DateTime and returns a collection of string symbols |
Definition at line 518 of file QCAlgorithm.Universe.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddUniverseOptions | ( | Symbol | underlyingSymbol, |
Func< OptionFilterUniverse, OptionFilterUniverse > | optionFilter | ||
) |
Adds a new universe that creates options of the security by monitoring any changes in the Universe the provided security is in. Additionally, a filter can be applied to the options generated when the universe of the security changes.
underlyingSymbol | Underlying Symbol to add as an option. For Futures, the option chain constructed will be per-contract, as long as a canonical Symbol is provided. |
optionFilter | User-defined filter used to select the options we want out of the option chain provided. |
InvalidOperationException | The underlying Symbol's universe is not found. |
Definition at line 536 of file QCAlgorithm.Universe.cs.
void QuantConnect.Algorithm.QCAlgorithm.AddUniverseOptions | ( | Universe | universe, |
Func< OptionFilterUniverse, OptionFilterUniverse > | optionFilter | ||
) |
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 | The universe we want to chain an option universe selection model too |
optionFilter | The option filter universe to use |
Definition at line 566 of file QCAlgorithm.Universe.cs.
|
staticprotected |
Maximum length of the name or tags of a backtest
Definition at line 92 of file QCAlgorithm.cs.
|
staticprotected |
Maximum number of tags allowed for a backtest
Definition at line 97 of file QCAlgorithm.cs.
IReadOnlyDictionary<Symbol, Security> QuantConnect.Algorithm.QCAlgorithm.ActiveSecurities => UniverseManager.ActiveSecurities |
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.
Definition at line 264 of file QCAlgorithm.cs.
string QuantConnect.Algorithm.QCAlgorithm.AccountCurrency => Portfolio.CashBook.AccountCurrency |
Gets the account currency
Definition at line 281 of file QCAlgorithm.cs.
ITimeKeeper QuantConnect.Algorithm.QCAlgorithm.TimeKeeper => _timeKeeper |
Gets the time keeper instance
Definition at line 286 of file QCAlgorithm.cs.
DateTime QuantConnect.Algorithm.QCAlgorithm.StartDate => _startDate |
Value of the user set start-date from the backtest.
This property is set with SetStartDate() and defaults to the earliest QuantConnect data available - Jan 1st 1998. It is ignored during live trading
Definition at line 599 of file QCAlgorithm.cs.
|
getprotected |
Gets the market hours database in use by this algorithm
Definition at line 130 of file QCAlgorithm.cs.
|
getprotected |
Gets the symbol properties database in use by this algorithm
Definition at line 135 of file QCAlgorithm.cs.
|
getset |
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.
Definition at line 254 of file QCAlgorithm.cs.
|
getset |
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
Definition at line 272 of file QCAlgorithm.cs.
|
getset |
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.
Definition at line 294 of file QCAlgorithm.cs.
|
get |
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
Definition at line 305 of file QCAlgorithm.cs.
|
getset |
The project id associated with this algorithm if any
Definition at line 313 of file QCAlgorithm.cs.
|
get |
Gets the brokerage model - used to model interactions with specific brokerages.
Definition at line 323 of file QCAlgorithm.cs.
|
get |
Gets the brokerage name.
Definition at line 348 of file QCAlgorithm.cs.
|
getset |
Gets the brokerage message handler used to decide what to do with each message sent from the brokerage
Definition at line 359 of file QCAlgorithm.cs.
|
get |
Gets the risk free interest rate model used to get the interest rates
Definition at line 369 of file QCAlgorithm.cs.
|
getset |
Notification Manager for Sending Live Runtime Notifications to users about important events.
Definition at line 379 of file QCAlgorithm.cs.
|
get |
Gets schedule manager for adding/removing scheduled events
Definition at line 389 of file QCAlgorithm.cs.
|
getset |
Gets or sets the current status of the algorithm
Definition at line 399 of file QCAlgorithm.cs.
|
get |
Gets an instance that is to be used to initialize newly created securities.
Definition at line 409 of file QCAlgorithm.cs.
|
get |
Gets the Trade Builder to generate trades from executions
Definition at line 419 of file QCAlgorithm.cs.
|
get |
Gets an instance to access the candlestick pattern helper methods
Definition at line 429 of file QCAlgorithm.cs.
|
get |
Gets the date rules helper object to make specifying dates for events easier
Definition at line 439 of file QCAlgorithm.cs.
|
get |
Gets the time rules helper object to make specifying times for events easier
Definition at line 448 of file QCAlgorithm.cs.
|
get |
Gets trading calendar populated with trading events
Definition at line 457 of file QCAlgorithm.cs.
|
get |
Gets the user settings for the algorithm
Definition at line 467 of file QCAlgorithm.cs.
|
get |
Gets the option chain provider, used to get the list of option contracts for an underlying symbol
Definition at line 479 of file QCAlgorithm.cs.
|
get |
Gets the future chain provider, used to get the list of future contracts for an underlying symbol
Definition at line 485 of file QCAlgorithm.cs.
|
getset |
Gets the default order properties
Definition at line 491 of file QCAlgorithm.cs.
|
getset |
Public name for the algorithm as automatically generated by the IDE. Intended for helping distinguish logs by noting the algorithm-id.
Definition at line 500 of file QCAlgorithm.cs.
|
getset |
A list of tags associated with the algorithm or the backtest, useful for categorization
Definition at line 524 of file QCAlgorithm.cs.
|
get |
Read-only value for current time frontier of the algorithm in terms of the TimeZone
During backtesting this is primarily sourced from the data feed. During live trading the time is updated from the system clock.
Definition at line 570 of file QCAlgorithm.cs.
|
get |
Current date/time in UTC.
Definition at line 579 of file QCAlgorithm.cs.
|
get |
Gets the time zone used for the Time property. The default value is TimeZones.NewYork
Definition at line 589 of file QCAlgorithm.cs.
|
get |
Value of the user set start-date from the backtest. Controls the period of the backtest.
This property is set with SetEndDate() and defaults to today. It is ignored during live trading.
Definition at line 608 of file QCAlgorithm.cs.
|
get |
Algorithm Id for this backtest or live algorithm.
A unique identifier for
Definition at line 621 of file QCAlgorithm.cs.
|
get |
Boolean property indicating the algorithm is currently running in live mode.
Intended for use where certain behaviors will be enabled while the algorithm is trading live: such as notification emails, or displaying runtime statistics.
Definition at line 634 of file QCAlgorithm.cs.
|
get |
Algorithm running mode.
Definition at line 645 of file QCAlgorithm.cs.
|
get |
Deployment target, either local or cloud.
Definition at line 656 of file QCAlgorithm.cs.
|
getset |
Storage for debugging messages before the event handler has passed control back to the Lean Engine.
Definition at line 669 of file QCAlgorithm.cs.
|
getset |
Storage for log messages before the event handlers have passed control back to the Lean Engine.
Definition at line 686 of file QCAlgorithm.cs.
|
getset |
Gets the run time error from the algorithm, or null if none was encountered.
Definition at line 701 of file QCAlgorithm.cs.
|
getset |
List of error messages generated by the user's code calling the "Error" function.
This method is best used within a try-catch bracket to handle any runtime errors from a user algorithm.
Definition at line 710 of file QCAlgorithm.cs.
|
get |
Returns the current Slice object
Definition at line 725 of file QCAlgorithm.cs.
|
get |
Gets the object store, used for persistence
Definition at line 732 of file QCAlgorithm.cs.
|
get |
The current statistics for the running algorithm.
Definition at line 739 of file QCAlgorithm.cs.
|
get |
Benchmark
Use Benchmark to override default symbol based benchmark, and create your own benchmark. For example a custom moving average benchmark
Definition at line 1469 of file QCAlgorithm.cs.
|
getset |
Enables additional logging of framework models including: All insights, portfolio targets, order events, and any risk management altered targets
Definition at line 43 of file QCAlgorithm.Framework.cs.
|
getset |
Gets or sets the universe selection model.
Definition at line 49 of file QCAlgorithm.Framework.cs.
|
getset |
Gets or sets the alpha model
Definition at line 55 of file QCAlgorithm.Framework.cs.
|
get |
Gets the insight manager
Definition at line 61 of file QCAlgorithm.Framework.cs.
|
getset |
Gets or sets the portfolio construction model
Definition at line 67 of file QCAlgorithm.Framework.cs.
|
getset |
Gets or sets the execution model
Definition at line 73 of file QCAlgorithm.Framework.cs.
|
getset |
Gets or sets the risk management model
Definition at line 79 of file QCAlgorithm.Framework.cs.
|
getset |
Gets or sets the history provider for the algorithm
Definition at line 40 of file QCAlgorithm.History.cs.
|
get |
Gets whether or not this algorithm is still warming up
Definition at line 50 of file QCAlgorithm.History.cs.
|
getset |
Gets whether or not WarmUpIndicator is allowed to warm up indicators
Definition at line 51 of file QCAlgorithm.Indicators.cs.
|
get |
Access to the runtime statistics property. User provided statistics.
RuntimeStatistics are displayed in the head banner in live trading
Definition at line 48 of file QCAlgorithm.Plotting.cs.
|
get |
PandasConverter for this Algorithm
Definition at line 46 of file QCAlgorithm.Python.cs.
|
getset |
Transaction Manager - Process transaction fills and order management.
Definition at line 41 of file QCAlgorithm.Trading.cs.
|
get |
Gets universe manager which holds universes keyed by their symbol
Definition at line 46 of file QCAlgorithm.Universe.cs.
|
get |
Gets the universe settings to be used when adding securities via universe selection
Definition at line 56 of file QCAlgorithm.Universe.cs.
|
get |
Gets a helper that provides pre-defined universe definitions, such as top dollar volume
Definition at line 200 of file QCAlgorithm.Universe.cs.
AlgorithmEvent<GeneratedInsightsCollection> QuantConnect.Algorithm.QCAlgorithm.InsightsGenerated |
Event fired when the algorithm generates insights
Definition at line 246 of file QCAlgorithm.cs.
AlgorithmEvent<string> QuantConnect.Algorithm.QCAlgorithm.NameUpdated |
Event fired algorithm's name is changed
Definition at line 556 of file QCAlgorithm.cs.
AlgorithmEvent<HashSet<string> > QuantConnect.Algorithm.QCAlgorithm.TagsUpdated |
Event fired when the tag collection is updated
Definition at line 562 of file QCAlgorithm.cs.