This indicator displays the:
- Prior day high
- Prior day low
- Pre-market high
- Pre-market low
as a coloured line across the entire session for each individual session on an intraday chart.
For the extended session, this indicator marks the prior day and pre-market high low for each individual session starting at the pre-market and ending in the post-market, a feature not available on other indicators.
This indicator automatically marks out the levels for the prior day and pre-market high low for each individual session, allowing the user to observe how the price action behaves around the prior day and pre-market high low.
Note:
In this script, request.security() used with lookahead = barmerge.lookahead_on to fetch prices without offsetting the series by [1] for the extended session does not access future data. This is because for extended session, request.security() sees the start of the session to be at the start of the regular session and ends at the end of the pre-market, when in reality the session starts at the start of the pre-market and ends at the end of the post-market.
Hence in each extended session when the line is first drawn in the pre-market, request.security() returns the value of the prior day high/low, and not future data.