Calculate the Plus Directional Indicator in Excel for Technical Analysis

The Plus Directional Indicator (often referred to as +DI) is a key technical analysis tool that helps traders identify the strength of an instrument’s upward price movement. With MarketXLS, you can retrieve this indicator directly in Excel, streamlining your analysis and saving time compared to manual calculations or multiple data sources.

Why Use This Function?

  • Quickly generate the +DI value for US stocks, ETFs, and other supported symbols.
  • Compare the +DI with other indicators (e.g., Minus Directional Indicator, ADX) to gauge trend strength.
  • Easily integrate +DI into trading strategies without juggling multiple data providers.
  • Ideal for short-term and long-term traders seeking a clearer picture of upward price momentum.
  • Get a time-series output for deeper trend analysis or a single numeric value to simplify your worksheets.

How to Use in Excel

=PlusDirectionalIndicator(Symbol, [Days], [StartDate])

• Symbol is the ticker symbol of the stock or ETF you want to analyze (e.g., "AAPL" or "SPY").
• Days (optional) is the period over which the +DI is calculated (defaults to 14 if omitted).
• StartDate (optional) is the date from which the calculation should begin (if not provided, it defaults to today’s date in the function).

Once you enter this formula into a cell, MarketXLS retrieves the indicator from your configured data source and displays the current value of plus directional movement. If you want a full time series of +DI values, you can optionally set an internal parameter called "series" to "True" (though this is not typically entered within the Excel formula unless you are directly editing the function call in code).

Parameters Explained

Parameter Description Example Values Notes
Symbol The ticker symbol or instrument for which you want the +DI calculation "AAPL", "TSLA", "SPY" Must be a valid symbol; otherwise, the function returns "NA".
Days The lookback period for the +DI calculation 14, 20, 50 Defaults to 14 if left blank. A value of 1 will result in "NA" (returned from the backend).
StartDate The date from which the function starts retrieving price data (optional) "01/01/2023", "12/31/2022" If omitted or invalid (<1978), defaults to retrieving data without a specific start date (often current date context).

Note: Internally, there is also an optional parameter (series = "False") that, if set to "True," returns a time series in CSV format rather than a single value. Most users do not need to set this unless they require a historical series.

Example Usage

Basic Examples

  1. Get the current +DI for Apple using the default 14-day period:
    =PlusDirectionalIndicator("AAPL")

    • Returns a single numeric result (e.g., 25.47).
    • If the symbol is invalid or not recognized, returns "NA".

  2. Specify a 20-day period for Tesla:
    =PlusDirectionalIndicator("TSLA", 20)

    • Provides Tesla’s +DI using a 20-day lookback.
    • Useful for traders who prefer a slightly longer evaluation window.

  3. Include a custom start date for SPY (S&P 500 ETF):
    =PlusDirectionalIndicator("SPY", 14, "01/01/2023")

    • Returns the +DI calculated starting from January 1, 2023.

Advanced Scenarios

  1. Automated Trading Models

    • Combine =PlusDirectionalIndicator("MSFT", 14) with other indicators like MinusDirectionalIndicator or ADX to build an Excel-based momentum strategy.
    • Trigger buy signals if +DI crosses above a certain threshold.
  2. Longer Historical Analysis with Time Series

    • If you’re programmatically calling this function (in Visual Basic or a script), you could pass series="True" to retrieve a CSV list of daily +DI values to chart or store historically.
  3. Compare Multiple Time Periods Simultaneously

    • Create multiple columns in Excel for different day parameters (e.g., 10, 14, 20) to see how the +DI changes across short-term and medium-term windows.

Common Questions and Troubleshooting

  1. Why am I getting "NA" as a result?

    • The symbol might be invalid or unrecognized.
    • The license for MarketXLS may not be valid.
    • A 1-day period automatically returns "NA" from the backend.
    • Network or data source issues could also cause "NA" to be returned.
  2. What if the function says “Refreshing”?

    • This indicates MarketXLS is currently refreshing or waiting for data. The result should populate once the refresh completes.
  3. Does “StartDate” accept older historical dates?

    • Yes, but if the year is less than 1978, MarketXLS disregards that date and fetches data without a specific start date.
  4. Can I combine +DI with other Excel functions?

    • Absolutely. For instance, pair it with IF() conditions, or average multiple indicators for a custom composite measure.

By understanding the Plus Directional Indicator’s role in identifying upward trend momentum, you can more confidently build trading techniques and conduct deeper market analysis—directly in Excel with MarketXLS. This saves time, simplifies workflows, and empowers you to focus on the strategy side of trading.

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 Plus Directional Indicator and Other Financial Formulas
How does MarketXLS work?