Class HistoricalData
Represent access to historical data information and indicators control.
public class HistoricalData : IDisposable, IIndicatorsCollection, IIndicatorRefresher, IEnumerable<IHistoryItem>
Constructors
HistoricalData(HistoryRequestParameters)
Declaration
protected HistoricalData(HistoryRequestParameters historyRequestParameters)
Parameters
Fields
Declaration
protected readonly List<IHistoryItem> items
Field Value
Type |
Description |
List<TradingPlatform.BusinessLayer.IHistoryItem> |
|
Declaration
protected readonly object itemsLocker
Field Value
Type |
Description |
System.Object |
|
Properties
Gets HistoricalData aggregation
Declaration
public HistoryAggregation Aggregation { get; }
Property Value
Gets access to built-in indicators
Declaration
public BuiltInIndicators BuiltInIndicators { get; }
Property Value
Gets HistoricalData items amount
Declaration
public virtual int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Gets HistoricalData left time boundary
Declaration
public DateTime FromTime { get; }
Property Value
Type |
Description |
DateTime |
|
HistoryType
Gets HistoricalData history type
Declaration
public HistoryType HistoryType { get; }
Property Value
Type |
Description |
TradingPlatform.BusinessLayer.HistoryType |
|
Item[Int32, SeekOriginHistory]
Retrieves HistoricalData item by indexing offset and direction to find.
Declaration
public virtual IHistoryItem this[int offset, SeekOriginHistory origin = SeekOriginHistory.End] { get; }
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
|
TradingPlatform.BusinessLayer.SeekOriginHistory |
origin |
|
Property Value
Type |
Description |
TradingPlatform.BusinessLayer.IHistoryItem |
|
Declaration
protected virtual bool NeedSubscribe { get; }
Property Value
Type |
Description |
System.Boolean |
|
Gets HistoricalData Period
Declaration
public Period Period { get; }
Property Value
Gets HistoricalData symbol
Declaration
public Symbol Symbol { get; }
Property Value
Gets HistoricalData right time boundary
Declaration
public DateTime ToTime { get; }
Property Value
Type |
Description |
DateTime |
|
Methods
Creates indicator by it's name and if it successfully created adds it to the HistoricalData
Declaration
public Indicator AddIndicator(string indicatorName, params SettingItem[] settings)
Parameters
Type |
Name |
Description |
System.String |
indicatorName |
|
TradingPlatform.BusinessLayer.SettingItem[] |
settings |
|
Returns
Adds indicator to the HistoricalData
Declaration
public void AddIndicator(Indicator indicator)
Parameters
AddNewItem(IHistoryItem, Boolean, HistoryEventArgs)
Declaration
protected virtual void AddNewItem(IHistoryItem historyItem, bool updateIndicators = true, HistoryEventArgs e = null)
Parameters
Type |
Name |
Description |
TradingPlatform.BusinessLayer.IHistoryItem |
historyItem |
|
System.Boolean |
updateIndicators |
|
TradingPlatform.BusinessLayer.HistoryEventArgs |
e |
|
Declaration
public IVolumeAnalysisCalculationProgress CalculateVolumeProfile(VolumeAnalysisCalculationParameters volumeAnalysisCalculationParameters)
Parameters
Returns
Declaration
public IEnumerator GetEnumerator()
Returns
Type |
Description |
IEnumerator |
|
GetIndexByTime(Int64, SeekOriginHistory)
Gets index by time with counting on search direction
Declaration
public double GetIndexByTime(long time, SeekOriginHistory origin = SeekOriginHistory.End)
Parameters
Type |
Name |
Description |
System.Int64 |
time |
|
TradingPlatform.BusinessLayer.SeekOriginHistory |
origin |
|
Returns
Type |
Description |
System.Double |
|
Declaration
public string GetTimeToNextBar()
Returns
Type |
Description |
System.String |
|
Declaration
protected virtual void ProcessLast(Last last)
Parameters
Type |
Name |
Description |
Last |
last |
|
Declaration
protected virtual void ProcessMark(Mark mark)
Parameters
Type |
Name |
Description |
Mark |
mark |
|
Declaration
protected virtual void ProcessQuote(Quote quote)
Parameters
Type |
Name |
Description |
Quote |
quote |
|
Reloads entire HistoricalData
Declaration
Removes indicator from the HistoricalData
Declaration
public void RemoveIndicator(Indicator indicator)
Parameters
Declaration
protected virtual void SubscribeSymbol()
Declaration
protected void Symbol_NewLast(Symbol symbol, Last last)
Parameters
Declaration
protected virtual void UnSubscribeSymbol()
Events
HistoryItemUpdated
Will be triggered when current historical item changed or updated
Declaration
public event HistoryEventHandler HistoryItemUpdated
Event Type
Type |
Description |
TradingPlatform.BusinessLayer.HistoryEventHandler |
|
HistoryItemVolumeAnalysisUpdated
Will be triggered when volume analysis of current historical item changed or updated
Declaration
public event Action HistoryItemVolumeAnalysisUpdated
Event Type
NewHistoryItem
Will be triggered when new historical item created
Declaration
public event HistoryEventHandler NewHistoryItem
Event Type
Type |
Description |
TradingPlatform.BusinessLayer.HistoryEventHandler |
|
Implements
IEnumerable<>