Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Crashing when running strategy

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

    Crashing when running strategy

    I don’t understand what’s happening here. I am using the strategy builder and have isolated the part where nt8 is crashing. It is not allowing if current market position = market position long then exit long trade by limit. It just freezes and crashes. I have used this on strategies before with no problem.

    #2
    So I've isolated it further. It turns out trying to set a profit target at all is causing the program to crash. I've tried it on two computers now. I don't see why its not working. This is what I have in the action part of the strategy builder.
    ExitShortLimit(Position.Quantity, (Position.AveragePrice - (TP)) , @"Short1Exit1", @"Short1");
    'TP' is an input type set as double. "Short1Exit1" and "Short1" are just the names of the signals. This code is crashing ninjatrader8 on two different computers.

    Any ideas?

    Comment


      #3
      Hello Shiner452,

      Thank you for your posts.

      To clarify, exactly when is the crash occurring? Does it happen when you're modifying your logic in the Strategy Builder or while you are attempting to run the strategy on a chart?

      If the latter, can you provide the strategy so I may test on my end? You can export the strategy from Tools > Export > NinjaScript Addon. Do not check the box to export as a compiled assembly or I will not be able to review the logic. Please attach the resulting .Zip file to your reply.

      Thanks in advance; I look forward to assisting you further.
      Kate W.NinjaTrader Customer Service

      Comment


        #4
        I cannot export it. I get the attached error
        Attached Files

        Comment


          #5
          The crash happens when the take exit order is supposed to be placed. Also, if I use a take profit from the stop loss and take profit section of the strategy builder the strategy will not in.

          Comment


            #6
            Hello Shiner452,

            Thank you for your reply.

            I suspect the crashing may be stemming from a third party script you may be referencing in your strategy.

            If you can attach the .cs file from Documents > NinjaTrader 8 > bin > Custom > Strategies, that would be helpful in seeing if that may be the case.

            Thanks in advance; I look forward to assisting you further.
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              I try to upload that too it just says Error uploading image.

              The part of the strategy with the third party indicator works fine. I can delete the 'exit long position with limit order' part and it will run fine. When I try to use the take profit part from the take profit/stop loss section of the strategy builder it won't run the strategy but the ninjascript output box says something like 'instance not named'. I'd have to try it again to see what the error message was but no matter what I do its not letting me put an exit or take profit order in.

              Comment


                #8
                Hello Shiner452,

                Thank you for your reply.

                Can you supply screenshots of how the strategy is currently set up and the errors that you are receiving? If I can't see anything about the strategy it is very difficult to understand what may be occurring.

                Thanks in advance; I look forward to assisting you further.
                Kate W.NinjaTrader Customer Service

                Comment


                  #9
                  Sure. Here is the screenshot of each strategy builder page. There is no error message on this one it just freezes when the the strategy starts and enters the short order. When shut down and log back in I'm in a short position which tells me that the short entry fires but the system errors out trying to set the exit order. See tab 2 on the actions part. This is 'On Price Change'
                  Attached Files

                  Comment


                    #10
                    So here I started a brand new strategy and there is nothing in it except this tab and it crashes.
                    Attached Files

                    Comment


                      #11
                      Hello Shiner452,

                      Thank you for your reply.

                      When you say it crashes, does it simply not place the limit order or do you get an error message on screen? If you are getting an error message regarding the strategy either in the log tab of the Control Center or in a popup, what is the full text of that error?

                      I would actually expect no limit order to be placed if you're trying to submit that at the same time you're submitting the entry order. This is because this will be triggered before the entry has the chance to fill. Exit orders would be ignored if they are placed before NinjaTrader gets confirmation of its position. I would suggest placing the exit in a separate condition set, and check the Current Strategy Position is a Short Position to trigger that being placed.

                      Thanks in advance; I look forward to assisting you further.
                      Kate W.NinjaTrader Customer Service

                      Comment


                        #12
                        Thanks! I split it to a second tab and I still get the problem. When I say it crashes I mean the the program freezes. There are no error messages. The mouse turns into the blue circle telling me it’s working and if I click the screen a windows box comes up saying ninjatrader is not responding and gives me the portion to close the program or keep waiting. I’ve waited a few minutes and nothing works. Crazy thing is it does this on two different computers. Have there been updates or something that I’m supposed to be on top of?

                        Comment


                          #13
                          Hello Shiner452,

                          Thank you for your reply.

                          At this point, I'd want to look at your log and trace files to see if there is any record of an error occurring.

                          However, we wouldn't want you to post those on the forum as they may contain publicly identifiable information. Instead, please send those in directly through the platform. You can do this by going to the Control Center-> Help-> Email Support. Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.

                          Please reference the following ticket number in the body of the email: 3560739 ATTN Kate W. Also, please supply a link to this post.

                          Thanks in advance; I look forward to assisting you further.
                          Kate W.NinjaTrader Customer Service

                          Comment


                            #14
                            Done! Is there a way for me to see the log and trace files myself?

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by f.saeidi, Today, 08:01 PM
                            0 responses
                            1 view
                            0 likes
                            Last Post f.saeidi  
                            Started by Rapine Heihei, Today, 07:51 PM
                            0 responses
                            3 views
                            0 likes
                            Last Post Rapine Heihei  
                            Started by frslvr, 04-11-2024, 07:26 AM
                            5 responses
                            96 views
                            1 like
                            Last Post caryc123  
                            Started by algospoke, 04-17-2024, 06:40 PM
                            6 responses
                            49 views
                            0 likes
                            Last Post algospoke  
                            Started by arvidvanstaey, Today, 02:19 PM
                            4 responses
                            11 views
                            0 likes
                            Last Post arvidvanstaey  
                            Working...
                            X