﻿ Momentum(Series,Int32) Method
 Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: Visual Basic (Declaration) Language Filter: Visual Basic (Usage) Language Filter: C#
 dotnetCHARTING Namespace > FinancialEngine Class > Momentum Method : Momentum(Series,Int32) Method

s
An series of length greate or equal to the number of periods considered in the indicator evaluation where the first element is the closing price in the last trading period, the second term is the closing price in the previous trading period and so on.
noOfDays
The number of days before to which the closing price is compared.
We evaluate the n-day momentum which is simply the difference between today's closing price and the close price n days ago, for all days for which sufficient historical data is given.

Syntax

Visual Basic (Declaration)
```Public Overloads Shared Function Momentum( _
ByVal s As Series, _
ByVal noOfDays As Integer _
) As Series```
Visual Basic (Usage)Copy Code
``````Dim s As Series
Dim noOfDays As Integer
Dim value As Series

value = FinancialEngine.Momentum(s, noOfDays)``````
C#
```public static Series Momentum(
Series s,
int noOfDays
)```

Parameters

s
An series of length greate or equal to the number of periods considered in the indicator evaluation where the first element is the closing price in the last trading period, the second term is the closing price in the previous trading period and so on.
noOfDays
The number of days before to which the closing price is compared.

Return Value

A series where the first term is the momentum for the most recent trading period, the second term is the momentum for the previous trading period and so on.

Exceptions

ExceptionDescription
ArgumentExceptionThrown if either parameter is strictly negative.

Remarks

The Momentum indicator as the name suggests is the velocity with which the price is rising or falling, and hence will reflect how aggressively the asset is being purchased or sold.

Remark: Extended values and/or turning points of the momentum are good indicators of oversold or over brought conditions(respectively).