ROC

Category: Indicators

The ROC (Rate of Change) indicator is a momentum oscillator used in technical analysis that measures the percentage change in price between the current price and the price a certain number of periods ago. The ROC indicator is primarily used to identify overbought or oversold conditions in a market, as well as to detect divergences which may indicate potential market reversals.

Syntax:

ROC[N](price)

This function calculates the Rate of Change for a given price over the last N periods. Here, N represents the number of periods over which the change is measured, and price specifies the price data (e.g., close, open, high, low) to be used.

Calculation:

ROC = ((price - price[N]) * 100) / price[N]

The ROC is calculated by taking the difference between the current price and the price N periods ago, dividing this difference by the price N periods ago, and then multiplying the result by 100 to express it as a percentage.

Example:

i1 = ROC[1](close)
i2 = ROC[1](close[1])
majorchange = i1 / i2
RETURN majorchange

In this example, i1 calculates the Rate of Change of the closing price from the previous period to the current period. i2 calculates the Rate of Change of the closing price from two periods ago to one period ago. The variable majorchange then finds the ratio of these two ROC values, which could be used to analyze acceleration in price changes.

Interpretation:

  • The ROC indicator oscillates around zero, moving into positive or negative territory. Values significantly higher than zero can indicate an overbought condition, while values significantly lower than zero can suggest an oversold condition.
  • Divergence plays a crucial role in interpreting the ROC. A bullish divergence occurs when the price records lower lows while the ROC forms higher lows, suggesting a potential upward reversal. Conversely, a bearish divergence occurs when the price records higher highs while the ROC forms lower highs, indicating a potential downward reversal.

This indicator is useful for traders looking to gauge the strength of a price trend and to anticipate potential points where the price trend may reverse.

Related Instructions:

  • RocnRoll indicators
  • Logo Logo
    Loading...