Skip to content
All library documents

Building Five-Minute Candles from One-Minute Data

Article ProRealCode

Summary

The document explains an indicator that reconstructs five-minute open, high, low, and close values from a one-minute chart. A counter tracks the position within each five-minute interval; the open is taken from the interval’s first one-minute bar, while the high and low are accumulated from the bars included so far. The resulting values can be used by other indicators that need higher-timeframe coordinates, rather than relying on an approximate multiplier. The script also draws a candle when the interval completes.

The example is specific to five-minute aggregation and the author does not present it as a standalone trading signal. No comparison with native higher-timeframe data, validation results, or treatment of missing bars and session boundaries is provided. The displayed code therefore serves as an implementation example, not evidence that its reconstructed candles match every platform’s higher-timeframe candle conventions. Applying the idea to other intervals would require adapting the timing and aggregation logic.

Key ideas

  • The indicator derives five-minute OHLC values while running on one-minute data.
  • A counter identifies the current position within each five-minute interval.
  • The reconstructed values are intended for use by other indicators that need higher-timeframe inputs.
  • The example is limited to one interval and supplies no validation against native higher-timeframe candles.

Tags

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