> ## 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.

# Timeframes, bars and sessions

> What a bar is, the timeframes you can trade, the three strategy types, and how rules anchor to a symbol's real trading session.

Every backtest is built from **bars** — fixed-length slices of price history. The
**timeframe** is how long each bar lasts (a minute, an hour, a day). The
**strategy type** decides whether you trade inside the day or hold across the
close, and the **session** is the symbol's real trading window that everything
anchors to. This page covers all four, and how they work together.

## Bars and timeframes

A bar summarizes everything that happened during one time slice. You pick the
timeframe in plain English — *"on 5-minute bars"*, *"daily chart"* — and
AskFutures uses it. If you don't say, it defaults to **1-minute bars**.

| Timeframe | Say it as        | Typical use                                   |
| --------- | ---------------- | --------------------------------------------- |
| `1m`      | "1-minute bars"  | Fine-grained intraday entries (the default)   |
| `5m`      | "5-minute chart" | Smoother intraday signals, fewer bars         |
| `1h`      | "1-hour bars"    | Intraday trend / regime filter                |
| `1d`      | "daily"          | Swing trades, multi-day breakouts             |
| `1w`      | "weekly"         | Long-horizon bias, Commitment-of-Traders data |

<Note>
  Intraday timeframes (`1m`, `5m`, `1h`) build their bars from the symbol's real
  trading session. Daily and weekly bars roll up the whole session into one bar
  each. Across all of them, prices come from back-adjusted continuous contracts —
  see [where the data comes from](/concepts/where-data-comes-from).
</Note>

### What's in a bar

Each bar carries five core fields, plus a few values AskFutures derives for you.
You refer to them in plain English — *"when the close is above…"*, *"when the
bar's range is wide…"* — and the engine reads the right field.

| Field                              | Meaning                              |
| ---------------------------------- | ------------------------------------ |
| **open**                           | First trade price of the bar         |
| **high**                           | Highest price during the bar         |
| **low**                            | Lowest price during the bar          |
| **close**                          | Last trade price of the bar          |
| **volume**                         | Contracts traded during the bar      |
| **range** *(derived)*              | high − low — how wide the bar is     |
| **days-to-roll** *(derived)*       | Bars left before the contract rolls  |
| **days-to-expiration** *(derived)* | Bars left until the contract expires |

<Tip>
  You can build rules straight from bar fields — no indicator required. *"Buy when
  the close is above the open for two bars in a row"* or *"only enter when the
  bar's range is more than 1.5× the average range of the last 10 bars"* both work.
  See [signals, indicators and series](/concepts/signals-indicators-series).
</Tip>

## The three strategy types

The strategy **type** decides how a position relates to the trading day. It's
separate from the timeframe — you can run a Day Trading strategy on 1-minute or
5-minute bars, for example.

<CardGroup cols={3}>
  <Card title="Day Trading" icon="sun">
    Intraday. Any position still open at the end of the session is **closed
    automatically** (flat overnight). The default for intraday ideas.
  </Card>

  <Card title="24h" icon="clock-rotate-left">
    Intraday signals, but **no forced close** — a position can be held across the
    session boundary until an exit rule fires.
  </Card>

  <Card title="Trade at close" icon="calendar-day">
    Daily or weekly. Decisions are made **on the close** of each day or week — for
    swing and positioning strategies.
  </Card>
</CardGroup>

If you don't specify, AskFutures defaults to **Day Trading on 1-minute bars,
flat at the end of the day**. Tell it otherwise and it switches:

* *"hold positions overnight"* → **24h**
* *"trade the daily chart"* / *"on the weekly close"* → **Trade at close**

<AccordionGroup>
  <Accordion title="Day Trading — auto-flat at the session end" icon="sun">
    Built for intraday ideas. Entries and exits run on intraday bars, and an
    end-of-day close is applied for you so you never carry risk overnight. You can
    still add your own stops, targets, and trailing stops on top — whichever
    triggers first wins, and the session close is the final backstop. Example:
    *"Trade MES on a VWAP cross and always close any open position at the end of
    the day."*
  </Accordion>

  <Accordion title="24h — intraday signals, held across the close" icon="clock-rotate-left">
    Same intraday bars, but positions are **not** force-closed at the session end.
    Use it when the idea genuinely spans the boundary — a breakout you want to hold
    overnight, or a market you think of as round-the-clock. Exits happen only when
    one of your exit rules fires.
  </Accordion>

  <Accordion title="Trade at close — daily / weekly decisions" icon="calendar-day">
    Decisions are made on the close of each daily or weekly bar — the natural fit
    for swing trades, multi-day breakouts, and Commitment-of-Traders overlays.
    Example: *"Go long GC on the daily chart only while the weekly close is above
    its 10-week average."*
  </Accordion>
