High Price In X Number Of Days

Returns the highest trading price over a custom number of trading days for a stock. This allows precise daily lookback periods for technical analysis.

Supported Symbol Formats

Type Format Example
US Stocks SYMBOL AAPL, MSFT
ETFs SYMBOL SPY, QQQ

Parameters

Parameter Description Example
Symbol Stock ticker AAPL
Days Number of trading days to look back 20, 60, 90

Syntax

=x_day_high(Symbol, Days)
Excel Desktop (Windows)

Parameters

symbolstringRequired
daysnumberRequired

Returns

number

Highest price in specified number of days

Examples

=x_day_high("AAPL", 20)
20-day high for Apple
=x_day_high("MSFT", 60)
60-day high for Microsoft
=x_day_high("SPY", 90)
90-day high for SPY
=x_day_high(A1, B1)
Symbol and days from cells

When to Use

  • Short-term breakout analysis
  • Day-based resistance levels
  • Custom technical indicators
  • Donchian channel calculations

When NOT to Use

Scenario Use Instead
Need weeks, not days x_week_high()
Need low instead x_day_low()
Need specific dates custom_dates_high()

Common Issues & FAQ

Are these trading days or calendar days?

These are typically trading days (business days when market is open).

Does this include today?

Yes, the current day's high is typically included if market has traded.

Market data in your Excel sheets

1 billion usable data points on stocks, options, ETFs, and fundamentals, with simple Excel formulas.

See plans
MarketXLS Excel Add-in Tutorial - How to Use High Price In X Number Of Days and Other Financial Formulas
▶
How does MarketXLS work?