# Financial chart

**URL:** <https://forum.kx.com/t/financial-chart/12471>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [April 1, 2022, 6:52am UTC](https://forum.kx.com/t/financial-chart/12471 "2022-04-01T06:52:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MSHK1](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@MSHK1](https://forum.kx.com/u/MSHK1)\
**Post date:** [April 1, 2022, 6:52am UTC](https://forum.kx.com/t/financial-chart/12471/1 "2022-04-01T06:52:00Z")

</div>

Hi&nbsp;

I am trying to use financial chart.

My data sources are set up and the executed results are as attached in File 1.

Please advise why it cannot be plotted?

---

<div class="post-metadata">

**Author:** ![rocuinneagain1](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@rocuinneagain1](https://forum.kx.com/u/rocuinneagain1)\
**Post date:** [April 1, 2022, 4:08pm UTC](https://forum.kx.com/t/financial-chart/12471/2 "2022-04-01T16:08:00Z")

</div>

1. How are you trying to plot the data? table, bar, line etc. ?
2. Are you seeing an error? Why do you say it cannot be plotted?

&nbsp;

Common components to chart:

- Data Grid - KX Dashboards
- Canvas Chart - KX Dashboards

---

<div class="post-metadata">

**Author:** ![MSHK1](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@MSHK1](https://forum.kx.com/u/MSHK1)\
**Post date:** [April 6, 2022, 2:43am UTC](https://forum.kx.com/t/financial-chart/12471/3 "2022-04-06T02:43:00Z")

</div>

Hi,

I am trying to plot candlestick chart.

There is no error but nothing is showing up.

Please see the screen below or advise the steps?

thank you

---

<div class="post-metadata">

**Author:** ![davidcrossey1](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@davidcrossey1](https://forum.kx.com/u/davidcrossey1)\
**Post date:** [April 6, 2022, 2:51am UTC](https://forum.kx.com/t/financial-chart/12471/4 "2022-04-06T02:51:00Z")

</div>

Do you have any data coming back through your data source “temp”?

---

<div class="post-metadata">

**Author:** ![MSHK1](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@MSHK1](https://forum.kx.com/u/MSHK1)\
**Post date:** [April 6, 2022, 3:10am UTC](https://forum.kx.com/t/financial-chart/12471/5 "2022-04-06T03:10:00Z")

</div>

Hi,

Yes,

Please see from my screenshot below. It shows the executed results from data source temp.

&nbsp;

---

<div class="post-metadata">

**Author:** ![MSHK1](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@MSHK1](https://forum.kx.com/u/MSHK1)\
**Post date:** [April 6, 2022, 3:18am UTC](https://forum.kx.com/t/financial-chart/12471/6 "2022-04-06T03:18:00Z")

</div>

Hi,

Using the same data source, it can show on canvas chart but not on ChartIQ.

Why is this so?

---

<div class="post-metadata">

**Author:** ![davidcrossey1](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@davidcrossey1](https://forum.kx.com/u/davidcrossey1)\
**Post date:** [April 6, 2022, 6:05am UTC](https://forum.kx.com/t/financial-chart/12471/7 "2022-04-06T06:05:00Z")

</div>

A few things here;

1. You won’t see any bars as your open/high/low/close prices are all the same value. In your test data you need a range of prices over the course of a day (for example), then you would take the first/max/min/last (OHLC) per date
2. The documentation appears to be a little misleading with “Time” column. It should be a timestamp.

Here is a mock example I’ve just put together and a data source for reference

**Data Source**

n:10000; t:(Date:n?.z.p;price:n?100f;Volume:n?100f); delete price from update Open:first price, Close:last price, High:max price, Low:min price, Volume:sum Volume by `date$Date from t

**Preview**

Hope this helps

---

<div class="post-metadata">

**Author:** ![davidcrossey1](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@davidcrossey1](https://forum.kx.com/u/davidcrossey1)\
**Post date:** [April 7, 2022, 2:58am UTC](https://forum.kx.com/t/financial-chart/12471/8 "2022-04-07T02:58:00Z")

</div>

ChartIQ requires a separate licence to run.

Generally you should utilise the&nbsp;custom financial chart, or alternatively canvas charts/chartGL which both have candlestick charts built in.

---

<div class="post-metadata">

**Author:** ![MSHK1](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@MSHK1](https://forum.kx.com/u/MSHK1)\
**Post date:** [April 7, 2022, 3:21am UTC](https://forum.kx.com/t/financial-chart/12471/9 "2022-04-07T03:21:00Z")

</div>

Noted with thanks!
