Field reference / trend
trend_direction
Trend from where the close sits against its 20-, 50- and 200-period simple moving averages (SMAs), plus whether the 20-period SMA is rising (higher than 4 bars earlier): strong_uptrend = above all three with the 20-period SMA rising; uptrend = above at least two; downtrend = below at least two; strong_downtrend = below all three with the 20-period SMA falling; neutral only when the close sits exactly on an SMA. Periods are bars of the row's timeframe (days or weeks). Null until the 200-period SMA exists.
| Level | Per stock, ETF and coin, one value per date |
| Type | string (band) |
| Can be null | No, whenever its section has data |
| Category | trend |
| Returned by | /v1/history, /v1/search |
Values
One of these, in order:
strong_uptrend uptrend neutral downtrend strong_downtrend
Change markers
Every row also says how long this band has held its value and what it was before. Ask for these by name like any field. See Diff.
| Field | Type | What it says |
|---|---|---|
trend_direction_prev | string (band) | The value trend_direction had before it changed, on the row where it changed (when _periods = 1); null otherwise. |
trend_direction_stability | string (band) | How settled trend_direction is: volatile when it changed often in the last 30 days (12 weeks on weekly rows); otherwise fresh (just changed), holding, or established (unchanged for a long time). |
trend_direction_periods | integer | Daily or weekly rows, including this one, that trend_direction has held its current value; 1 means it changed on this row. |
trend_direction_flips_recent_count | integer | How many times trend_direction changed value in the last 30 days (12 weeks on weekly rows). |
trend_direction_flips_lookback | string | The window trend_direction_flips_recent_count covers: 30d on daily rows, 12w on weekly. |
Getting it
Its history for one ticker:
Stocks matching it today:
Related fields
Every field, with its type and values, is also in /v1/schema/fields.