Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy Builder - Quantity

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

    Strategy Builder - Quantity

    Hello to all,

    Previously, when I was building a strategy using "Strategy Builder", under "Conditions and Actions" I used to go to Actions --> Order Manage --> Enter long position --> Quantity (set) --> Misc --> Numeric value and put the number. But now, I am not able to enter the numeric value for quantity. Could anyone help or guide me.

    Thank you and have a wonderful evening!

    Rube

    #2
    Hello Rubens_2020,

    Thanks for your post.

    The Strategy Builder was changed to remove the Misc>Numeric value so that you could more simply just delete "default quantity" and directly type in the quantity to use, however, we found that this was not consistent. This will be fixed in the next release of NinjaTrader8 so that you should be able to enter the value directly.

    In the meantime, there are two ways to deal with the quantity.

    1) Create a user input (int type) where you specify the quantity and then in the quantity filed click set and select user input (name of user input you created). This also allows you to change the quantity when you apply the strategy.

    2) Leave it as default quantity and when you apply the strategy, in the strategy parameters, look for the section "Order properties", locate the line "set order quantity" which will show "Strategy" and you can change it to "default quantity" and that will reveal the default quantity field that you can then directly change.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      I too have a question about the quantity of orders.

      I set an Input to Int, but how do I select 0? I have multiple options in the same strategy (Long/Short) and would like to select a quantity for both, so I have two Inputs. If I select 0 it automatically defaults to 1. So I can run any number above 1, but what if I want to run only Long or Short positions? I set the default value to 0 in the Inputs and Variables in Strategy Builder, but it never runs 0. How can I do that? I tried using a Double, but that did not work either. It would still run 1 contract even when selecting 0.

      Thanks
      David

      Comment


        #4
        Hello david196,

        Thanks for your post and welcome to the NinjaTrader forums!

        When you create an int entry in the strategy builder, observe that it will create both a "default" value of 1 and a "min" value of 1. If you do not change the value it will be 1. If you do change the value to be less than 1 then it (the strategy builder) will set it to the minimum value of 1.

        If you want to control which side takes a trade, at the time you apply the strategy, you can create two bool variables, that are set true by default. In the entry sets add the condition to check that the bool variable for that side (long or short) is true. When you apply the strategy you can simply uncheck the bool check box.
        Last edited by NinjaTrader_PaulH; 03-22-2021, 02:09 PM.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thanks, this is helpful!

          Comment


            #6
            Hello david196,

            Thanks for your reply.

            In case you have not seen these, here are the educational resource available on the strategy builder:
            Free live webinar every other Thursday at 4:00 PM EST, through this link to all webinars: https://ninjatrader.com/PlatformTraining
            Previous recording of the Strategy Builder 301 webinar: https://youtu.be/HCyt90GAs9k?list=PL...auWXkWe0Nf&t=2
            Help guide for the strategy builder: https://ninjatrader.com/support/help...gy_builder.htm
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Thanks Paul, I have been using the Help Guide and found the Strategy Builder 301 online as well, but was not aware of the Free live webinars. Something to look at, for sure.

              I have a couple of more questions on the Strategy Builder (but not related to order quantity), how do I create a new post? Is it "Send new message"? I thought that would send a message to a specific user...

              Thanks
              David

              Comment


                #8
                Hello david196,

                Thanks for your reply.

                To create a new topic, at the top of this topic you should see:
                Forum
                NinjaTrader 8
                Strategy Development

                You would click back to "Strategy Development" where you will then see all the topics and a new topic button.

                Looks like this:

                Click image for larger version

Name:	newTopic.PNG
Views:	728
Size:	18.2 KB
ID:	1147954
                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by cre8able, 02-11-2023, 05:43 PM
                3 responses
                236 views
                0 likes
                Last Post rhubear
                by rhubear
                 
                Started by frslvr, 04-11-2024, 07:26 AM
                8 responses
                113 views
                1 like
                Last Post NinjaTrader_BrandonH  
                Started by stafe, 04-15-2024, 08:34 PM
                10 responses
                46 views
                0 likes
                Last Post stafe
                by stafe
                 
                Started by rocketman7, Today, 09:41 AM
                3 responses
                11 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by traderqz, Today, 09:44 AM
                2 responses
                10 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X