RTI_PriceChangePct_X_Min_Ago: Real-Time Percentage Price Changes in Excel

The RTI_PriceChangePct_X_Min_Ago function in MarketXLS lets you see how a stock’s price has changed (in percentage terms) from a given number of minutes ago. This real-time calculation helps you spot quick trends, react to market movements, and make more informed decisions directly from your Excel spreadsheet.

By leveraging the RTD (Real-Time Data) mechanism and MarketXLS’s technical indicators, the function retrieves the symbol’s last known price from a specified number of minutes ago and computes the percentage change against the current price. This is particularly useful during fast-moving or volatile trading sessions.

Why Use This Function?

  • Monitor intra-day momentum by checking how quickly a stock’s price is moving in percentage terms over the last X minutes.
  • Integrate real-time analytics in your spreadsheets without switching between multiple platforms.
  • Develop short-term trading signals (e.g., scalp trading or momentum-based strategies) directly within Excel.
  • Quickly identify significant price shifts to make fast trading decisions or protect positions.
  • Use it in combination with other MarketXLS RTI functions (e.g., RTI_HighestPrice_in_X_Mins) to get a more complete picture of recent market activity.

How to Use in Excel

=RTI_PriceChangePct_X_Min_Ago(symbol, minutesAgo)
  1. Type “=RTI_PriceChangePct_X_Min_Ago” into a cell.
  2. Enter the stock symbol in quotes as the first argument.
  3. Enter an integer value for the minutesAgo parameter.
  4. Press Enter, and watch the cell update in real-time (provided you have an active data seller configured).

Behind the scenes, MarketXLS subscribes to real-time data from an active data vendor (e.g., AngelOne or Zerodha). If the symbol is not yet live, MarketXLS automatically attempts to queue it for real-time updates. If no vendor is configured, you’ll see a “No data seller is configured” message.

Parameters Explained

Parameter Description Example Values Notes
symbol The stock ticker or symbol for which you want the price change percentage. "AAPL", "MSFT" Must be a valid symbol recognized by your active data seller
minutesAgo The number of minutes ago from the current time to calculate the percentage change in price 5, 10, 30 Typically an integer ? 1; higher values look further back in time

• The function returns a real-time calculation of how much (in percentage) a stock’s LAST price has changed since “minutesAgo” minutes earlier.
• Ensure that the symbol exists and is spelled correctly; real-time data updates require an active and valid MarketXLS license.

Example Usage

Basic Examples

  1. Simple Percentage Change from 10 Minutes Ago:
    =RTI_PriceChangePct_X_Min_Ago("AAPL", 10)
    Description: Displays how much Apple’s stock price has changed (in %) since 10 minutes ago.

  2. Checking a 5-Minute Window for a Different Symbol:
    =RTI_PriceChangePct_X_Min_Ago("MSFT", 5)
    Description: Shows the real-time percentage change of Microsoft’s price from 5 minutes earlier.

In both examples, data refreshes automatically if your RTD connection is active.

Advanced Scenarios

• Intraday Momentum Dashboard:
Combine RTI_Price_X_Min_Ago, RTI_PriceChange_X_Min_Ago, and RTI_PriceChangePct_X_Min_Ago to build a dashboard that flags any significant short-term price spikes.
Example formula synergy:
- Cell A2: =RTI_Price_X_Min_Ago("AAPL", 10)
- Cell B2: =RTI_PriceChange_X_Min_Ago("AAPL", 10)
- Cell C2: =RTI_PriceChangePct_X_Min_Ago("AAPL", 10)
With these three cells, you can instantly see the price 10 minutes ago, the nominal change since then, and the percentage change.

• Trigger-Based Alerts:
Use Excel conditional formatting or custom VBA macros to alert you when the percentage change exceeds a threshold (e.g., ±1%). This helps you act quickly on sudden movements during the trading day.

• Integration with Other RTI Functions:
You might reference RTI_PriceChangePct_X_Min_Ago as part of a larger formula that calculates performance metrics, or pairs it with a longer lookback function like RTI_SMA or RTI_RSI to weigh immediate volatility against longer-term trends.

Common Questions and Troubleshooting

  1. “Why am I getting 'No data seller is configured'?”
    – You must configure at least one active data seller, such as AngelOne or Zerodha, in your MarketXLS settings.

  2. “My function returns ‘Insufficient parameters.’ What’s missing?”
    – Double-check that you are passing both the required symbol and the minutesAgo parameters to the function.

  3. “The function returns ‘ERR’ or a strange result.”
    – Confirm your symbol is valid and spelled correctly. Also ensure you have a valid MarketXLS license.

  4. “What if the stock is not trading or hasn’t updated in the last few minutes?”
    – Real-time data may temporarily lag or show minimal changes if trading volume is low, or if the market is closed.

  5. “Can I use negative values for minutesAgo?”
    – There’s no explicit support in the function for negative or zero values, and doing so could lead to unexpected results. Use positive integers.

By combining RTI_PriceChangePct_X_Min_Ago with other MarketXLS RTI functions, you’ll gain powerful, real-time insights directly within Excel—helping you spot intraday momentum, refine entry/exit points, and track fast changes in market prices without leaving your spreadsheet.

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use Pricechangepct X Min Ago and Other Financial Formulas
How does MarketXLS work?