On the support page, it states that IsFirstTickOfBar is only useful for OnEachTick and OnPriceChange.
https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?isfirsttickofbar.htm
Can someone explain how it’s useful for OnPriceChange, I would assume in order for it to return true the Price has to change on exactly the FirstTick of the bar, otherwise it won’t return true. And thus you can’t rely on it to trigger an action at the start of a bar.
if the OnBarUpdate is triggered by a change in price, then the property isFisrtTickOfBar will be true, if this tick is the first of the new bar, bcuz the bar update was only triggered by the price change. if you only care if the price hcanged, then this will be true. but if you care about each market data change (EachTick) then set your calculate method to be that…
if you need something else, ie in the OnMarketData event, then I have used a var to hold the timestamp of the OMDa event, and compare it to the incoming tick data, and the bar index, to determine if this incoming tick is for the new bar.