How set spaces between candles (ohlc)

Hi,

Welcome to the community! :slight_smile:

As you noticed, your timestamps are not in a regular period, therefore they won’t be equally spaced. The alternative is to
resample the data and this would do (just pick an appropriate freq):

df.resample(freq).agg({"Open": "first", "High": "max", "Low": "min", "Close": "last"})

Hope this helps! :slight_smile:

1 Like