Saving bar data with Open-time or close-time?

Discussion in 'Data Sets and Feeds' started by bretddog, Feb 1, 2012.

  1. bretddog

    bretddog

    For persisting data series to file/database, and coding in general, is it more convenient to use bar open-time, or bar close-time? I've been doing the latter, but after some thousands lines of code, I wonder if this should be changed.. A 60min bar closing at 00:00AM, will now obviously have the date of next day, so querying over a collection based on a date, doesn't give the correct first/last bars.. etc. for 24h series.

    So what do you use, and what other issues should be considered, if any?
     
  2. rosy2

    rosy2

    do something like the following to get 60 min bars for a day

    select bar from table where timefield=blah limit 24