I am trying to understand Open-High-Low-Close (OHLC) data. Several sources agree in the following type of definition (Source):

An OHLC chart is a type of bar chart that shows open, high, low, and closing prices for each period. OHLC charts are useful since they show the four major data points over a period, with the closing price being considered the most important by many traders.

The inclusion of the term "period" suggests the existence of a discretisation scheme on top of the already discrete data that is the time series modelling the time price of an asset.

In order to make this post self-contained, let me keep the following definition handy (Source):

A time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data.

Given both definitions, how can I reconcile them?

A first non-formal attempt (open to corrections) would be as follows:

The price time series of an asset can be sourced with respect to a specified period of time of the form $[t_i, t_i + \Delta t], \Delta t > 0$. More specifically, 4 time series may be thought of. The open price of an asset is the price of the asset at $t_i$. The closing price of an asset is the price of the asset at $t_i + \Delta t$.

However, denoting the time period as $[t_i, t_i + \Delta t], \Delta t > 0$ seems to imply that this period is comprised on two discrete time points, with no possibility of data existing in between. This would make the definitions of the high and low prices difficult. Hence, I could think about the symbol $\Delta t$ simply as a time differential which does not preclude the existence of other time points in between.

It makes complete sense to me to use interval notation. And it also makes sense to come up with a formal definition that respect the basic example of the time period being one day: Open price for the day, closing price for the day, lowest/highest prices achieved during the day.

A second non-formal attempt could be as follows: Let $[t_o, t_c]$ with $c > o$ be an interval of time of length $\Delta t$, such that there exists four specific points of price data: The open price, or the price at $t_o$, denoted as $p_o$, the closing price, of the price at $t_c$, denoted as $p_c$, the lowest price of the interval, denoted as $p_l$ and the highest price of the interval, denoted as $p_h$, both of which occurred at specific points of time in the interval.

I think this definition makes sense. But then, is there a data problem in TradingView, for small resolutions? In the following figure I am looking at the price of the Bitcoin / U.S. Dollar pair at the Bitstamp exchange at a 1 minute resolution: enter image description here

The white line renders the open prices and the magenta line renders the closing prices. Why doesn't the close price at 16:59 match the open price at 17:00? Is it because the exchange simply sends this data even if it is incomplete? I have tried with a few different exchanges and this keeps happening. Is this a matter perhaps of traded volume?

Finally, what happens at a 1-second resolution? Is one second the smallest time differential or is there any sub-second data as a consequence of high-frequency trading?

  • 1
    $\begingroup$ OHLC data requires an accurate time clock (UTC or local time). "Ticks" occur at even intervals of (for example 5 minutes) (i.e. at 00:00:00.00, 00:05:00.000, 00:10:00.000, 00:15:00.000, etc.). The last trade that occurred on or before the tick becomes the "closing trade" for the previous interval, the first trade that occurs after the tick is the "opening trade" of the next interval. Of course these trades can have different prices. The High/Low are the max/min of the prices of all trades from the the opening trade (inclusive) to the closing trade (inclusive). HTH. $\endgroup$
    – nbbo2
    Feb 13, 2022 at 19:23
  • 1
    $\begingroup$ The OHLC values for an interval are not defined iff no trades occur in the time interval. That can happen at night or if the intervals are very small. Special handling is needed for these intervals (they can be omitted from the data or flagged as "empty" for example). $\endgroup$
    – nbbo2
    Feb 13, 2022 at 19:44
  • 6
    $\begingroup$ "Why doesn't the close price at 16:59 match the open price at 17:00?" For the same reason that "the last baby born in 2020" usually has a different name than "the first baby born in 2021". These are two different babies, one born slightly before midnite, the other slightly after. $\endgroup$
    – nbbo2
    Feb 13, 2022 at 19:46
  • 1
    $\begingroup$ Note that there is no standard for the naming of OHLC bars. Some people refer to the bar that goes from 3:00 to 3:05 as the 3:00 bar, while others call it the 3:05 bar. It is important to check whether a given price service (bloomberg, yahoo, etc.) uses the opening time of the bar or the closing time to identify (name) the bar. As I said, there is no consistency across vendors. $\endgroup$
    – nbbo2
    Feb 14, 2022 at 11:59

1 Answer 1


This is a good question, they are indeed two conventions for OHLC

  1. When there is a trading session with an opening auction, a continuous auction and a closing auction (have a look at Market Microstructure In Practice for details on auctions). In such a case, the definition is obvious: Open and Close are the prices of the Call Auctions, and the High and Low are the max and min of all the prices including Call and Continuous auctions.
    This is the origin of the OHLC "bars".
  2. Then, people started to bin prices and summarize them by OHLC. The convention is not very clean since:
    • for daily data, in most market there is an open price and a closing price (first and last), that are thus included in the bin
    • but when it is not the case, the left hand side of the interval should be excluded.

Think about the exchanges for Future contracts, that for most of them open 24h a day, then the "first" (and hence Open) price is just after 0:00 of day D-1, and the lest can be at 0:00 of day D.

Similarly, if you decide to bin intraday of Equities, usually you exclude the Call Auctions (otherwise you are not binning the intraday auction only), and then if you take $\Delta t$ intervals, they should be of the shape $((k-1)\Delta t, k\Delta t]$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.