Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder Quantity entry based on close price

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

    Strategy Builder Quantity entry based on close price

    Is there a way in Strategy Builder to set the entry quantity based on price close? I want to set order quantity = 1000/close. So the entry quantity varies depending on close price. Thanks.

    #2
    Hello designer01,

    In the strategy builder to do any math this has to be done with the offset of a series.

    Add a custom int series object on the Additional Data page.

    In the first condition set with no conditions set the value of the int series on the current bar to 1000.
    Then set the value of the int series again, this time to the value of itself (select from the Misc -> Custom series), and in the Offset select the '/' for divide in the arithmetic type drop-down, and for the value click set -> Price -> Close.

    When selecting Exit long position with a market order, click to set the stop quantity, set this to Misc -> Custom series.
    Last edited by NinjaTrader_ChelseaB; 08-30-2022, 08:17 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea, I am following your instructions but on the Additional Data page under Custom Series it does not allow me to place a numeric value for 1000, only Name and Type. Am I missing a setting? See image below. Thanks.
      In the Script Editor should look like this...

      if (CrossAbove(Close, EMA1, 1))
      {
      Qty = ( 1000/ Close[0] ) ;
      EnterLong(Convert.ToInt32(Qty), "");

      }

      Click image for larger version  Name:	Qtity.jpg Views:	0 Size:	118.6 KB ID:	1213545
      Last edited by designer01; 08-28-2022, 09:01 PM.

      Comment


        #4
        Hello designer01,

        Series values are set in the Conditions and Actions in the 'Do the following section' in the Misc section.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Chelsea,
          I added a custom double series object on the Additional Data page but on the conditions Set does not show it, only shows User input and User variables on the list but no Custom Series for the double I placed under the Custom Series tab. Could you show me some screenshots of these method. I must be missing a step.
          I was able to do Qty = ( Close[0] /1000) ; but not the formula I want which is Qty = ( 1000/ Close[0] ) ;
          See image below. Thank you.

          Click image for larger version

Name:	Qtity-.jpg
Views:	133
Size:	175.2 KB
ID:	1213647
          Last edited by designer01; 08-29-2022, 03:12 PM.

          Comment


            #6
            Hello designer01,

            Add a custom int series object on the Additional Data page.

            In the first condition set with no conditions set the value of the int series on the current bar to 1000.
            Then set the value of the int series again, this time to the value of itself (select from the Misc -> Custom series), and in the Offset select the '/' for divide in the arithmetic type drop-down, and for the value click set -> Price -> Close.
            Screenshots attached.

            May I have a screenshot of the Additional Data page from your script?
            Attached Files
            Last edited by NinjaTrader_ChelseaB; 08-30-2022, 08:17 AM.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello Chelsea,
              Thank you works great!
              Where is a good place to learn this? Any advance Strategy Builder videos?

              Comment


                #8
                Hello designer01,

                There are not any advanced Strategy Builder videos on the NinjaTrader YouTube channel at this time.

                The 'Automate Your Trading with NinjaTrader's Strategy Builder' does discuss the only math available is with series.
                NinjaTrader's Strategy Builder empowers traders of all levels with point-and-click automated trading strategy development. Create your own advanced automated...



                With that knowledge a custom series has to be used to do any math operations, that becomes the building tool anywhere math is needed.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by rhyminkevin, Today, 04:58 PM
                3 responses
                48 views
                0 likes
                Last Post Anfedport  
                Started by iceman2018, Today, 05:07 PM
                0 responses
                5 views
                0 likes
                Last Post iceman2018  
                Started by lightsun47, Today, 03:51 PM
                0 responses
                7 views
                0 likes
                Last Post lightsun47  
                Started by 00nevest, Today, 02:27 PM
                1 response
                14 views
                0 likes
                Last Post 00nevest  
                Started by futtrader, 04-21-2024, 01:50 AM
                4 responses
                50 views
                0 likes
                Last Post futtrader  
                Working...
                X