Click or drag to resize

BaseSimpleIndicatorT Class

Abstract class. Represents a base simple indicator (like Sma).
Inheritance Hierarchy
SystemObject
  FinAnalysis.BaseHistoryDataQueueT
    FinAnalysis.BaseBaseIndicatorT
      FinAnalysis.BaseBaseInstrumentIndicatorT
        FinAnalysis.BaseBaseSimpleIndicatorT
          More...

Namespace:  FinAnalysis.Base
Assembly:  FinAnalysis.Base (in FinAnalysis.Base.dll) Version: 2.1.13-cc97e13414b71fde928e8f3a546ac1daf26f295f
Syntax
C#
public abstract class BaseSimpleIndicator<T> : BaseInstrumentIndicator<T>, 
	ISimpleTradeSignal, ITradeSignal, ISimpleIndicator, IBaseIndicator
where T : new()

Type Parameters

T
Type of indicators value. It must be double if indicator has single return value else it must be Slice with all indicators value. Note: Indicator history store elements of this type. Note: T must has default public constructor.

The BaseSimpleIndicatorT 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 HistoryDataQueueT.)
Public propertyFirstDateTime
Get first(oldest) data element DateTime stored in container. Note: if there is not elements in queue it returns DefaltDateTime.
(Inherited from HistoryDataQueueT.)
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.
(Inherited from BaseIndicatorT.)
Public propertyHistoryCount
Count of indicators values in indicator history.
(Inherited from BaseIndicatorT.)
Public propertyHistoryTimeManaged
Indicates whether indicator safe it's history on time period or store specified values count.
(Inherited from BaseIndicatorT.)
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.
(Inherited from BaseIndicatorT.)
Public propertyIndicatorNeedDateTime
Equal true if user have to specify DateTime in Add method.
(Inherited from BaseIndicatorT.)
Public propertyItemDateTime
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 HistoryDataQueueT.)
Public propertyItemInt32
Get data which was store "index" steps ago.
(Inherited from HistoryDataQueueT.)
Public propertyLast
Get last data element stored in container. Note: if there is not elements in queue it returns DefaltValue.
(Inherited from HistoryDataQueueT.)
Public propertyLastDateTime
Get last data element DateTime stored in container. Note: if there is no elements in the queue it returns DefaultDateTime.
(Inherited from HistoryDataQueueT.)
Public propertyPrevious
Get previous data element stored in container. Note: if there is such not elements in queue it returns DefaltValue.
(Inherited from HistoryDataQueueT.)
Public propertyReady
Ready flag is set if and only if queue contain something.
(Inherited from BaseIndicatorT.)
Public propertyResamplingFactor
Set this parameter if you whant to compress data series. It means that if you set this flag, then indicator will calculate it's values on ResamplingFactor-greater steps.
(Inherited from BaseInstrumentIndicatorT.)
Public propertyResamplingMethod
Get or Specify resampling Method. LastElement - mean that we use for calculation values equals to last value on resampling period, ArithmeticMean - mean that we use for calculation values equals to arithmetic mean of values on resampling period,
(Inherited from BaseInstrumentIndicatorT.)
Public propertyStable
Flag is set if and only if indicators values is stable.
(Inherited from BaseIndicatorT.)
Public propertyTradeSignal
Trade signal.
(Inherited from BaseInstrumentIndicatorT.)
Public propertyTradeSignalType
Characterize indicator trade signal values range and meaning.
(Inherited from BaseInstrumentIndicatorT.)
Public propertyValidationStrategy
Indicate what we must do with invalid input values.
(Inherited from BaseIndicatorT.)
Public propertyValue
Returns value of indicator. For indicators which has more than one value, it returns a slice.
(Inherited from BaseIndicatorT.)
Public propertyValueDelayPointPeriod
Set Delay (in points) for indicators Value.
(Inherited from BaseIndicatorT.)
Public propertyValueDelayTimePeriod
Set Delay (in timespan) for indicators Value.
(Inherited from BaseIndicatorT.)
Top
Methods
  NameDescription
Public methodAdd(Double)
Add value to indicator. Note: Do Not use methods with and without DateTime for same instance. Also do not call this method for indicators which need datetime for calculation it's value. To determine do you need to specify DateTime, see IndicatorNeedDateTime flag.
Public methodAdd(Double, DateTime)
Add value to indicator. Note: Do Not use methods with and without DateTime for same instance. Note: if you specify time = DefaultTime then method ignore this parameter and call add with out time. To determine do you need to specify DateTime, see IndicatorNeedDateTime flag.
Public methodClone
Makes full copy of this instance.
(Inherited from BaseIndicatorT.)
Public methodCopyTo(Object)
Sets internal state to destination object.
(Inherited from BaseIndicatorT.)
Public methodCopyTo(Object, IL_Clone)
Gets internal state from source object.
(Inherited from BaseIndicatorT.)
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 HistoryDataQueueT.)
Public methodGetTimeByIndex
Return time associated with specified point.
(Inherited from HistoryDataQueueT.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodOfflineComputation(Double, T)
Performs offline computation using all data for period simultaneously. In some cases can be faster and/or use less memory than online (step-by-step) computation. Note: Indicator cannot be used before and after calling this method.
Public methodOfflineComputation(Double, DateTime, T)
Performs offline computation using all data for period simultaneously. In some cases can be faster and/or use less memory than online (step-by-step) computation. Note: Indicator cannot be used before and after calling this method.
Public methodSetOnPopDelegate
Set delegate that will be invoked every time a new element is dequeued.
(Inherited from HistoryDataQueueT.)
Public methodSetOnPushDelegate
Set delegate that will be invoked every time a new element is enqueued.
(Inherited from HistoryDataQueueT.)
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 HistoryDataQueueT.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also
Inheritance Hierarchy
SystemObject
  FinAnalysis.BaseHistoryDataQueueT
    FinAnalysis.BaseBaseIndicatorT
      FinAnalysis.BaseBaseInstrumentIndicatorT
        FinAnalysis.BaseBaseSimpleIndicatorT
          FinAnalysis.BurstDetectionShiftedWaveletTreeBaseT
          FinAnalysis.BurstDetectionThresholder
          FinAnalysis.PredicatesConstant
          FinAnalysis.PredicatesCount
          FinAnalysis.PredicatesIsApproachingAbove
          FinAnalysis.PredicatesIsApproachingBelow
          FinAnalysis.PredicatesIsDecreasing
          FinAnalysis.PredicatesIsDropped
          FinAnalysis.PredicatesIsGained
          FinAnalysis.PredicatesIsGreater
          FinAnalysis.PredicatesIsIncreasing
          FinAnalysis.PredicatesIsInInterval
          FinAnalysis.PredicatesIsLess
          FinAnalysis.PredicatesIsNewHigh
          FinAnalysis.PredicatesIsNewLow
          FinAnalysis.PredicatesLogicalNot
          FinAnalysis.PredicatesLogReturn
          FinAnalysis.PredicatesReturn
          FinAnalysis.TAAdfTest
          FinAnalysis.TAAutocorrelation
          FinAnalysis.TABollinger
          FinAnalysis.TACma
          FinAnalysis.TACoefficientOfVariation
          FinAnalysis.TAEma
          FinAnalysis.TAEnvelope
          FinAnalysis.TAKama
          FinAnalysis.TAKpssTest
          FinAnalysis.TALsma
          FinAnalysis.TAMacd
          FinAnalysis.TAMaximum
          FinAnalysis.TAMesaSinewave
          FinAnalysis.TAMinimum
          FinAnalysis.TAMma
          FinAnalysis.TAMomentum
          FinAnalysis.TAPfe
          FinAnalysis.TAPriceOscillator
          FinAnalysis.TARoc
          FinAnalysis.TARootMeanSquare
          FinAnalysis.TARsi
          FinAnalysis.TARSquared
          FinAnalysis.TASecondRawMoment
          FinAnalysis.TASlope
          FinAnalysis.TASma
          FinAnalysis.TAStandardDeviation
          FinAnalysis.TAVariance
          FinAnalysis.TAZScore