> ## Documentation Index
> Fetch the complete documentation index at: https://docs.askfutures.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Signals, indicators and series

> The full vocabulary inside entry and exit rules — TA-Lib indicators, crossovers, special series builders, prior-bar values, cross-market spreads, and weekly COT positioning.

This is the vocabulary AskFutures draws on when it turns your idea into rules.
You never type any of these names — you describe what you want in plain English
and AskFutures picks the right pieces. This page is a reference so you know what
*is* available to describe.

<Note>
  You don't write formulas or pick function names. Say *"when the 14-period RSI
  crosses above 30"* and AskFutures uses the real RSI indicator. The list below
  is what it understands — not a syntax you have to learn.
</Note>

Every indicator here is the real [TA-Lib](https://ta-lib.org/) function — the
same math charting platforms use, computed by fixed code, not approximated by
the AI. See [is the backtest real?](/concepts/is-the-backtest-real) for why that
matters.

## TA-Lib indicators

Reference these by name and period in plain English — *"the 50-period EMA"*,
*"14-period ADX above 25"*, *"the upper Bollinger Band"*. Group by group, here's
everything supported and when you'd reach for it.

<AccordionGroup>
  <Accordion title="Moving averages — smooth price into a trend line" icon="chart-line">
    | Indicator | What it is                        | Use it when                                                     |
    | --------- | --------------------------------- | --------------------------------------------------------------- |
    | `SMA`     | Simple moving average             | You want a plain average of the last N closes.                  |
    | `EMA`     | Exponential moving average        | You want a faster average that weights recent bars.             |
    | `WMA`     | Weighted moving average           | You want recency weighting without EMA's smoothing.             |
    | `DEMA`    | Double exponential moving average | You want less lag than a single EMA.                            |
    | `TEMA`    | Triple exponential moving average | You want an even faster, lower-lag trend line.                  |
    | `KAMA`    | Kaufman adaptive moving average   | You want an average that speeds up in trends and slows in chop. |
    | `T3`      | Tillson T3 (with a `vfactor`)     | You want a smooth, tunable trend line that hugs price.          |

    *Common use:* a fast-over-slow crossover (e.g. EMA 9 over EMA 21), or
    "price closes above its 30-period average" as a trend filter.
  </Accordion>

  <Accordion title="Momentum & oscillators — measure speed and overbought/oversold" icon="gauge-high">
    | Indicator  | What it is                                | Use it when                                              |
    | ---------- | ----------------------------------------- | -------------------------------------------------------- |
    | `RSI`      | Relative strength index (0–100)           | You want a classic overbought/oversold gauge.            |
    | `MOM`      | Momentum                                  | You want raw price change over N bars, with a zero line. |
    | `ROC`      | Rate of change (percent)                  | You want momentum as a percentage move (`1` means +1%).  |
    | `WILLR`    | Williams %R (−100…0)                      | You want an inverted overbought/oversold oscillator.     |
    | `CCI`      | Commodity Channel Index                   | You want an unbounded oscillator with ±100 thresholds.   |
    | `MFI`      | Money Flow Index (0–100)                  | You want a volume-weighted RSI.                          |
    | `STOCH`    | Stochastic (`slowk` / `slowd`)            | You want a %K/%D cross at extremes.                      |
    | `STOCHRSI` | Stochastic RSI (`fastk` / `fastd`)        | You want a more sensitive version of stochastic.         |
    | `MACD`     | MACD (`macd` / `macdsignal` / `macdhist`) | You want trend-momentum and a signal-line cross.         |
    | `PPO`      | Percentage price oscillator               | You want MACD expressed in percent.                      |
    | `APO`      | Absolute price oscillator                 | You want MACD-style momentum in price units.             |

    *Common use:* "buy when RSI crosses above 30", "go long on a MACD signal
    cross", or use the oscillator to confirm a trend entry.
  </Accordion>

  <Accordion title="Trend strength — is there actually a trend?" icon="arrow-trend-up">
    | Indicator  | What it is                | Use it when                                                     |
    | ---------- | ------------------------- | --------------------------------------------------------------- |
    | `ADX`      | Average directional index | You want to trade only when a trend is strong (e.g. ADX > 25).  |
    | `ADXR`     | ADX rating (smoothed ADX) | You want a steadier read on trend strength.                     |
    | `PLUS_DI`  | +Directional indicator    | You want the up-pressure half of the DI pair.                   |
    | `MINUS_DI` | −Directional indicator    | You want the down-pressure half — cross with +DI for direction. |
    | `SAR`      | Parabolic SAR             | You want a stop-and-reverse dot that flips with trend.          |

    *Common use:* an ADX gate ("only take trades when ADX is above 20") so you
    skip chop, or a +DI/−DI cross for direction.
  </Accordion>

  <Accordion title="Volatility — how much is price moving?" icon="bolt">
    | Indicator | What it is                                                 | Use it when                                                       |
    | --------- | ---------------------------------------------------------- | ----------------------------------------------------------------- |
    | `ATR`     | Average true range (price units)                           | You want volatility-scaled stops/targets or an expansion filter.  |
    | `NATR`    | Normalized ATR (percent)                                   | You want ATR as a percentage of price, comparable across markets. |
    | `TRANGE`  | True range of the current bar                              | You want this bar's range vs. its average.                        |
    | `BBANDS`  | Bollinger Bands (`upperband` / `middleband` / `lowerband`) | You want a mean-reversion envelope or a squeeze.                  |
    | `STDDEV`  | Standard deviation of price                                | You want a raw volatility gate.                                   |
    | `VAR`     | Variance                                                   | You want a volatility-regime filter.                              |

    *Common use:* an ATR-based stop and target, a Bollinger Band fade, or "only
    trade when volatility is expanding".
  </Accordion>

  <Accordion title="Volume — is money confirming the move?" icon="layer-group">
    | Indicator | What it is                     | Use it when                                              |
    | --------- | ------------------------------ | -------------------------------------------------------- |
    | `OBV`     | On-balance volume              | You want a running volume tally that should track price. |
    | `AD`      | Accumulation/Distribution line | You want a volume-flow confirmation of trend.            |
    | `ADOSC`   | Chaikin A/D oscillator         | You want the momentum of accumulation/distribution.      |

    *Common use:* "buy when OBV crosses above its own 20-period average" — volume
    leading the breakout.
  </Accordion>

  <Accordion title="Statistical & cycle — regression, midpoints, Hilbert cycles" icon="wave-square">
    | Indicator         | What it is                        | Use it when                                                 |
    | ----------------- | --------------------------------- | ----------------------------------------------------------- |
    | `LINEARREG`       | Linear-regression value           | You want the fitted "fair value" line through recent price. |
    | `LINEARREG_SLOPE` | Slope of that regression          | You want a clean up/down trend reading.                     |
    | `MIDPOINT`        | Midpoint of the last N closes     | You want a simple channel center from closes.               |
    | `MIDPRICE`        | Midpoint of the last N highs/lows | You want a channel center from the high/low range.          |
    | `HT_TRENDLINE`    | Hilbert Transform trendline       | You want an adaptive instantaneous trend line.              |
    | `HT_DCPERIOD`     | Hilbert dominant cycle period     | You want to gate trades by how fast the market is cycling.  |

    *Common use:* "long when the regression slope is positive", or a Hilbert
    cycle gate for fast-cycling regimes.
  </Accordion>
</AccordionGroup>

<Tip>
  Indicators stack. You can compute one on top of another — *"OBV crossing above
  its own 20-period moving average"* — and combine families with AND/OR, like
  *"50-EMA rising **and** RSI crossing above 40"*.
</Tip>

## Crossovers

Two of the most useful words you can say. A **crossover** is the moment one line
moves from below another to above it; a **crossunder** is the reverse. The lines
can be two indicators, an indicator and price, or price and a fixed level.

| Phrase                           | What it means                                             |
| -------------------------------- | --------------------------------------------------------- |
| *"EMA 9 crosses above EMA 21"*   | Fast average crosses over the slow one (a momentum flip). |
| *"close crosses above the VWAP"* | Price reclaims a reference line.                          |
| *"close crosses above 5000"*     | Price breaks a fixed level.                               |
| *"RSI crosses below 70"*         | An oscillator drops back out of overbought.               |

<Note>
  "Crosses above" fires only on the bar the cross happens — not on every bar the
  line stays above. That's what makes it an *event* rather than a *state*.
</Note>

## Special series builders

Beyond the classic indicators, AskFutures understands a set of purpose-built
series for session structure, ranges, levels, and rolling statistics. Describe
them in words; here's the catalog.

<AccordionGroup>
  <Accordion title="Session & intraday structure" icon="clock">
    | Series                           | What it is                                                           | Use it when                                                      |
    | -------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------- |
    | `vwap` (session)                 | Volume-weighted average price, cumulative from the session open      | You want the day's fair-value anchor for reclaim/fade ideas.     |
    | `vwap` (rolling)                 | VWAP over a rolling N-bar window                                     | You want a continuous VWAP that isn't reset each session.        |
    | `opening_range`                  | High/low of the first N minutes (or a clock window like 09:00–09:15) | You want an opening-range breakout.                              |
    | `intraday_range`                 | An aggregate (mean/max/min) over an intraday clock window            | You want, say, "the average close of the 08:30–09:00 window".    |
    | `intraday_high` / `intraday_low` | The session's running high/low so far                                | You want the live session extreme for reclaim or breakout logic. |
    | `time_between`                   | A time-of-day filter (e.g. 09:30–11:00)                              | You want to trade only during a window and ignore the rest.      |
  </Accordion>

  <Accordion title="Daily & prior-session levels" icon="calendar-day">
    | Series                 | What it is                                       | Use it when                                                      |
    | ---------------------- | ------------------------------------------------ | ---------------------------------------------------------------- |
    | `prior_sessions`       | High/low of the last completed session           | You want yesterday's session high/low as a breakout level.       |
    | `day_close`            | A prior day's daily close (offset 1 = yesterday) | You want "above yesterday's close" as a bias pivot.              |
    | `day_high` / `day_low` | A prior day's daily high/low                     | You want the prior day's high/low as support/resistance.         |
    | `day_range`            | An aggregate (max/min) over prior trading days   | You want "the highest high of the prior 10 days" for a breakout. |
  </Accordion>

  <Accordion title="Rolling statistics" icon="chart-simple">
    | Series               | What it is                                         | Use it when                                                          |
    | -------------------- | -------------------------------------------------- | -------------------------------------------------------------------- |
    | `rolling_percentile` | A series' own percentile over the last N bars      | You want "above its rolling 80th percentile" as a relative breakout. |
    | `rolling_zscore`     | How many standard deviations from the rolling mean | You want a mean-reversion fade (e.g. fade beyond ±2 sigma).          |
    | `rolling_corr`       | Rolling correlation between two markets            | You want to gate a pair/spread on how correlated the legs are.       |
  </Accordion>
</AccordionGroup>

## Prior-bar values (shift)

Many ideas compare *this* bar to an *earlier* one. Just say so — *"a new high
versus the prior bar's high"*, *"the close two bars ago"*, *"the 14-period RSI on
the previous bar"*. AskFutures shifts any series back by however many bars you
name. This is what powers breakouts, new-high/new-low logic, and bar-pattern
sequences.

## Cross-market, spreads & ratios

A strategy can read markets it doesn't trade, and it can trade the relationship
between two markets.

| Idea                | What it means                                    | Use it when                                               |
| ------------------- | ------------------------------------------------ | --------------------------------------------------------- |
| Cross-market read   | Reference another symbol's series in a rule      | *"Buy ES only when NQ is also above its VWAP."*           |
| Lead–lag            | Trigger off one symbol, trade another            | *"Go long ES when NQ crosses above VWAP first."*          |
| Spread (difference) | Trade `A − B` as one series                      | *"Trade the ES-minus-NQ spread; fade ±2 sigma."*          |
| Ratio               | Trade `A / B` as one series                      | *"Trade the BTC/ETH ratio's SMA cross."*                  |
| Calendar spread     | Front month minus a later month of the same root | *"Long the CL calendar spread above its 20-day average."* |

<Tip>
  Spreads and ratios behave like any other series — you can put an indicator, a
  z-score, or a moving average on top of them, and gate the whole thing with
  [rolling correlation](#rolling-statistics) so you only trade when the legs move
  together.
</Tip>

## Commitment of Traders (COT)

AskFutures can read **weekly** Commitment of Traders positioning as a series and
fold it into your rules. It's a slow, structural signal — updated once a week —
best used as a bias or filter, not a fast trigger.

| COT series        | What it is                                                | Use it when                                                              |
| ----------------- | --------------------------------------------------------- | ------------------------------------------------------------------------ |
| Commercial net    | Commercial longs minus shorts (the "smart money" hedgers) | You want a positioning bias — e.g. "buy when commercials turn net long". |
| Managed-money net | Speculative fund net positioning                          | You want to fade a crowded extreme (e.g. a 52-week high in net longs).   |
| Open interest     | Total weekly open contracts                               | You want to confirm a breakout with rising participation.                |

<Note>
  Micro contracts map to their full-size COT series automatically — `MES` reads
  `ES`, `MCL` reads `CL`, and so on. You can also smooth COT with an indicator,
  like "the 8-week SMA of commercial net positioning".
</Note>

## Putting it together

These pieces combine freely. A single rule can chain an indicator on a spread,
gate it with rolling correlation, and overlay a weekly COT bias:

> Trade the ES–NQ spread: short when its 20-bar z-score exceeds +2 **and**
> commercials are net short ES in the weekly COT — but only when the two markets'
> 30-bar rolling correlation is above 0.8.

You describe it; AskFutures assembles the right indicators and series and writes
the precise rule.

<Warning>
  Backtests built from these indicators and series are **hypothetical and
  simulated**, net of modeled slippage and commission. Past performance does not
  guarantee future results. Always test before you trade.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Strategies" icon="diagram-project" href="/concepts/strategies">
    How these pieces fit into entry rules, exit rules, filters, and parameters.
  </Card>

  <Card title="Risk & trade management" icon="shield-halved" href="/concepts/risk-and-trade-management">
    Stops, targets, trailing stops, and ATR-based exits.
  </Card>

  <Card title="Build a strategy" icon="hammer" href="/guides/build-a-strategy">
    Walk through turning an idea into a backtested strategy.
  </Card>

  <Card title="Is the backtest real?" icon="shield-check" href="/concepts/is-the-backtest-real">
    Why the same rules and data always produce the same numbers.
  </Card>
</CardGroup>
