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
Bearski79
(Matthew Humphreys)
4 April 2024 20:40
2
Hi Jeff,
The link seems to load ok here, please give this one a try:
Hi All,
The following script can be used to mark out of session bars on an intraday chart. The following example has been setup using US Equities via IQ Feed. The session times are 9.30am to 4.00pm.
With the following script we can mark all bars outside of the above range as red, making them easy to identify.
//Find the full bar date with intraday decimals
V1 = BARDATE() ;
//Find the daily bar date, without decimals
V2 = ROUND(V1, DECIMALTYPE=0) ;
//Reduce bar date to intraday range only
V3…
There is an example script for colouring session times in / out of market there.
1 Like