IBaseDataBar
QuantConnect.Data.Market.IBaseDataBar
Represents a type that is both a bar and base data
open
open: float
Opening price of the bar: Defined as the price at the start of the time period.
high
high: float
High price of the bar during the time period.
low
low: float
Low price of the bar during the time period.
close
close: float
Closing price of the bar. Defined as the price at Start Time + TimeSpan.
data_type
data_type: MarketDataType
Market Data Type of this data - does it come in individual price packets or is it grouped into OHLC.
time
time: datetime
Time keeper of data -- all data is timeseries based.
end_time
end_time: datetime
End time of data
value
value: float
All timeseries data is a time-value pair:
price
price: float
Alias of Value.
reader
reader(
config: SubscriptionDataConfig,
line: str,
date: datetime,
is_live_mode: bool,
) -> BaseData
Reader converts each line of the data source into BaseData objects. Each data type creates its own factory method, and returns a new instance of the object each time it is called. The returned object is assumed to be time stamped in the config.ExchangeTimeZone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
SubscriptionDataConfig
|
Subscription data config setup object |
required |
line
|
str
|
Line of the source document |
required |
date
|
datetime
|
Date of the requested data |
required |
is_live_mode
|
bool
|
true if we're in live mode, false for backtesting mode |
required |
Returns:
| Type | Description |
|---|---|
BaseData
|
Instance of the T:BaseData object generated by this line of the CSV. |
requires_mapping
requires_mapping() -> bool
Indicates if there is support for mapping
Returns:
| Type | Description |
|---|---|
bool
|
True indicates mapping should be used. |