A type capable of taking a chart and resampling using a linear interpolation strategy
More...
|
static ? decimal | Interpolate (decimal x0, decimal? y0, decimal x1, decimal? y1, decimal xTarget, decimal step) |
| Linear interpolation used for sampling More...
|
|
static T | GetIdentitySeries< T > (T sampled, T series, DateTime start, DateTime stop, bool truncateValues) |
| Gets the identity series, this is the series with no sampling applied. More...
|
|
|
TimeSpan | Step [get, set] |
| The desired sampling resolution More...
|
|
bool | SubSample = true [get, set] |
| True if sub sampling is enabled, if false only subsampling will happen More...
|
|
A type capable of taking a chart and resampling using a linear interpolation strategy
Definition at line 27 of file SeriesSampler.cs.
◆ SeriesSampler()
QuantConnect.SeriesSampler.SeriesSampler |
( |
TimeSpan |
resolution | ) |
|
Creates a new SeriesSampler to sample Series data on the specified resolution
- Parameters
-
resolution | The desired sampling resolution |
Definition at line 43 of file SeriesSampler.cs.
◆ Sample()
virtual BaseSeries QuantConnect.SeriesSampler.Sample |
( |
BaseSeries |
series, |
|
|
DateTime |
start, |
|
|
DateTime |
stop, |
|
|
bool |
truncateValues = false |
|
) |
| |
|
virtual |
Samples the given series
- Parameters
-
series | The series to be sampled |
start | The date to start sampling, if before start of data then start of data will be used |
stop | The date to stop sampling, if after stop of data, then stop of data will be used |
truncateValues | True will truncate values to integers |
- Returns
- The sampled series
Definition at line 56 of file SeriesSampler.cs.
◆ SampleCharts()
Dictionary<string, Chart> QuantConnect.SeriesSampler.SampleCharts |
( |
IDictionary< string, Chart > |
charts, |
|
|
DateTime |
start, |
|
|
DateTime |
stop |
|
) |
| |
Samples the given charts
- Parameters
-
charts | The charts to be sampled |
start | The date to start sampling |
stop | The date to stop sampling |
- Returns
- The sampled charts
Definition at line 88 of file SeriesSampler.cs.
◆ SampleChart()
Chart QuantConnect.SeriesSampler.SampleChart |
( |
Chart |
chart, |
|
|
DateTime |
start, |
|
|
DateTime |
stop |
|
) |
| |
Samples the given chart
- Parameters
-
chart | The chart to be sampled |
start | The date to start sampling |
stop | The date to stop sampling |
- Returns
- The sampled chart
Definition at line 105 of file SeriesSampler.cs.
◆ Interpolate()
static ? decimal QuantConnect.SeriesSampler.Interpolate |
( |
decimal |
x0, |
|
|
decimal? |
y0, |
|
|
decimal |
x1, |
|
|
decimal? |
y1, |
|
|
decimal |
xTarget, |
|
|
decimal |
step |
|
) |
| |
|
staticprotected |
◆ GetIdentitySeries< T >()
static T QuantConnect.SeriesSampler.GetIdentitySeries< T > |
( |
T |
sampled, |
|
|
T |
series, |
|
|
DateTime |
start, |
|
|
DateTime |
stop, |
|
|
bool |
truncateValues |
|
) |
| |
|
staticprotected |
Gets the identity series, this is the series with no sampling applied.
Definition at line 454 of file SeriesSampler.cs.
◆ Step
TimeSpan QuantConnect.SeriesSampler.Step |
|
getsetprotected |
◆ SubSample
bool QuantConnect.SeriesSampler.SubSample = true |
|
getset |
True if sub sampling is enabled, if false only subsampling will happen
Definition at line 37 of file SeriesSampler.cs.
The documentation for this class was generated from the following file: