Separating Market Hours

Good morning,

I am trying to find a way to separate/highlight price action into sections based on pre-market, open market and post market hours. I have tried searching this in the scripting forum assuming someone else has attempted this - there was one old post with a link by Matthew but it says the page has expired:

using LAST() for extended hours - Optuma Scripting - Optuma Community

I’d be open to vertical lines on the chart, a showbar, histogram… anything really. Can’t figure out how to script this one.

Thank you!

Jeff

Hi Jeff,

The link seems to load ok here, please give this one a try:

There is an example script for colouring session times in / out of market there.

1 Like