# Other timeframes and markets

timeframe("4h", x) and symbol("ETHUSDT", x): a formula on other bars.

`timeframe("4h", x)` works `x` out on the 4h bars of the chart's market; `symbol("ETHUSDT", x)` on another market's bars, at the chart's timeframe or its own with `timeframe = "4h"`. The names of your script used inside are worked out on those bars too.

**A 4h average and the daily close on any chart**

```vex
name("Higher timeframe", where = chart)

fast = ema(close, 20)
plot(fast, "EMA 20")
plot(timeframe("4h", fast), "EMA 20 on 4h", color = orange, style = steps)
plot(timeframe("1D", close), "Daily close", color = blue, style = steps)
```

**Another market**

```vex
name("BTC in ETH")

eth = symbol("ETHUSDT", close)
plot(close / eth, "BTC / ETH")
```

- Each bar reads the value of the last other bar that had closed by its own close. A 1h bar at 13:00 sees the 4h bar that closed at 12:00, never the one closing at 16:00: history shows what was known then and nothing repaints.
- The newest bar reads the other bar still forming, so it moves live (on this chart's own market, with every trade).
- Where the other market has no bar (a closed stock market on a crypto chart) the value is empty: a gap, not an old value.
- Timeframes: 1m, 2m, 5m, 15m, 30m, 1h, 2h, 4h, 1D, 1W. Up to 4 per script.
- Not yet: BackQuant data on other bars, or these calls inside your own functions.

See also: [timeframe](/documentation/vex/reference/other-bars#timeframe), [symbol](/documentation/vex/reference/other-bars#symbol), [Coming from Pine Script](/documentation/vex/coming-from-pine-script)
