---
title: How do I use different time frames in a strategy?
slug: how-do-i-use-different-time-frames-in-a-strategy
docTags: 
createdAt: 2022-06-06T09:51:18.000Z
---

If you want to use a higher timeframe in your strategy, you have to use the `resize()` function.

This can be done in 2 ways:

**Resize a close and use this to calculate the ema**
This will update **every** candle

:::BlockQuote
close1H = resize(close, "1H")
ema1H = ema(close1H,21)
:::

***

**Resize an entire function**
This will only update every **resized** candle

:::BlockQuote
res = resInput("MTF", "1D", \["4H", "6H", "12H", "1D", "1W"])&#x20;
def std = resize(res)&#x20;
\{ stdev(close, ma\_len)&#x20;
}
:::

An example can be found in the public library. [Click here for the link.](https://app.tuned.com/editor/public/3531)





