Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

StrategyUpdateJob Error

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

    StrategyUpdateJob Error

    I have looked at the other posts related to this error and this one has a little different message associated with it.

    Failed to execute DB job 'StrategyUpdateJob': ObjectSpace: Entity Object not being Tracked

    It is a very simple moving average cross that I am having issues with on multiple timeframes and multiple markets.

    I have already repaired and reset my DB as well.

    Is there a quick answer to this problem or do I need to debug?

    thanks,
    Gary

    #2
    Can you reproduce this each and every time? If yes, can you provide exact steps? Please also do not do anything to your database or any other data for NinjaTrader.
    RayNinjaTrader Customer Service

    Comment


      #3
      Yes, This happens every time I run this strategy.

      It is a simple moving average entry/ exit. Cross above go long, Cross below, go short.

      I am trying to recode it to see if I can isolate the issue but it happens every time on exit.

      Hoping to see if this might be applicable to new NT7 code or if this is a plain old strategy error that I need to fix.

      Comment


        #4
        Please do not recode or change anything at this time. We will provide further instructions shortly.
        RayNinjaTrader Customer Service

        Comment


          #5
          - please make sure you are on latest NT7B6
          - could you please provide a reproducible scenario? Thanks

          Comment


            #6
            I am on NT7B6.
            I reinstalled completely from scratch this weekend. Deleted My Documents => NinjaTrader7 directory as well.

            scenario:

            Moving Average - 1 Cross Below Moving Average -2 Enter Short
            Moving Average - 1 Rising Exit Short

            Error

            You can reverse this for the long scenario.

            I need to go back to the initial version I posted from since I have made many changes prior to your request to wait.

            Comment


              #7
              Could you please post a (simplified?) version of your strategy which would exhibit this behavior? Thanks

              Comment


                #8
                Give me a few minutes to "Clean" it up :-)

                Comment


                  #9
                  here is a cleaned up version:

                  if(MovingAverage2 > MovingAverage1 && MovingAverage2previous <= MovingAverage1previous && MovingAverage1 > Threshold)
                  {
                  EnterShort();
                  DrawArrowDown("Short 1" + CurrentBar, true,0, High[0] + 7 * TickSize, Color.Black);
                  EnteredShort = true;
                  }

                  if (EnteredShort && MovingAverage2 < MovingAverage1 && MovingAverage2previous >= MovingAverage1previous)
                  {
                  ExitShort();
                  DrawDiamond("Exit Short" + CurrentBar, true, 0, Low[0] - 2 * TickSize, Color.Red);
                  EnteredShort = false;
                  }


                  NOTE:
                  I have not ran this since I have made these changes. Markets are a little slow right now.
                  Give me a little while and I will check on replay to ensure it still errors out.

                  Comment


                    #10
                    Thanks. To clarify: issue occurs on replay only? or on "any" feed?

                    Comment


                      #11
                      I have only run this so far on Zen-Fire in simulation mode.

                      Was planning on running it in replay later today.

                      Comment


                        #12
                        Thanks for clarification.

                        Comment


                          #13
                          Forgot to mention, this does not produce an error in the Strategy Analyzer.

                          First time I ran it in simulation mode was this morning and that was when I first noticed the error.

                          Funny thing was that the trades went ahead and executed properly even with the error, i.e. my Account Performance -> Trades showed the correct entry and exit points.

                          Comment


                            #14
                            Originally posted by gyoung View Post
                            here is a cleaned up version:

                            if(MovingAverage2 > MovingAverage1 && MovingAverage2previous <= MovingAverage1previous && MovingAverage1 > Threshold)
                            {
                            EnterShort();
                            DrawArrowDown("Short 1" + CurrentBar, true,0, High[0] + 7 * TickSize, Color.Black);
                            EnteredShort = true;
                            }

                            if (EnteredShort && MovingAverage2 < MovingAverage1 && MovingAverage2previous >= MovingAverage1previous)
                            {
                            ExitShort();
                            DrawDiamond("Exit Short" + CurrentBar, true, 0, Low[0] - 2 * TickSize, Color.Red);
                            EnteredShort = false;
                            }


                            NOTE:
                            I have not ran this since I have made these changes. Markets are a little slow right now.
                            Give me a little while and I will check on replay to ensure it still errors out.
                            Can you please post a complete (!) sample which would compile? Thanks

                            Comment


                              #15
                              I decided to try the new Beta Version and it seems to have resolved the issue.
                              Do not know if this is related to updates to the B7 code or otherwise.

                              On another note, I did have the same SQL issue that everyone else is experiencing.

                              I had to uninstall NT7 as well as delete the NinjaTrader7 directory.

                              Now it seems to work.

                              Will try to run it today and if I continue to have issues, I will post a working version of the strategy.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              608 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              355 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              105 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              560 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              561 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X