</AccordionGroup>

<Warning>
  **"Day" means three different things.** Watch the context:

  * **DAY data** — the *daily* timeframe (`1d`): one bar per session.
  * **Day Trading** — the *strategy type* that closes positions at the session
    end.
  * **Day session** — the symbol's *real trading window* that bars and session
    tools anchor to.

  A Day Trading strategy usually runs on intraday bars (not DAY data) and flattens
  at the end of the day session. We spell out which one we mean wherever it could
  be ambiguous.
</Warning>

## Sessions and anchoring

A **session** is the symbol's real trading window — and it's not the same for
every contract. Equity-index futures, energy, grains, and metals each open and
close at different times. AskFutures knows each symbol's actual hours, so
anything that's "session-aware" anchors to the real open and close, not to
midnight or a generic clock.

That matters because several common tools reset or measure relative to the
session:

| Tool                     | Anchors to                 | Example                                               |
| ------------------------ | -------------------------- | ----------------------------------------------------- |
| **Opening range**        | The session open           | "the high of the first 15 minutes after the open"     |
| **VWAP**                 | Resets each session open   | "buy when price crosses above the session VWAP"       |
| **End-of-day exit**      | The session close          | Day Trading strategies flatten here                   |
| **Time windows**         | The session clock          | "only enter between 09:30 and 11:00"                  |
| **Running high / low**   | The current session        | "reclaim the session's running high after a pullback" |
| **Prior-session levels** | The last completed session | "push above the prior session's high"                 |

<Info>
  Session-anchored tools **reset** at each new session. The opening range is
  measured fresh every day; VWAP starts over at the open; a "first trade of the
  day" filter re-arms each session. That's what makes a rule like *"each day, buy
  the first time price makes two higher highs after the open"* behave the same way
  every session.
</Info>

## Multi-timeframe strategies

You can read a **higher** timeframe to set the bias and trade on a **lower** one —
the classic "trend filter gates the entry" pattern. AskFutures lines the two up
for you: the higher-timeframe condition has to be true for the lower-timeframe
entry to fire.

```mermaid theme={null}
flowchart TD
  HTF["Higher timeframe<br/>(daily / weekly / hourly)<br/><b>regime filter</b>"] -->|gate| ENTRY
  LTF["Lower timeframe<br/>(1m / 5m)<br/><b>trigger</b>"] --> ENTRY["Entry fires only when<br/>both agree"]
```

A few ways to phrase it:

* *"Only go long ES on the 5-minute chart when the **daily** 20-period EMA is
  rising; enter on a 5-minute close above the opening-range high."*
* *"Buy NQ on a 1-minute VWAP reclaim only when the **1-hour** RSI is above 50."*
* *"Take long GC trades on the daily chart only while the **weekly** close is
  above its 10-week average."*

<Tip>
  The higher timeframe is usually a *filter* ("only when…") and the lower one is
  the *trigger* ("enter on…"). You can stack more than two — weekly bias + daily
  confirmation + hourly trigger all in one strategy.
</Tip>

## Hypothetical results

<Warning>
  Backtest results are **hypothetical and simulated** — net of modeled slippage
  (default 1 tick) and commission. No bar-level model captures every real-world
  fill. Past performance, actual or simulated, does not guarantee future results.
  Always test before you trade.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Signals, indicators & series" icon="wave-square" href="/concepts/signals-indicators-series" />

  <Card title="Futures & symbols" icon="layer-group" href="/concepts/futures-and-symbols" />

  <Card title="Risk & trade management" icon="shield-halved" href="/concepts/risk-and-trade-management" />

  <Card title="Build a strategy" icon="hammer" href="/guides/build-a-strategy" />
</CardGroup>
