IsFirstBarofSession

If load 3 days of worth of bars on my chart. I have bars from: 18th May 18:01 until now(21st May 07:54). If I run the following code (with added 1 minute data series):

		    if (
			(Bars.IsFirstBarOfSession)
			&& (BarsInProgress == 1)
			)
	    {
			Print("Is first bar of session");

How come it only Prints twice and does not count the first bar on the chart as the first bar of tha session? Output:

Is first bar of session, Time = 19/05/2025 18:01:00
Is first bar of session, Time = 20/05/2025 18:01:00

If I’m not mistaken, it IS counting this as the first bar, which is the ETH trading hour start time. 18:00. The bar closes on 18:01 which is why it’s providing that as the output. It’s not printing out for May 21 because the range is only until 07:54, and doesn’t get to 18:00.

Is first bar of session, Time = 19/05/2025 18:01:00 = Session 20th May
Is first bar of session, Time = 20/05/2025 18:01:00 = Session 21st May 

The session for the 19th may which starts @ 18:00 on the 18th may is missing. Despite the first bar for this session being the first bar on my chart.

Do you have any code that would prevent using that very first bar? Like if CurrentBars < 1 → return;

Days loaded in NT is Not Trading Days.
It’s Physical Days (Including Sat/Sun)

If starting on a Wed, and load 3 days,
NT will load Wed/Tues/Mon not Sunday.

To get session start of Mon. (Sun Eve)
Might also need to include Fri as well.

On Sun, if want previous weeks values.
I suggest loading a minimum of 8 days.

Try increasing your Days Back loaded.
I usually add additional 3 days jic.

Be Safe in this Crazy World!
:smiling_face_with_sunglasses: