Option Alpha Docs
  • Intro to Option Alpha
  • TOOLS
    • Bots
      • Creating a Bot
      • Safeguards
      • Automation Basics
      • Using Loops
      • Decisions
      • Automated Trades
      • SmartPricing
      • Exit Options
      • Using Tags
      • Using Inputs
      • Automation Scheduling
      • Bot Logs
      • Templates and Cloning
      • Managing Positions
      • Autotrading Best Practices
    • Trade Ideas
      • Manual Trading
    • 0DTE Oracle
    • Earnings Edge
    • Settings
      • Webhooks
      • Live Trading
        • Connecting to Tradier
        • Connecting to tastytrade
        • Connecting to TradeStation
        • Connecting to Schwab
  • PLATFORM
    • Infrastructure & Security
    • Automations
      • Automation Behavior
    • Data Feeds
    • Order Handling
    • Bot Limitations
    • Supported Ticker Symbols
      • Supported Browsers
      • Supported Countries
    • Ex Dividend & Earnings Dates
    • Troubleshooting
      • Testing Automations
      • Broker Rejection Errors
        • Invalid Authorization
        • Overlapping Strikes Failsafe
        • Duplicate Orders Error
      • Capital Warnings
      • Position Limit Warnings
      • Trade Enforcements
      • Pricing Anomaly Warning
      • Missing or Invalid Input
      • Daily Symbol Limit Error
      • Excessive Errors Failsafe
      • Bot Event Loops
      • Option & Expiration Availability
  • Calculations
    • Profit and Loss
    • Decision Properties
    • Decision Calculations
    • Parameter Selection
    • Probability
      • Probability Theory
      • Understanding Alpha and Expected Value
    • Indicators
      • ADX
      • ATR
      • BOLLINGER BANDS
      • BOP
      • CCI
      • CMO
      • DX
      • EMA
      • KAMA
      • MACD
      • MFI
      • MOM
      • ROC
      • RSI
      • SMA
      • STOCH
      • Stoch RSI
      • TRIMA
      • ULTIMATE OSCILLATOR
      • WILLIAMS %R
  • Resources
    • 'Fast Track' Video Series
    • Live & On-Demand Events
    • Videos
    • Education
    • Blog
    • Podcast
Powered by GitBook
On this page

Was this helpful?

  1. Calculations
  2. Indicators

ROC

Overview of the Rate of Change calculation.

PreviousMOMNextRSI

Last updated 4 years ago

Was this helpful?

Rate of change (ROC) is a technical indicator of momentum that measures the percentage change in price from period to period. Rate of change is also referred to as “momentum” and is often used to confirm trends. For example, when a security reaches a new high but the rate of change does not, then there is a negative divergence between price and momentum.

The source code for the ROC function is available .

/* The interpretation of the rate of change varies widely depending
 * which software and/or books you are refering to.
 *
 * The following is the table of Rate-Of-Change implemented in TA-LIB:
 *       MOM     = (price - prevPrice)         [Momentum]
 *       ROC     = ((price/prevPrice)-1)*100   [Rate of change]
 *       ROCP    = (price-prevPrice)/prevPrice [Rate of change Percentage]
 *       ROCR    = (price/prevPrice)           [Rate of change ratio]
 *       ROCR100 = (price/prevPrice)*100       [Rate of change ratio 100 Scale]
 *
 * Here are the equivalent function in other software:
 *       TA-Lib  |   Tradestation   |    Metastock         
 *       =================================================
 *       MOM     |   Momentum       |    ROC (Point)
 *       ROC     |   ROC            |    ROC (Percent)
 *       ROCP    |   PercentChange  |    -     
 *       ROCR    |   -              |    -
 *       ROCR100 |   -              |    MO
 *
 * The MOM function is the only one who is not normalized, and thus
 * should be avoided for comparing different time serie of prices.
 * 
 * ROC and ROCP are centered at zero and can have positive and negative
 * value. Here are some equivalence:
 *    ROC = ROCP/100 
 *        = ((price-prevPrice)/prevPrice)/100
 *        = ((price/prevPrice)-1)*100
 *
 * ROCR and ROCR100 are ratio respectively centered at 1 and 100 and are
 * always positive values.
 */
here