My concern is that OnBarUpdate() will be called when price changes but that is not necessarily coincident with the first tick of the bar.
The help guide for IsFirstTickOfBar seems to imply that there would not be missed events, but thinking about it I don't see why that would be true.
https://ninjatrader.com/support/help...ttickofbar.htm
// On a tick by tick strategy the only way you know when a bar is closed is when // the IsFirsTickOfBar is true. protected override void OnBarUpdate() { // Only process entry signals on a bar by bar basis (not tick by tick) if (IsFirstTickOfBar) { if (CCI(20)[1] < -250) EnterLong(); return; } // Process exit signals tick by tick if (CCI(20)[0] > 250) ExitLong(); }
Comment