CompositeMomentum
StockSharp.Algo.Indicators
Composite Momentum indicator.
Inherits: BaseComplexIndicator<ICompositeMomentumValue>
Constructors
CompositeMomentum
public CompositeMomentum()
compositeMomentum = CompositeMomentum()
Initializes a new instance of the CompositeMomentum.
CompositeMomentum
public CompositeMomentum(RateOfChange shortRoc, RateOfChange longRoc, RelativeStrengthIndex rsi, ExponentialMovingAverage emaFast, ExponentialMovingAverage emaSlow, SimpleMovingAverage sma)
compositeMomentum = CompositeMomentum(shortRoc, longRoc, rsi, emaFast, emaSlow, sma)
Initializes a new instance of the CompositeMomentum.
Properties
CompositeLine
public CompositeMomentumLine CompositeLine { get; }
value = compositeMomentum.CompositeLine
Composite momentum line.
EmaFast
public ExponentialMovingAverage EmaFast { get; }
value = compositeMomentum.EmaFast
Fast Exponential Moving Average.
EmaSlow
public ExponentialMovingAverage EmaSlow { get; }
value = compositeMomentum.EmaSlow
Slow Exponential Moving Average.
LongRoc
public RateOfChange LongRoc { get; }
value = compositeMomentum.LongRoc
Long-term Rate of Change.
Measure
public override IndicatorMeasures Measure { get; }
value = compositeMomentum.Measure
IndicatorMeasures.
NumValuesToInitialize
public override int NumValuesToInitialize { get; }
value = compositeMomentum.NumValuesToInitialize
Number of values that need to be processed in order for the indicator to initialize (be IsFormed equals ). if undefined.
Rsi
public RelativeStrengthIndex Rsi { get; }
value = compositeMomentum.Rsi
Relative Strength Index.
ShortRoc
public RateOfChange ShortRoc { get; }
value = compositeMomentum.ShortRoc
Short-term Rate of Change.
Sma
public SimpleMovingAverage Sma { get; }
value = compositeMomentum.Sma
SMA used for final smoothing.
Methods
CreateValue
protected override ICompositeMomentumValue CreateValue(DateTime time)
result = compositeMomentum.CreateValue(time)
Create .
- time
- Time
OnProcess
protected override IIndicatorValue OnProcess(IIndicatorValue input)
result = compositeMomentum.OnProcess(input)
To handle the input value.
- input
- The input value.
Returns: The resulting value.
Reset
public override void Reset()
compositeMomentum.Reset()
To reset the indicator status to initial. The method is called each time when initial settings are changed (for example, the length of period).