Trading hours for the primary instrument is CME US Index Futures ETH and this is occurring after the close of RTH.
I get the debug output below. Why is the CurrentBar 3 datetime stamp later than the datetime stamp of CurrentBar 4 ?
OnBarUpdate Time=9/22/2016 5:00:00 PM State=Historical CurrentBar=0 BarsInProgress=1
OnBarUpdate Time=9/23/2016 5:00:00 PM State=Historical CurrentBar=1 BarsInProgress=1
OnBarUpdate Time=9/26/2016 5:00:00 PM State=Historical CurrentBar=2 BarsInProgress=1
OnBarUpdate Time=9/28/2016 5:00:00 PM State=Historical CurrentBar=3 BarsInProgress=1
OnBarUpdate Time=9/27/2016 5:00:00 PM State=Historical CurrentBar=4 BarsInProgress=1
[COLOR=#0000ff][COLOR=#0000ff]public[/COLOR] [COLOR=#0000ff]class[/COLOR] [COLOR=#080808]kpTest1[/COLOR] : [COLOR=#080808]Indicator[/COLOR]
{
[COLOR=#0000ff]protected[/COLOR] [COLOR=#0000ff]override[/COLOR] [COLOR=#0000ff]void[/COLOR] [COLOR=#080808]OnStateChange[/COLOR]()
{
[COLOR=#0000ff]if[/COLOR] ([COLOR=#080808]State[/COLOR] == [COLOR=#080808]State[/COLOR].[COLOR=#080808]SetDefaults[/COLOR])
{
[COLOR=#080808]Description[/COLOR] = [COLOR=#b22222]@"Enter the description for your new custom Indicator here."[/COLOR];
[COLOR=#080808]Name[/COLOR] = [COLOR=#b22222]"kpTest1"[/COLOR];
[COLOR=#080808]Calculate[/COLOR] = [COLOR=#080808]Calculate[/COLOR].[COLOR=#080808]OnBarClose[/COLOR];
[COLOR=#080808]IsOverlay[/COLOR] = [COLOR=#0000ff]true[/COLOR];
[COLOR=#080808]DisplayInDataBox[/COLOR] = [COLOR=#0000ff]true[/COLOR];
[COLOR=#080808]DrawOnPricePanel[/COLOR] = [COLOR=#0000ff]true[/COLOR];
[COLOR=#080808]DrawHorizontalGridLines[/COLOR] = [COLOR=#0000ff]true[/COLOR];
[COLOR=#080808]DrawVerticalGridLines[/COLOR] = [COLOR=#0000ff]true[/COLOR];
[COLOR=#080808]PaintPriceMarkers[/COLOR] = [COLOR=#0000ff]true[/COLOR];
[COLOR=#080808]ScaleJustification[/COLOR] = [COLOR=#080808]NinjaTrader[/COLOR].[COLOR=#080808]Gui[/COLOR].[COLOR=#080808]Chart[/COLOR].[COLOR=#080808]ScaleJustification[/COLOR].[COLOR=#080808]Right[/COLOR];
[COLOR=#006400]//Disable this property if your indicator requires custom values that cumulate with each new market data event. [/COLOR]
[COLOR=#006400]//See Help Guide for additional information.[/COLOR]
[COLOR=#080808]IsSuspendedWhileInactive[/COLOR] = [COLOR=#0000ff]true[/COLOR];
}
[COLOR=#0000ff]else[/COLOR] [COLOR=#0000ff]if[/COLOR] ([COLOR=#080808]State[/COLOR] == [COLOR=#080808]State[/COLOR].[COLOR=#080808]Configure[/COLOR])
{
[COLOR=#080808]AddDataSeries[/COLOR]([COLOR=#080808]Data[/COLOR].[COLOR=#080808]BarsPeriodType[/COLOR].[COLOR=#080808]Day[/COLOR], [COLOR=#ff8c00]1[/COLOR]);
}
}
[COLOR=#0000ff]protected[/COLOR] [COLOR=#0000ff]override[/COLOR] [COLOR=#0000ff]void[/COLOR] [COLOR=#080808]OnBarUpdate[/COLOR]()
{
[COLOR=#0000ff]if[/COLOR] ([COLOR=#080808]BarsInProgress[/COLOR] > [COLOR=#ff8c00]0[/COLOR]) [COLOR=#080808]Print[/COLOR]([COLOR=#0000ff]string[/COLOR].[COLOR=#080808]Format[/COLOR]([COLOR=#b22222]"OnBarUpdate Time={0} State={1} CurrentBar={2} BarsInProgress={3}"[/COLOR], [COLOR=#080808]Time[/COLOR][[COLOR=#ff8c00]0[/COLOR]], [COLOR=#080808]State[/COLOR], [COLOR=#080808]CurrentBar[/COLOR], [COLOR=#080808]BarsInProgress[/COLOR]));
}
}
[/COLOR]

Comment