Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter Order qty 0

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

    Enter Order qty 0

    Seems like any entry method I use, when I set the quantity to 0 it still fires 1 order.. Is there a way to write this so I don't have to check for 0 quantity all the time? This really a a pain when testing multi contracts with different stops..
    Last edited by gg80108; 10-24-2010, 12:19 PM.

    #2
    gg80108, can you please post the code you're using? What exactly are you trying to do? Unfortunately I do not believe it is possible to send an "order" for 0 contracts. I will have someone get back to you tomorrow.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Any of the order entry methods have this issue,,, if any Variable ie: Qty1........ is set to 0, it still fires a 1 contract order. Its easy to tell from the names of the entry signals printed on the chart whats firing... I manage the contracts separately and all entries have different names and dont trade all contracts all the time.

      Enclosed is the test on sample moving crossover code and I put in some parms on orders... Zeros fire 1 contract!

      // variable
      private int Qty1 = 0;
      private int Qty2 = 0;
      private int Qty3 = 0;
      .
      .
      .
      .
      .


      protected override void OnBarUpdate()


      EntryOrderS1= EnterShort(Qty1,"Flux S1");
      EntryOrderL1 = EnterLongLimit(0, true, Qty1, LowB , "Flux L1");
      Attached Files
      Last edited by gg80108; 10-24-2010, 02:15 PM.

      Comment


        #4
        You would need to ensure to submit with the correct qty - if you pass in 0, it would revert to 1 as an order with 0 qty just does not make any sense.

        Comment


          #5
          Correct quanity??? Sometimes the correct quantity is 0 since I don't always trade my 3 seperately managed contracts.. Please put in a request to development to make this work right.........

          Comment


            #6
            Thanks for the suggestion - for the time begin then please do not issue an order programmatically should you not with to trade that signal with full qty.

            Comment


              #7
              Why don't I just test for 0 before firing an entry and make it work right?

              Comment


                #8
                It works as expected on my end, an order with 0 qty is not an order unfortunately and would get rejected, thus we of course change to 1 qty, the min value. Please ensure in your code you only submit an order when you intend to trade.

                Thanks

                Comment


                  #9
                  Since u brought it up,, why doesn't it get rejected on my NT, then? take a look at the attachments....

                  Comment


                    #10
                    Sorry I dont follow you - I looked at your attachments, you submit for 0, which is not valid...since it's then changed to 1 it does not get rejected - this is the expected outcome.

                    Comment


                      #11
                      check out the attachment below,, Yesterday, 11:54 AM,, looking at the chart, didn't get rejected to me!

                      Comment


                        #12
                        Sorry, could you please repost the screenshot you were intending to show - it does not come up here.

                        Thanks

                        Comment


                          #13
                          I inputed a quantity on the sample moving ave crossover strategy.
                          Attached Files

                          Comment


                            #14
                            This is not valid for a qty of 0, thus it's being replaced by a qty of 1, same you would see if you start the SampleMACrossOver directly from the chart and tried adding a default qty of 0 > it would be replaced by a qty of 1.

                            Comment


                              #15
                              So did u really mean "order rejected" in ur previous comments,, since thats an official return status for order entry.... Its doesn't really reject.

                              "It works as expected on my end, an order with 0 qty is not an order unfortunately and would get rejected, thus we of course change to 1 qty, the min value. Please ensure in your code you only submit an order when you intend to trade."
                              Last edited by gg80108; 10-25-2010, 07:58 AM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              666 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              377 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              110 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              575 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              580 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X