Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaTrader Keeps Crashing after Update and/or Apex(Rithmic install)

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

    NinjaTrader Keeps Crashing after Update and/or Apex(Rithmic install)

    Hello,

    I finally updated to the latest version of NT8 on Sunday in order to set up an Apex account.

    I was making some changes to one of my strategies and when I ran it on playback it caused NinjaTrader to crash. (Needed Task Manager)
    Thought maybe it was something I did with my code, I spent hours trying to figure it out because it kept crashing randomly during playback. Sometimes right away, sometimes it would run through the whole day no problem but always crashed eventually.
    (I ran the exact same times over and over to try and figure out a pattern, seemed to not like when orders are entered but always at random times)

    Eventually tried an older version of my strategy that I've been running for about a month. Crashed again. Made a simple script with OnPriceUpdate. Just a simple Enter long when Close[0] > High[1].
    It crashes with that as well. Not really seeing anything off on the log but let me know and I can send it.

    The things that I did differently today:
    • Updated to newest version of Ninja
    • Installed Rithmic Trader Pro and set up my Apex account.
    • Swapped out my Lifetime License key for the provided Rithmic Key. (Had to do this to see the Rithmic connection. Need a multi broker Lifetime key)
    Let me know if this is a know issue. Or if there is a work around for this. Was going to start running the strategy live in the morning. But I am now hesitant with this new problem.

    Thank you,
    TradeSaber Inc.NinjaTrader Ecosystem Vendor - TradeSaber Inc.

    #2
    Have you downgraded to the previous release of NinjaTrader?
    (Apex/Rithmic will work just fine on that release.)

    My point is:
    Perhaps the issues with Playback Connection does not occur
    on the previous release?

    That is, are the issues you found solely due to NinjaTrader upgrade?

    Have you tried this?
    Downgrade to prior release but keep all the other changes you made
    (Apex/Rithmic/RTraderPro/License/etc) the same. Using your sample
    script, does the playback issue still occur on the prior release?

    -=o=-

    And, yes, please attach your simple script with OnOrderUpdate.

    Can you offer the simplest possible steps on how to recreate?
    • Which instrument?
    • How much replay data?
    • Which replay dates are you trying to trade?
    • What was the speed of the playback connection?
    Others, such as myself, would be interested in reproducing this, and would
    be very grateful and benefit greatly from your experience on how to do so.

    Comment


      #3
      Hello bltdavid,

      Thank you for the reply.
      I have not tried to revert back to the older version of NinjaTrader.
      Maybe I will try that later tonight if there is no other solution.

      I have never experienced this before the update.
      But then again, I did a few things at the same time so it makes it a bit difficult to fund the culprit.

      That is a good idea, I'll have to start crossing them off until I find the one causing issue!

      ---------------------------------

      The first script that was giving me problems, I was working with OnExecution and OnOrderUpdate.
      I was creating some trail stop conditions for multiple orders. I was following a similar concept to this:
      https://ninjatrader.com/support/help...rderupdate.htm

      I'm fairly new at creating orders like this, so I thought I was doing something on my end.

      However, I did try a simple Strategy Builder script after and the same issue occurs with any strategy
      Here is the last code I tried this with, just a basic trail stop:

      Code:
      //This namespace holds Strategies in this folder and is required. Do not change it.
      namespace NinjaTrader.NinjaScript.Strategies
      {
          public class BasicTrailSetExample1 : Strategy
          {
              protected override void OnStateChange()
              {
                  if (State == State.SetDefaults)
                  {
                      Description                                    = @"Example of a basic trail Set() method. Note that Fast Moving instruments may require higher trail stop than 10 Ticks. ";
                      Name                                        = "BasicTrailSetExample1";
                      Calculate                                    = Calculate.OnPriceChange;
                      EntriesPerDirection                            = 1;
                      EntryHandling                                = EntryHandling.AllEntries;
                      IsExitOnSessionCloseStrategy                = true;
                      ExitOnSessionCloseSeconds                    = 30;
                      IsFillLimitOnTouch                            = false;
                      MaximumBarsLookBack                            = MaximumBarsLookBack.TwoHundredFiftySix;
                      OrderFillResolution                            = OrderFillResolution.Standard;
                      Slippage                                    = 0;
                      StartBehavior                                = StartBehavior.WaitUntilFlat;
                      TimeInForce                                    = TimeInForce.Gtc;
                      TraceOrders                                    = false;
                      RealtimeErrorHandling                        = RealtimeErrorHandling.StopCancelClose;
                      StopTargetHandling                            = StopTargetHandling.PerEntryExecution;
                      BarsRequiredToTrade                            = 20;
                      // Disable this property for performance gains in Strategy Analyzer optimizations
                      // See the Help Guide for additional information
                      IsInstantiatedOnEachOptimizationIteration    = true;
                      TrailTicks                    = 10;
                  }
                  else if (State == State.Configure)
                  {
                      SetTrailStop(@"", CalculationMode.Ticks, TrailTicks, false);
                  }
              }
      
              protected override void OnBarUpdate()
              {
                  if (BarsInProgress != 0)
                      return;
      
                  if (CurrentBars[0] < 1)
                      return;
      
                   // Set 1
                  if ((State == State.Realtime)
                       && (Position.MarketPosition == MarketPosition.Flat)
                       && (Close[0] >= High[1])
                       // Condition group 1
                       && ((BarsSinceExitExecution(0, "", 0) > 1)
                       || (BarsSinceExitExecution(0, "", 0) == -1)))
                  {
                      EnterLong(Convert.ToInt32(DefaultQuantity), @"");
                  }
      
                   // Set 2
                  if ((State == State.Realtime)
                       && (Position.MarketPosition == MarketPosition.Flat)
                       && (Close[0] <= Low[1])
                       // Condition group 1
                       && ((BarsSinceExitExecution(0, "", 0) > 1)
                       || (BarsSinceExitExecution(0, "", 0) == -1)))
                  {
                      EnterShort(Convert.ToInt32(DefaultQuantity), "");
                  }
      
              }
      
              #region Properties
              [NinjaScriptProperty]
              [Range(1, int.MaxValue)]
              [Display(Name="TrailTicks", Order=1, GroupName="Parameters")]
              public int TrailTicks
              { get; set; }
              #endregion
      
          }
      ​
      Other things to note:

      I was using MES 03-23

      I was mainly working with ninZaRenko and uniRenko bars. (I will try regular time charts later today to see if I can replicate this)
      But I've never had this sort of issue with Uni or ninZa Renko before.

      I was mainly trying to playback a condition around 8:30am on Feb 03, 2023. Trying to come up with a solution for when multiple candles print all at the same time.
      Possible multiple entry and error conditions. However, I did try several different times and dates. Even more recent dates.

      I downloaded this playback(Historical Tick data) from my Kinetick account. Not sure if it matters, just trying to give as much info as possible.

      as for playback speed. Mainly around the 20-50x, But all the way up to Max. I restarted ninja more time than I remember.
      Sometimes it would playback no problem a full day. Then others, it was as soon as the first order was entered.

      Thank you for your interest in this issue! I will try more solutions tonight when the market closes and I will update if I find anything.
      Maybe it's just me doing something dumb.
      TradeSaber Inc.NinjaTrader Ecosystem Vendor - TradeSaber Inc.

      Comment


        #4
        Hello TradeSaber

        Please reach out to us at support[AT]ninjatrader[DOT]com with your log and trace files using the following steps:
        • Open your NinjaTrader folder under My Documents.
        • Right-click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
        • Send the 2 compressed folders as attachments on the email.
        • Once complete, you can delete these compressed folders.
        Spencer F.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        110 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        59 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        37 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        41 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        78 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X