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)Parameters
symbolstringRequired
daysnumberRequired
Returns
number
Highest price in specified number of days
Examples
=x_day_high("AAPL", 20)=x_day_high("MSFT", 60)=x_day_high("SPY", 90)=x_day_high(A1, B1)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.
Related Formulas
More MarketXLS Price History formulas you can use in the same worksheet:
