Lean
$LEAN_TAG$
|
Helper class used to create new HistoryRequest More...
Public Member Functions | |
HistoryRequestFactory (IAlgorithm algorithm) | |
Creates a new instance More... | |
HistoryRequest | CreateHistoryRequest (SubscriptionDataConfig subscription, DateTime startAlgoTz, DateTime endAlgoTz, SecurityExchangeHours exchangeHours, Resolution? resolution, bool? fillForward=null, bool? extendedMarketHours=null, DataMappingMode? dataMappingMode=null, DataNormalizationMode? dataNormalizationMode=null, int? contractDepthOffset=null) |
Creates a new history request More... | |
DateTime | GetStartTimeAlgoTz (Symbol symbol, int periods, Resolution resolution, SecurityExchangeHours exchange, DateTimeZone dataTimeZone, Type dataType, bool? extendedMarketHours=null) |
Gets the start time required for the specified bar count in terms of the algorithm's time zone More... | |
DateTime | GetStartTimeAlgoTz (DateTime referenceUtcTime, Symbol symbol, int periods, Resolution resolution, SecurityExchangeHours exchange, DateTimeZone dataTimeZone, Type dataType, bool? extendedMarketHours=null) |
Gets the start time required for the specified bar count in terms of the algorithm's time zone More... | |
Helper class used to create new HistoryRequest
Definition at line 27 of file HistoryRequestFactory.cs.
QuantConnect.Data.HistoryRequestFactory.HistoryRequestFactory | ( | IAlgorithm | algorithm | ) |
Creates a new instance
algorithm | The algorithm instance to use |
Definition at line 35 of file HistoryRequestFactory.cs.
HistoryRequest QuantConnect.Data.HistoryRequestFactory.CreateHistoryRequest | ( | SubscriptionDataConfig | subscription, |
DateTime | startAlgoTz, | ||
DateTime | endAlgoTz, | ||
SecurityExchangeHours | exchangeHours, | ||
Resolution? | resolution, | ||
bool? | fillForward = null , |
||
bool? | extendedMarketHours = null , |
||
DataMappingMode? | dataMappingMode = null , |
||
DataNormalizationMode? | dataNormalizationMode = null , |
||
int? | contractDepthOffset = null |
||
) |
Creates a new history request
subscription | The config |
startAlgoTz | History request start time in algorithm time zone |
endAlgoTz | History request end time in algorithm time zone |
exchangeHours | Security exchange hours |
resolution | The resolution to use. If null will use SubscriptionDataConfig.Resolution |
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 55 of file HistoryRequestFactory.cs.
DateTime QuantConnect.Data.HistoryRequestFactory.GetStartTimeAlgoTz | ( | Symbol | symbol, |
int | periods, | ||
Resolution | resolution, | ||
SecurityExchangeHours | exchange, | ||
DateTimeZone | dataTimeZone, | ||
Type | dataType, | ||
bool? | extendedMarketHours = null |
||
) |
Gets the start time required for the specified bar count in terms of the algorithm's time zone
symbol | The symbol to select proper SubscriptionDataConfig config |
periods | The number of bars requested |
resolution | The length of each bar |
exchange | The exchange hours used for market open hours |
dataTimeZone | The time zone in which data are stored |
dataType | The data type to request |
extendedMarketHours | True to include extended market hours data, false otherwise. If not passed, the config will be used to determined whether to include extended market hours. |
Definition at line 131 of file HistoryRequestFactory.cs.
DateTime QuantConnect.Data.HistoryRequestFactory.GetStartTimeAlgoTz | ( | DateTime | referenceUtcTime, |
Symbol | symbol, | ||
int | periods, | ||
Resolution | resolution, | ||
SecurityExchangeHours | exchange, | ||
DateTimeZone | dataTimeZone, | ||
Type | dataType, | ||
bool? | extendedMarketHours = null |
||
) |
Gets the start time required for the specified bar count in terms of the algorithm's time zone
referenceUtcTime | The end time in utc |
symbol | The symbol to select proper SubscriptionDataConfig config |
periods | The number of bars requested |
resolution | The length of each bar |
exchange | The exchange hours used for market open hours |
dataTimeZone | The time zone in which data are stored |
dataType | The data type to request |
extendedMarketHours | True to include extended market hours data, false otherwise. If not passed, the config will be used to determined whether to include extended market hours. |
Definition at line 158 of file HistoryRequestFactory.cs.