# trend_long

Long-term trend classification from `sma_200` slope. One of `uptrend`, `downtrend`, `sideways`.

A text signal column on the Tickerbot computed state table (20,798+ ticker rows) — computed by the platform, queryable by bare name across the API. Values are NULL on rows the signal doesn't apply to.

- Group: Technicals
- Category: Trend & direction
- Type: text
- Update cadence: post-close daily
- Intervals: 1m/1h/1d
- Universe: all tickers
- History: full · since 2004
- Nullable: yes

## Query it

Every applicable form factor, grouped by endpoint family. Response payloads are real captures, sampled 2026-08-18 and trimmed; your run's values and dates will differ.

### Use scan — `/v2/scan`

The whole market through a WHERE clause — this signal composed freely with any other column. (https://tickerbot.io/docs/endpoints/scan.md)

#### Live — the whole market, ranked by this column

```bash
curl -G "https://api.tickerbot.io/v2/scan" \
  --data-urlencode "q=trend_long IS NOT NULL" \
  -d "order=trend_long" -d "columns=trend_long" \
  -H "Authorization: Bearer YOUR_KEY"
```

Response (sampled 2026-08-18, trimmed):

```json
{
 "as_of": "2026-08-18T00:26:00.575Z",
 "query": {
  "q": "trend_long IS NOT NULL",
  "limit": 2,
  "order": "trend_long",
  "dir": "desc",
  "fields": [
   "trend_long"
  ],
  "full": false,
  "universe": null,
  "asset_class": null
 },
 "count": 2,
 "results": [
  {
   "ticker": "A",
   "name": "Agilent Technologies Inc.",
   "asset_class": "stocks",
   "asset_type": "CS",
   "price": 147.295,
   "day_change_pct": -0.0083,
   "gap_pct": -0.0048,
   "relative_volume": null,
   "market_cap": 41949616642,
   "trend_long": "up"
  },
  {
   "ticker": "AAAA",
   "name": "Amplius Aggressive Asset Allocation ETF",
   "asset_class": "stocks",
   "asset_type": "ETF",
   "price": 30.97,
   "day_change_pct": 0.0001,
   "gap_pct": 0.0004,
   "relative_volume": null,
   "market_cap": null,
   "trend_long": "up"
  }
 ]
}
```

#### As-of — the same scan at a past date

```bash
curl -G "https://api.tickerbot.io/v2/scan" \
  --data-urlencode "q=trend_long IS NOT NULL" \
  -d "order=trend_long" -d "columns=trend_long" \
  -d "asof=2026-05-20" \
  -H "Authorization: Bearer YOUR_KEY"
```

Response (sampled 2026-08-18, trimmed):

```json
{
 "as_of": "2026-05-20",
 "query": {
  "q": "trend_long IS NOT NULL",
  "asof": "2026-05-20",
  "interval": "auto",
  "limit": 2,
  "order": "trend_long",
  "dir": "desc",
  "fields": [
   "trend_long"
  ],
  "full": false,
  "universe": null,
  "asset_class": null
 },
 "count": 2,
 "results": [
  {
   "ticker": "AA",
   "name": "Alcoa Corporation",
   "asset_class": "stocks",
   "asset_type": "CS",
   "price": 64.14,
   "day_change_pct": 0.3284842796809023,
   "gap_pct": 1.7519161582981346,
   "relative_volume": 0.9303695562528992,
   "market_cap": 16740540000,
   "trend_long": "up"
  },
  {
   "ticker": "AAAA",
   "name": "Amplius Aggressive Asset Allocation ETF",
   "asset_class": "stocks",
   "asset_type": "ETF",
   "price": 30.0451,
   "day_change_pct": 1.1967072866775785,
   "gap_pct": 0.3374896429076565,
   "relative_volume": 0.06305769416615663,
   "market_cap": null,
   "trend_long": "up"
  }
 ]
}
```

### Use series — `/v2/series`

Its history over time, on one aligned grid. (https://tickerbot.io/docs/endpoints/series.md)

#### History — the column on an aligned time grid

```bash
curl "https://api.tickerbot.io/v2/series?tickers=AAPL,MSFT&columns=close,trend_long" \
  -H "Authorization: Bearer YOUR_KEY"
```

Response (sampled 2026-08-18, trimmed):

```json
{
 "as_of": "2026-08-18T00:26:03.503Z",
 "interval": "1d",
 "tickers": [
  "AAPL",
  "MSFT"
 ],
 "columns": [
  "close",
  "trend_long"
 ],
 "count": 6,
 "series": {
  "AAPL": [
   {
    "t": "2026-08-12",
    "close": 302.25,
    "trend_long": "up"
   },
   {
    "t": "2026-08-13",
    "close": 305.26,
    "trend_long": "up"
   },
   {
    "t": "2026-08-14",
    "close": 305.93,
    "trend_long": "up"
   }
  ],
  "MSFT": [
   {
    "t": "2026-08-12",
    "close": 492.43,
    "trend_long": "up"
   },
   {
    "t": "2026-08-13",
    "close": 496.88,
    "trend_long": "up"
   },
   {
    "t": "2026-08-14",
    "close": 495.4,
    "trend_long": "up"
   }
  ]
 }
}
```

## Related signals (Trend & direction)

- [adx_14](https://tickerbot.io/docs/signals/adx_14.md)
- [in_downtrend](https://tickerbot.io/docs/signals/in_downtrend.md)
- [in_uptrend](https://tickerbot.io/docs/signals/in_uptrend.md)
- [macd_above_signal](https://tickerbot.io/docs/signals/macd_above_signal.md)
- [macd_below_signal](https://tickerbot.io/docs/signals/macd_below_signal.md)
- [macd_histogram](https://tickerbot.io/docs/signals/macd_histogram.md)
- [macd_line](https://tickerbot.io/docs/signals/macd_line.md)
- [macd_signal](https://tickerbot.io/docs/signals/macd_signal.md)
- [minus_di](https://tickerbot.io/docs/signals/minus_di.md)
- [plus_di](https://tickerbot.io/docs/signals/plus_di.md)
- [trend_medium](https://tickerbot.io/docs/signals/trend_medium.md)
- [trend_reversal_bearish_today](https://tickerbot.io/docs/signals/trend_reversal_bearish_today.md)
- [trend_reversal_bullish_today](https://tickerbot.io/docs/signals/trend_reversal_bullish_today.md)
- [trend_short](https://tickerbot.io/docs/signals/trend_short.md)

---

Full catalog: https://tickerbot.io/docs/signals.md · Schema: https://tickerbot.io/docs/schema.md · Interactive: https://tickerbot.io/explore?signal=trend_long · HTML: https://tickerbot.io/docs/signals/trend_long/
