The Momentum indicator in ProBuilder language is used to measure the rate of change in a security’s price over a specified period. It helps identify the strength of the price movement by comparing the current closing price to the closing price a certain number of periods ago.
Momentum[N]
Where N represents the number of periods ago to compare against the current closing price.
The Momentum value is calculated by subtracting the closing price N periods ago from the current closing price:
momentumValue = close - close[N]
To calculate the 20-day Momentum of a stock and its 10-day average, you can use the following code:
mom = Momentum[20]
averagemom = average[10](mom)
RETURN averagemom as "Average Momentum"
This example calculates the Momentum over the past 20 days and then averages this value over the past 10 days to smooth out short-term fluctuations.
This indicator is particularly useful for traders looking to gauge the velocity of price changes and to identify potential turning points in the market based on divergence and zero-line crossovers.