Skip to main content
added 267 characters in body
Source Link
Kagaratsch
  • 12.1k
  • 4
  • 26
  • 79

Overlay moving averagea line plot onto a candlestick chart?

With the command CandlestickChart one can create charts such as

CandlestickChart[data] 

enter image description here

Let's say, we take the 20-period moving average of the closing values of each candle, and store it in a list called data20MA with the same DateObject time-stamps for the x-axis. How can we display both, the candle stick chart and the 20-period moving average line on top of each other in Mathematica 11.3? (I tried to Show the CandlestickChart with a DateListPlot, but it produced an erroneous picture.)

EDIT:

Perhaps a moving average is too simple for this question. More generally, if we have a list of values list computed for each time stamp of the price data, how can we overlay a ListLinePlot (or equivalent) of list with a candlestick chart of data?

Overlay moving average onto candlestick chart?

With the command CandlestickChart one can create charts such as

CandlestickChart[data] 

enter image description here

Let's say, we take the 20-period moving average of the closing values of each candle, and store it in a list called data20MA with the same DateObject time-stamps for the x-axis. How can we display both, the candle stick chart and the 20-period moving average line on top of each other in Mathematica 11.3? (I tried to Show the CandlestickChart with a DateListPlot, but it produced an erroneous picture.)

Overlay a line plot onto a candlestick chart?

With the command CandlestickChart one can create charts such as

CandlestickChart[data] 

enter image description here

Let's say, we take the 20-period moving average of the closing values of each candle, and store it in a list called data20MA with the same DateObject time-stamps for the x-axis. How can we display both, the candle stick chart and the 20-period moving average line on top of each other in Mathematica 11.3? (I tried to Show the CandlestickChart with a DateListPlot, but it produced an erroneous picture.)

EDIT:

Perhaps a moving average is too simple for this question. More generally, if we have a list of values list computed for each time stamp of the price data, how can we overlay a ListLinePlot (or equivalent) of list with a candlestick chart of data?

Source Link
Kagaratsch
  • 12.1k
  • 4
  • 26
  • 79

Overlay moving average onto candlestick chart?

With the command CandlestickChart one can create charts such as

CandlestickChart[data] 

enter image description here

Let's say, we take the 20-period moving average of the closing values of each candle, and store it in a list called data20MA with the same DateObject time-stamps for the x-axis. How can we display both, the candle stick chart and the 20-period moving average line on top of each other in Mathematica 11.3? (I tried to Show the CandlestickChart with a DateListPlot, but it produced an erroneous picture.)