What is a timeframe in trading? Candles explained

By Oalgo · Last reviewed

A timeframe (also written "time frame") is the length of time one candle covers. On a 5-minute timeframe each candle shows five minutes of prices, on a 1-day timeframe one day. It is written 5m, 1h or 1d.

What does a candle show?

#
  • Open: the first price of the period.
  • High: the highest price of the period.
  • Low: the lowest price of the period.
  • Close: the last price of the period. It is only known when the candle ends, which is why a rule that reads it can be caught out by lookahead bias.

How does the timeframe change a rule?

#

Indicators and rules count candles, not minutes. A 14-period RSI looks back 14 candles, so how far back that reaches depends on the timeframe.

TimeframeCandles in one dayA 14-candle indicator looks back
1m1,44014 minutes
5m28870 minutes
15m963.5 hours
1h2414 hours
4h656 hours
1d114 days

A short timeframe gives many candles and, for many rules, many trades, and each trade pays fees and slippage. A long timeframe gives few candles, so a backtest needs a longer date range to hold enough trades.

Which timeframes can you set in Oalgo?

#

In Oalgo you set the timeframe in the strategy settings of the builder, as a number and a unit: minutes, hours or days, up to one week. The quick choices are 1m, 5m, 15m, 1h, 4h and 1d. A new strategy starts at 5m.

What can a timeframe not tell you?

#

A rule that looks one way on one timeframe can look different on another, because it is a different set of candles. No timeframe is right for every rule. Run the same rule on more than one and compare the reports.

Read next