Back to knowledge
Trading foundations6 min read

Foundations

Candles, timeframes, and trading sessions

Learn what a bar really represents and why session boundaries, timezones, and incomplete candles matter to an EA.

A candle is a summary of a path

An OHLC candle records an open, high, low, and close over a chosen interval. It does not show the order in which the high and low occurred. Two very different intrabar paths can produce the same candle, which is why a bar-only test can hide execution ambiguity.

Decide whether a strategy makes decisions on a completed bar or on every tick. Mixing the two unintentionally is a common source of look-ahead and live-versus-test differences.

Timeframe is part of the rule

A moving average on a five-minute chart and the same moving average on a one-hour chart are different measurements. A strategy specification should name the timeframe for every signal, filter, and exit rather than assuming the chart timeframe applies to everything.

  • Define whether the current or last completed candle is used.
  • Record the broker server timezone used by the platform.
  • Test session filters across weekends and daylight-saving changes.
  • Check how missing bars or market closures affect indicator state.

Sessions change the trading environment

Spreads, liquidity, volatility, and available instruments vary by session. A system developed during one active window may behave differently during a quiet period or at a rollover. Session filters should be tested as part of the strategy, not added as an afterthought.

Keep the session definition in one timezone and document how it maps to broker server time. That makes a configuration portable and reviewable.

Discuss this article

Ask a setup question, share a backtest, or compare notes with other algorithmic traders. Use a display name; your email remains private.

Create an account or sign in above to join the conversation.

Loading discussion…