# OHLC chart, is it graphed on bid prices, ask prices or executed trades?

I have a stream of bid/ask market data and a stream of executed trades.

Quick question, as not too sure how to best approach this. To draw an OHLC chart, would I:

a) Base calculation entirely on observed bid prices over a time period (highest bid, lowest bid, and last bid during that period)

b) Base calculation entirely on observed ask prices over a time period

c) Base the OHLC chart on executed trades at price x doing the time period?

I have also seen someone on a metatrader forum mention off the cuff that:

Open: (bid + ask) / 2

High: highest bid

Low: lowest offer

Close: (bid + ask) / 2

So wondering which of all these it is?

Best regards,

• @gorge High: highest bid Low: lowest offer have you ever confirmed this to be true ? Mar 7, 2021 at 21:31

The Open - is the first traded price for the period.

The High - is the highest traded price for the period.

The Low - is the lowest traded price for the period.

The Close - is the last traded price for the period.

Any existing Bid/Ask prices remaining in the market depth have not been traded yet so can not be used to produce charts. So point (c) is your answer.

• Also, in corner cases (no trades during the period) the open and close would just be the last candle's close price, high would be highest bid, low would be lowest offer during the period; at least that's what CME does with its daily futures summary Nov 22, 2013 at 7:39
• @hroptatyr - usually most charts are represented by a single dash at the previous close price if there is no trade during a period. Nov 22, 2013 at 20:41
• so when they show a single value of price, are they taking the average, mean or some other measure to represent a single value Mar 27, 2018 at 6:46
• @PirateApp - a single value line chart is by default the last traded price for that period, however, some charting packages do allow you to change the default last price to one of the others (high, low or open). Mar 27, 2018 at 9:35
• @PirateApp - you don't calculate any price, you just use the actual traded prices. Most charting packages will provide the traded prices or you can usually download it from various sources. Mar 27, 2018 at 11:31

I would think it would be based on executed trades. Otherwise there would be lows of \$0.01 for most stocks from someone putting in ridiculously low, unrealistic offers.

This is a good old question. However, in recent versions of Metatrader-5, they provide THIS description for calculating candle sticks, based on intra-timeframe ticks. Here is one of the diagrams they use to describe it. It should be noted that all "points" are Bid points.

Additional info can be found here.

The question is very relevant for low volume trading. Whereas for high volume trading the trades as well as the spread between the bids and asks would be fairly close.

There are definitely mixed definitions for the terms Open, High, Low, and Closing used for OHLC charts. For instance, this source puts Open and Closing as trading prices, but High and Low as Ask prices (http://www.forex-charts-book.com/). But, for trading purposes, each of these terms have definitions, and they are each based on executed trades, not the order book (ie. not bids and asks).

I hope that helps out.

• As a side note: For those asking this question regarding cryptocurrency exchange API's, there is one major exchange that I found that defined its OHLC terms using the same definitions (support.kraken.com/hc/en-us/articles/…) Oct 3, 2020 at 8:25