Technical Indicator (Generic)

A flexible function that returns any supported technical indicator by specifying its code. This is useful for indicators that don't have dedicated MarketXLS functions.

Supported Indicator Codes

Code Indicator Description
RSI Relative Strength Index Momentum oscillator
SMA Simple Moving Average Average price
EMA Exponential Moving Average Weighted average
MACD Moving Average Convergence Divergence Trend following
ADX Average Directional Index Trend strength
ATR Average True Range Volatility
STDDEV Standard Deviation Price dispersion
MOM Momentum Price change
MFI Money Flow Index Volume-weighted momentum
WILLR Williams %R Overbought/oversold
PLUS_DI Plus Directional Indicator Bullish direction
MINUS_DI Minus Directional Indicator Bearish direction
MIDPOINT Mid Point Over Period Price midpoint
OBV On Balance Volume Volume flow
TSF Time Series Forecast Linear regression

Parameters

Parameter Description Default
Symbol Stock ticker symbol Required
IndicatorCode Technical indicator code Required
Days Number of periods 14
StartDate Calculate as of this date Today

Examples

=TechnicalIndicator("AAPL", "ADX")
ADX for Apple
=TechnicalIndicator("AAPL", "ADX", "14")
14-day ADX
=TechnicalIndicator("MSFT", "MACD", "12")
MACD for Microsoft
=TechnicalIndicator("SPY", "RSI", "14")
RSI for SPY
=TechnicalIndicator("AAPL", "OBV", "14")
On Balance Volume
=TechnicalIndicator("TSLA", "TSF", "20")
Time Series Forecast
=TechnicalIndicator(A1, B1, C1)
Parameters from cells

When to Use

  • Access indicators without dedicated functions
  • ADX for trend strength analysis
  • MACD for trend-following signals
  • OBV for volume confirmation
  • TSF for linear regression forecast
  • Quick access to any supported indicator

When NOT to Use

Scenario Use Instead
Need RSI RelativeStrengthIndex() - more intuitive
Need SMA SimpleMovingAverage() - clearer syntax
Need EMA ExponentialMovingAverage()
Need ATR AverageTrueRange()
Need fundamental data Fundamental data functions

Common Issues & FAQ

Q: What indicator codes are available? A: Common codes include: RSI, SMA, EMA, MACD, ADX, ATR, STDDEV, MOM, MFI, WILLR, PLUS_DI, MINUS_DI, MIDPOINT, OBV, TSF, BBANDS.

Q: Why is the function returning "NA"? A: Check that:

  • The indicator code is valid (case-insensitive)
  • The symbol is valid
  • There is sufficient historical data

Q: Should I use this or the dedicated function? A: Use dedicated functions (like RelativeStrengthIndex()) when available for clearer, more maintainable formulas. Use TechnicalIndicator() for indicators without dedicated functions.

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 Technical Indicator (Generic) and Other Financial Formulas
How does MarketXLS work?