0

How would you do all kinds of time frames especially time frames where you have gaps in time over 24hr? Like accounting for close/swap on 24hr currency markets or commodities / indexes ?

clickhouse downsample into OHLC time bar intervals on stackoverflow

Shows how to do 1 minute but does not show how to-do different time frames or deal with swap / close time during 24hr.

How would one go about using time in golang with clickhouse so time.Time from golang could be used in clickhouse date where clause ?

vladimir
  • 13,428
  • 2
  • 44
  • 70
user10078199
  • 141
  • 2
  • 8
  • To define the arbitrary interval use [toStartOfInterval](https://clickhouse.tech/docs/en/sql-reference/functions/date-time-functions/#tostartofintervaltime-or-data-interval-x-unit-time-zone)-function. – vladimir Jun 16 '20 at 09:41
  • could you provide examples for close/swap, etc. cases (the origin data and required result)? – vladimir Jun 16 '20 at 10:13

0 Answers0