Click or drag to resize

BasePortfolioT Class

Abstract class for all portfolio indicators. Can store several values per serie.
Inheritance Hierarchy
SystemObject
  FinAnalysis.BaseHistoryMultipleDataQueueT
    FinAnalysis.BaseBasePortfolioT
      FinAnalysis.BaseBasePortfolioIndicatorT

Namespace:  FinAnalysis.Base
Assembly:  FinAnalysis.Base (in FinAnalysis.Base.dll) Version: 2.1.13-cc97e13414b71fde928e8f3a546ac1daf26f295f
Syntax
C#
public abstract class BasePortfolio<T> : HistoryMultipleDataQueue<T>
where T : new()

Type Parameters

T
Type of indicators value. Indicator stores result value for each serie. Note: Indicator history stores array of elements of this type. It can store several values per serie. Note: T must has default public constructor.

The BasePortfolioT type exposes the following members.

Properties
  NameDescription
Public propertyFirst
Get first(oldest) data element stored in container. Note: if there is not elements in queue it returns DefaltValue.
(Inherited from HistoryMultipleDataQueueT.)
Public propertyFirstDateTime
Get first(oldest) data element DateTime stored in container. Note: if there is not elements in queue it returns DefaltDateTime.
(Inherited from HistoryMultipleDataQueueT.)
Public propertyHistoryCapacity
Set or Get indicator's history capacity. Do not set capacity for indicator if you already add data to it. If indicators HistoryTimeManaged flag is set, this value equal to volume of buffers. If indicators HistoryTimeManaged flag is not set, than indicator store exact HistoryCapacity its values.
Public propertyHistoryCount
Count of indicators values in indicator history.
Public propertyHistoryTimeManaged
Indicates whether indicator safe it's history on time period or store specified values count.
Public propertyHistoryTimePeriod
Set or Get time period, how long indicator save it's value. Do not set history period for indicator if you already add data to it. If you specify indicators HistoryTimePeriod, then indicators HistoryTimeManaged flag will be set. Indicator try to store all of its values on specified HistoryTimePeriod.
Public propertyIndicatorNeedDateTime
Equal true if user have to specify DateTime in Add method.
Public propertyItemDateTime, Int32
Return historically latest element with smaller or equal DateTime. Note: do not try to use this method if you didn't specify DateTime to data elements.
(Inherited from HistoryMultipleDataQueueT.)
Public propertyItemInt32, Int32
Get data which was store "index" steps ago.
(Inherited from HistoryMultipleDataQueueT.)
Public propertyLast
Get last data element stored in container. Note: if there is not elements in queue it returns DefaltValue.
(Inherited from HistoryMultipleDataQueueT.)
Public propertyLastDateTime
Get last data element DateTime stored in container. Note: if there is not elements in queue it returns DefaltDateTime.
(Inherited from HistoryMultipleDataQueueT.)
Public propertyReady
Ready flag is set if and only if queue contain something.
(Overrides HistoryMultipleDataQueueTReady.)
Public propertyStable
Flag is set if and only if indicators values is stable.
Public propertyValidationStrategy
Indicate what we must do with invalid input values.
Public propertyValue
Returns value of indicator. For indicators which has more than one value, it returns a slice.
Top
Methods
  NameDescription
Public methodClone
Makes full copy of this instance.
(Overrides HistoryMultipleDataQueueTClone.)
Public methodCopyTo(Object)
Sets internal state to destination object.
(Overrides HistoryMultipleDataQueueTCopyTo(Object).)
Public methodCopyTo(Object, IL_Clone)
Gets internal state from source object.
(Overrides HistoryMultipleDataQueueTCopyTo(Object, IL_Clone).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetIndexByTime
Get offset index of element by element time. If there no element with such time, we return latest element with time smaller than specified. If we can't find valid index, we return -1.
(Inherited from HistoryMultipleDataQueueT.)
Public methodGetTimeByIndex
Return time associated with specified point.
(Inherited from HistoryMultipleDataQueueT.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsNormalValue
Equal true if specified value x, is normal double value. It useful for verifying input data.
Public methodSetOnPopDelegate
Set delegate that will be invoked every time a new element is dequeued.
(Inherited from HistoryMultipleDataQueueT.)
Public methodSetOnPushDelegate
Set delegate that will be invoked every time a new element is enqueued.
(Inherited from HistoryMultipleDataQueueT.)
Public methodSetQueueListener
Set listener to queue capacity. Queue will call OnPop method every time, when queue drop some element. And OnPush method, when queue store element. Do not use listener with single element queue. Queue support any number of listeners.
(Inherited from HistoryMultipleDataQueueT.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also