zquad
Posts: 5
Joined: Fri Aug 19, 2022 12:45 am

Extended hours (premarket and after hours data) for intraday charts

I went through support and couldn't find examples.

For Highcharts Stock is there support for extended hours for intraday charts? Normal stock market activity is 9:30 am - 4pm America/New_York time but there is premarket and after hours trading (also known as extended time). Most other stock charting software has the extended time feature. eg.

https://pasteboard.co/JxLfUkWEYzYA.png

I am using epochmilli data for the intraday chart and one idea I had was to create multiple rectangles spanning 4:01pm to 9:29 am. The rectangles will have a low zindex so they will be behind the chart and a low opacity.

Anyone have code examples of multiple stationary rectangles set using epochmilli?
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Extended hours (premarket and after hours data) for intraday charts

Hello,

Welcome to our forum and thanks for contacting us with your question!

As dizzy wrote above, you can use plotBands to achieve this effect.

Demo: https://jsfiddle.net/BlackLabel/vw4f65y2/
API: https://api.highcharts.com/highstock/xAxis.plotBands

Let me know if you have any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
zquad
Posts: 5
Joined: Fri Aug 19, 2022 12:45 am

Re: Extended hours (premarket and after hours data) for intraday charts

Thanks a lot. That worked.
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Extended hours (premarket and after hours data) for intraday charts

That's great to hear! In case of any further questions, feel free to contact us again.
Hubert Kozik
Highcharts Developer

Return to “Highcharts Stock”