Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What causes a null return from EnterShort and EnterLong"

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

    #16
    Check:


    and


    for an explanation when NT does terrificly decide to ignore totally valid order entries.

    It could easily be this bug. I ran into it using scaling positions, too.

    COnfirmed but - will be fixed AS SOON AS POSSIBLE, which I was informed is - in the NinajTrader world - NT7 (i.e. 6 months away).

    Comment


      #17
      As another info:

      If you turn TraceOrders on you see order entries made by NT on strategies.

      Then you also see when NT decides to ignore your entry, and why This is where in my examples the log entries came from.

      Comment


        #18
        Originally posted by NinjaTrader_Josh View Post
        NetTecture,

        My response was addressed to you not jlbishop. Austin was already working in baby steps to demonstrate the order of events and why it behaves the way it does to jlbishop.

        jlbishop,

        From Austin's response you will see printouts of this immediately:
        Code:
        before the market order[FONT=Courier New][SIZE=2]
        [SIZE=2][FONT=Courier New]after the market order, before the order token check[/FONT][/SIZE][/SIZE][/FONT]
        Now if you go to the next step and add Print()s into OnOrderUpdate() which is the event in which the IOrder object actually takes on the order you will see the prints from there come in after the print of your "after the market order". There is no "failure" in submitting the order, but rather the issue here is simply checking properties too early. You are trying to access Token properties when the token has not been generated yet. The generation is complete when you receive the first OnOrderUpdate() event.
        I understand you point and I think this is a valid concern but ultimately not the problem. I have checks in OnExecution() which should presumably be executed only after population of the token, but I never get there. I am interpreting this to mean that EnterShort() and EnterLong() aren't working....do you agree?

        John

        Comment


          #19
          jlbishop,

          If you are scaling in you need to bump up the EntriesPerDirection amount for your strategy. As for your nulls, it is simply that you cannot access something that does not exist yet. The object exists after you receive the first OnOrderUpdate() and that is what you need to wait for.

          Edit: No, I do not fully agree. OnExecution() events trigger when you receive actual executions. The generation of orders does not guarantee executions. Orders can easily be in rejected states, cancelled states, etc and you would never receive an OnExecution() event because they never occurred. You should check for orders in OnOrderUpdate().
          Josh P.NinjaTrader Customer Service

          Comment


            #20
            Originally posted by NetTecture View Post
            As another info:

            If you turn TraceOrders on you see order entries made by NT on strategies.

            Then you also see when NT decides to ignore your entry, and why This is where in my examples the log entries came from.

            I will turn it on - thanks! Hopefully that will give me a clue!

            John

            Comment


              #21
              Originally posted by NinjaTrader_Josh View Post
              jlbishop,

              If you are scaling in you need to bump up the EntriesPerDirection amount for your strategy. As for your nulls, it is simply that you cannot access something that does not exist yet. The object exists after you receive the first OnOrderUpdate() and that is what you need to wait for.

              Edit: No, I do not fully agree. OnExecution events trigger when you receive actual executions. The generation of orders does not guarantee executions. You should check for orders in OnOrderUpdate().
              I have EntriesPerDirection set to 4, so I should not have problems with 3 long/short entries, no?

              My concern is that I'm trying to figure out why a market order to go long/short doesn't result in an order or a fill......

              John

              Comment


                #22
                Check my links provided.

                I ran into the same. THere is a bug in the NT order handling - if you set up an order, cancel it, and then recreate it (even an hour later) with the same ID, supposedly.... the new order is IGNORED, you get null back.

                I had that:
                * Trying to cancel and recreate a stop. Had to move it instead.
                * Trying to scale in enter with a LIMIT. position changed, closed it. Next limit open would blow

                Comment


                  #23
                  jlbishop,

                  Please add prints to OnOrderUpdate() and you will see the changing order states for all your orders. TraceOrders will only tell you if an order is submitted and that is not enough information.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #24
                    And I am willing to bet it is totally enoguh information.

                    It will show a nice "Ignored" entry explaining why the order creation was ignored.

                    Comment


                      #25
                      Originally posted by NetTecture View Post
                      Check my links provided.

                      I ran into the same. THere is a bug in the NT order handling - if you set up an order, cancel it, and then recreate it (even an hour later) with the same ID, supposedly.... the new order is IGNORED, you get null back.

                      I had that:
                      * Trying to cancel and recreate a stop. Had to move it instead.
                      * Trying to scale in enter with a LIMIT. position changed, closed it. Next limit open would blow

                      Hmmmm....maybe tweaking the order signal name will work.....!

                      Comment


                        #26
                        Look NetTecture. Your evaluation is irrelevant for this case. Market orders are NOT handled by internal order handling rules that you have run into with your limit orders. You need to check in your own code which rule was violated for you to resubmit your limit order. We can work with you to figure out which exactly was violated, but please handle this case in your own thread.

                        Market orders are what jlbishop is issuing and as such he will NEVER receive the same ignore message as you have. Very possible to get different ignore messages though. jlbishop please share the output for us to be able to evaluate what exactly you are seeing.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #27
                          Which opens another question. SOrry to be so insistent.

                          But what are the OP and me supposed to do? Basically - and sorry for the wording - you tell us "**** up, we dont handle orders correct, come back next year". This is basically the reference to NT 7 - the beta is in September, which means a Release in Dezember to January. Next year.

                          Or is there any workaround that we can use that does NOT have significant implications (like using random signal names HAS - sorry to say, it totally munches statistics), or are you going to schedule a v12 release build that does handle orders correctly?

                          Or, sadly, do me and the OP have to look for another company to provide us with a trading platform handling simple order entry? Yes, sounds snappy, but sadly the most stressfull part of my trading strategies can not be implemented. I am in the same position as the OP

                          Comment


                            #28
                            NetTecture,

                            Your issue is not related to the issue jlbishop is trying to isolate. Your issue is with breaking an Internal Order Handling Rule somewhere in the process of your order submission which is why you had it ignored. There is no bug related to cancelling and resubmitting limit orders for entry. I suggest you go try it for yourself with one limit order where you cancel it and resubmit. It will work. For you to move forward you will need to track down exactly which rule was violated for you to be able to resubmit your limit order. Please find the rules on the bottom of this page: http://www.ninjatrader-support.com/H...tml?Overview36

                            Please open a new thread or go back to your original limit thread if you need further help on this because your concern is not related in any way to the issue jlbishop is working on here.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #29
                              Originally posted by NinjaTrader_Josh View Post
                              NetTecture,

                              Your issue is not related to the issue jlbishop is trying to isolate. Your issue is with breaking an Internal Order Handling Rule somewhere in the process of your order submission which is why you had it ignored. There is no bug related to cancelling and resubmitting limit orders for entry. I suggest you go try it for yourself with one limit order where you cancel it and resubmit. It will work. For you to move forward you will need to track down exactly which rule was violated for you to be able to resubmit your limit order. Please find the rules on the bottom of this page: http://www.ninjatrader-support.com/H...tml?Overview36

                              Please open a new thread or go back to your original limit thread if you need further help on this because your concern is not related in any way to the issue jlbishop is working on here.
                              You are aware that Bertrand HAS TOLD ME THIS IS A BUG?

                              I am seriously sorry, I have open threads, for both positions, and in both the information provided by YOUR HELP PEOPLE is that this is a KNOWN BUG.

                              Comment


                                #30
                                Fully aware. Bertrand said he believes it may have been related to the stop-cancel-resubmit bug and said he would confirm with me when I got in this morning. I have already clarified that this is NOT the same issue this morning in your thread. If this has caused confusion, sorry for that.
                                Josh P.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by argusthome, 03-08-2026, 10:06 AM
                                0 responses
                                108 views
                                0 likes
                                Last Post argusthome  
                                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                                0 responses
                                54 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
                                38 views
                                0 likes
                                Last Post TheRealMorford  
                                Started by Mindset, 02-28-2026, 06:16 AM
                                0 responses
                                75 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Working...
                                X