All fixtures · From the Format page · format/26-chart-candlestick-with-a-moving-average.dh.md
Source
---
title: "Chart: candlestick with a moving average"
description: A fixture made from the Format page section of the same name.
---
## Chart: candlestick with a moving average
Another series with `kind: line` draws on top of the candles: here the average of the last three closing prices. It may use `y2` for a second axis, like any other chart.
```chart
kind: candlestick
title: Two weeks of a share price, with its 3-day average
x: { label: day, values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] }
y: { label: price, min: 90 }
series:
- name: price
data: [[100, 106, 98, 104], [104, 109, 102, 107], [107, 111, 105, 106], [106, 108, 101, 102], [102, 105, 97, 99], [99, 104, 96, 103], [103, 110, 102, 109], [109, 113, 107, 112], [112, 114, 108, 109], [109, 112, 106, 111]]
- name: 3-day average
kind: line
tone: 6
data: [null, null, 105.7, 105, 102.3, 101.3, 103.7, 108, 110, 110.7]
```
LLM view
---
title: "Chart: candlestick with a moving average"
description: A fixture made from the Format page section of the same name.
source: format/26-chart-candlestick-with-a-moving-average.dh.md
---
<!-- Made by dh llm from the source; nobody edits this file. -->
## Chart: candlestick with a moving average
Another series with `kind: line` draws on top of the candles: here the average of the last three closing prices. It may use `y2` for a second axis, like any other chart.
Chart (candlestick): Two weeks of a share price, with its 3-day average
Each row is one candle: the value at the open, the highest and lowest values reached, and the value at the close; up means the close is at or above the open. The other columns are lines drawn over the candles.
| day | open | high | low | close | 3-day average |
| --- | --- | --- | --- | --- | --- |
| 1 | 100 | 106 | 98 | 104 | |
| 2 | 104 | 109 | 102 | 107 | |
| 3 | 107 | 111 | 105 | 106 | 105.7 |
| 4 | 106 | 108 | 101 | 102 | 105 |
| 5 | 102 | 105 | 97 | 99 | 102.3 |
| 6 | 99 | 104 | 96 | 103 | 101.3 |
| 7 | 103 | 110 | 102 | 109 | 103.7 |
| 8 | 109 | 113 | 107 | 112 | 108 |
| 9 | 112 | 114 | 108 | 109 | 110 |
| 10 | 109 | 112 | 106 | 111 | 110.7 |Chart: candlestick with a moving average
Another series with kind: line draws on top of the candles: here the average of the last three closing prices. It may use y2 for a second axis, like any other chart.
Two weeks of a share price, with its 3-day average
Up: the close is at or above the openDown: the close is below the open
Show the numbers as a table
| day | Open | High | Low | Close | 3-day average |
|---|---|---|---|---|---|
| 1 | 100 | 106 | 98 | 104 | |
| 2 | 104 | 109 | 102 | 107 | |
| 3 | 107 | 111 | 105 | 106 | 105.7 |
| 4 | 106 | 108 | 101 | 102 | 105 |
| 5 | 102 | 105 | 97 | 99 | 102.3 |
| 6 | 99 | 104 | 96 | 103 | 101.3 |
| 7 | 103 | 110 | 102 | 109 | 103.7 |
| 8 | 109 | 113 | 107 | 112 | 108 |
| 9 | 112 | 114 | 108 | 109 | 110 |
| 10 | 109 | 112 | 106 | 111 | 110.7 |