1. Home
  2. Docs
  3. pjsProfileBars
  4. General feature notes
  5. Performance

Performance

Warn lagged data (option)
This option will provide an on-screen warning when it appears your data is lagging more than X milliseconds from your local PC clock (time zone independent). When using these functions, it is important to make sure your PC clock is up to date and well synced with a reliable and accurate source.

Drop lagged data (option)
Data lag can happen for various reasons. Volatility, with large enough amounts of data, is normally present, but the lag can be at the provider, or, on more modest machines, at the client side as Ninjtrader attempts to process all the tick data. pjsProfilebars is one of the fastest order flow analysis tools available, but it is often used in conjunction with third-party indicators, too, some of which may require a little more assistance. If enabled and the lag exceeds this value, pjsProfileBars will drop tick data to free up resources that Ninjtrader can use elsewhere. The goal of this feature is to keep you running, especially in a trade, rather than being 60 seconds (or far more in some cases) behind real pricing. The option will auto-disable once NT and the third-party indicators catch up. You would need to refresh the chart at a convenient time in order to display the dropped/skipped data.

Both options will show the real-time lag in milliseconds on the bottom left side of the chart if either option is triggered.

Be aware a small amount of lag is entirely normal. Data takes time to get from the exchange, through your provider, and on to your screen. The idea is to show warnings when this delay becomes abnormal. You can use the ‘Show debug info’ option below to monitor your own lag times for a while in order to find out what is ‘normal’ for you. Mainland USA, for instance, will typically have lower lag times for US indices than UK traders will have accessing the same data.

Min packets to trigger
Sometimes you might get a single delayed packet. You don’t want lag detection to trigger on that. The default here is 5. So, 5 consecutive lagged packets before warnings are triggered. 1 out-of-sequence packet happens from time to time, 5 consecutive ones do not, unless there is a data issue.

Pace of tape recalculate period
This is how often we recalculate the pace of tape metrics. Ninjtrader only refreshes the chart once every 250ms, so calculating more than this (such as on every tick) could be wasteful, given it is a resource-intensive operation

Enable caching
Tells pjsProfileBars to try and improve NinjaTrader graphics and calculation performance. If you experience any rendering issues after enabling this option, please report them via the Discord and disable the option. This option overrides some of NinjaTraders default rendering code and can provide significant performance enhancements, but it is unsupported by NinjaTrader. It is recommended to enable it, unless you have issues with it enabled (it is possible due to the huge variety of PC hardware and graphics cards, etc., that this feature will not be 100% compatible with everyone’s hardware)

Show debug info
Output debug data regarding the performance of the code at the bottom right of the chart. This will include things such as render timing and performance in Ninjatrader, enabling you to measure render latencies if you are tweaking graphics, etc.

How can we help?