Interface ISeries
- Namespace
- Balsam
- Assembly
- Balsam.Common.dll
Defines common methods and properties that all time series must implement.
public interface ISeries
- Extension Methods
Properties
Count
Gets the number of observations in the series.
int Count { get; }
Property Value
Dates
Gets the dates associated with the observations.
IEnumerable<DateTime> Dates { get; }
Property Value
FirstDate
Gets the first date on which there is valid data available (i.e on MaxBarsBack).
DateTime FirstDate { get; }
Property Value
Index
Gets the index of the current bar or -1 if Indexing property is Absolute.
int Index { get; }
Property Value
Indexing
Gets the indexing strategy. Absolute indexes from 0 to Count - 1. RelativeToCurrentBar operates as an offset to the current index.
IndexKind Indexing { get; }
Property Value
this[int]
Gets the current object according to the indexing strategy.
object this[int index] { get; }
Parameters
index
int
Property Value
LastDate
Gets the late date of the series.
DateTime LastDate { get; }
Property Value
MaxBarsBack
Gets/sets the number of bars needed to initialize a series to a valid state.
int MaxBarsBack { get; set; }
Property Value
Name
Gets/sets the name or description.
string Name { get; set; }
Property Value
Symbol
Gets/sets the symbol.
string Symbol { get; set; }
Property Value
Methods
Add(DateTime, object)
Adds a date/value observation to the series.
void Add(DateTime date, object value)
Parameters
Clear()
Clears the series.
void Clear()
GetValue(int)
Returns the value in a series at the specified index.
object GetValue(int index)
Parameters
index
int
Returns
Remove(DateTime)
Removes an observation at the specified date. Returns true if date found.
bool Remove(DateTime date)
Parameters
date
DateTime
Returns
Remove(int)
Removes an observation at the specified index.
void Remove(int index)
Parameters
index
int
SetIndex(DateTime)
Sets the index using the specified date.
int SetIndex(DateTime date)
Parameters
date
DateTime
Returns
SetIndex(int)
Sets the index to the specified value.
void SetIndex(int index)
Parameters
index
int
SetValue(int, object)
Sets the value in a series at the specified index.
void SetValue(int index, object value)
Parameters
Sync(IEnumerable<DateTime>)
ISeries Sync(IEnumerable<DateTime> dates)
Parameters
dates
IEnumerable<DateTime>