Skip to content
All library documents

Building Higher-Timeframe Candles on a Lower-Timeframe Chart

Article ProRealCode

Summary

This indicator overlays candles from a chosen higher timeframe onto a chart using a lower default timeframe. It aggregates lower-timeframe bars into higher-timeframe open, high, low, and close values, detecting when a new higher-timeframe bar begins. A shift input adjusts alignment so the plotted candles can be compared with the higher-timeframe chart.

Users can display ordinary price candles, Heikin-Ashi candles, or a background color based on candle direction. When Heikin-Ashi display is enabled, the indicator derives its candle values from the aggregated prices and notes that its initial values take time to converge. The example is configured for a multiple of the default timeframe, with an attached example intended for 200-tick candles; users must adapt the timeframe setting to their chart. The material describes plotting logic, not a trading strategy, and provides no performance evidence. Alignment and early Heikin-Ashi values are stated caveats.

Key ideas

  • The indicator aggregates lower-timeframe bars to plot candles from a higher timeframe.
  • A shift setting helps align the displayed candles with the higher-timeframe chart.
  • It supports price candles, Heikin-Ashi candles, and direction-based background shading.
  • Heikin-Ashi values at the beginning of the series may be inaccurate before converging.
  • The timeframe configuration must be adjusted to suit the chart and desired aggregation.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.