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 |
Syntax
=TechnicalIndicator(Symbol, IndicatorCode, [Days], [StartDate])Parameters
Stock ticker symbol
Technical indicator code (e.g., RSI, SMA, EMA, MACD, ADX)
Number of periods for calculation
Start date for calculation (defaults to today)
Returns
Technical indicator value
Examples
=TechnicalIndicator("AAPL", "ADX")=TechnicalIndicator("AAPL", "ADX", "14")=TechnicalIndicator("MSFT", "MACD", "12")=TechnicalIndicator("SPY", "RSI", "14")=TechnicalIndicator("AAPL", "OBV", "14")=TechnicalIndicator("TSLA", "TSF", "20")=TechnicalIndicator(A1, B1, C1)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
What indicator codes are available?
Common codes include: RSI, SMA, EMA, MACD, ADX, ATR, STDDEV, MOM, MFI, WILLR, PLUS_DI, MINUS_DI, MIDPOINT, OBV, TSF, BBANDS.
Why is the function returning "NA"?
Check that:
- The indicator code is valid (case-insensitive)
- The symbol is valid
- There is sufficient historical data
Should I use this or the dedicated function?
Use dedicated functions (like RelativeStrengthIndex()) when available for clearer, more maintainable formulas. Use TechnicalIndicator() for indicators without dedicated functions.
Excel Templates Using Technical Indicator (Generic)
These ready-made MarketXLS templates call TechnicalIndicator() in their worksheet formulas. Open one to see the function working inside a complete model.
Related Formulas
More MarketXLS Technical Indicators formulas you can use in the same worksheet:
- Technical Score
- Two Hundred Days Moving Average
- 200-Day Moving Average
- 50-Day Moving Average
- Average Daily Volume
- Average Volume 1 Year
- Average Volume 15 Days
- Average Volume 2 Years
See TechnicalIndicator used in a complete workbook: Maximize Profits Using Support and Resistance Indicators
