In the screen shots I have a regular CME Index Futures chart, using the standard Trading Hours RTH session. On once chart (looking back 120 days) I get both First & Last Bars of sessions right up to the end....but when I change the lookback period to (in this example) 33 days, I do not get the last IsFirstBarofSession and IsLastBarOfSession.
The code is simple.....
protected override void OnBarUpdate()
{
if (BarsArray[0].IsFirstBarOfSession)
Draw.Text(this,"fb"+CurrentBars[0],"IsFirstBarofSess",0,High[0]+(15 * TickSize),false,"default");
if (BarsArray[0].IsLastBarOfSession)
Draw.Text(this,"Lb"+CurrentBars[0],"IsLastBarofSess",0,High[0]+(15*TickSize),false,"default");
}
....I did a 'reload' of historical data just before running this example, so I tend to think that the issue is not related to missing data. I also have been able to replicate this using different Trading Hours Templates....(I first noticed it on my 'custom' TH template that only inlcudes the European session (start 2am) and the standard Cash session. At the time I thought my session was set up incorrectly, but I can replicate this on the standard Ninja provided sessions.
EDIT: almost forgot....the data feed is NinjaBroker
Comment