Return value of the Price Rate of Change indicator over the last N periods for the selected price.
Syntax:
1 |
ROC[N](price) |
Calculation :
ROC =((price – price[N])*100)/price[N]
Interpretation :
The Rate of Change is similar to Momentum.
It is an overbought/oversold indicator measured according to its positive relative to 100.
It also gives good divergence signals.
A bullish divergence occurs when the stock price makes new lows while the Rate of Change fails to make new lows.
A bearish divergence occurs when the stock price makes new highs while the Rate of Change fails to make new highs.
Example:
1 2 3 4 5 6 |
i1 = ROC[1](close) i2 = ROC[1](close[1]) majorchange = i1/i2 RETURN majorchange |
Hi , to be sure to understand the syntax ROC,
Let’s put:
N = 1
price = 5000 and price[N] = 5010
ROC is equal to 100*(5000/5009) or am i wrong?