Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market subscription high cpu usage/ninjatrader crash

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Market subscription high cpu usage/ninjatrader crash

    I use Ninjatrader as order execution method. Signals are sent through OIF. I use a python code for DLL interface that monitors markets and submits OIF files. I use market subscription through the "SubscribeMarketData" function. In some market conditions (specially mornings EST) if I choose to do this, the cpu usage goes crazy and Ninjatrader freezes. Anyone has a suggestion/fix?

    #2
    Hello Ray11,

    Thanks for your post.

    Please note that using python code with the DLL interface goes beyond the support we would be able to provide. Support for the API is very limited from NinjaTrader Support. We are not able to assist with any code in an application external to NinjaTrader. We are able to detail the usage of any methods available from the API.

    Lagging or freezing symptoms are indicative of your CPU getting overloaded. As a test to confirm the platform is operating as it should without being overloaded, I suggest to close all charts and workspaces and to open a simple chart that does not use templates, custom barstypes or has any indicators added. This chart should update as fast as we expect. If this test workspace is fast and yours is not, your workspace would be overloading your CPU.

    Remember that when there is increased volatility, NinjaTrader will have more to calculate and lagging symptoms can be more common if the CPU gets overloaded with too much work.​

    The impact NinjaTrader has on your PC will be dependent on how much NinjaTrader has to calculate. For example, having several charts with multiple complex indicators running can cause NinjaTrader to stutter and can cause short freezes. We typically advise the following as tips to improve platform performance.
    1. Configure charts so their Days To Load is an absolute minimum, just enough for your indicators to function properly
    2. Configure indicators to use Calculate.OnBarClose when possible as opposed to Calculate.OnPriceChange and Calculate.OnEachTick.
    3. Use less charts and less complex indicators
    4. Avoid using Tick Replay.
    Various performance tips can be found here — https://ninjatrader.com/support/help...ance_tips2.htm

    You may also wish to use the NinjaScript Utilization Monitor (Control Center > New > Output window > Right click > NinjaScript Utilization Monitor) This tool will tell you which components in your workspace are creating the most impact on your system.

    After you leave this utility running, the items on the top will be those that are taking the most CPU time. Reducing/eliminating these items will be bring the most performance improvement. Please note that some NinjaScripts, like ChartStyles, require drawing every visible bar with every render pass. Having a ChartStyle at the top of your utilization Monitor would be normal.

    I also suggest to use the Windows Task Manager to view other programs that are using your CPU, and to close resource intensive programs that are taking juice away that NinjaTrader would otherwise be using.

    This forum thread will also be open for other community members to share their insights on the topic.

    Please let us know if we can be of further assistance.​​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    56 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    132 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X