Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

QuantityUpDown Control

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

    QuantityUpDown Control

    In an AddOn, using the QuantityUpDown control is very handy. Thanks!

    Some questions:
    • Why does the value of a QuantityUpDown control with a value of zero oscillate between values of zero and 1 when the down-arrow is clicked successively?
    • In the Basic Entry window, the QuantityUpDown control defaults to various quantity increments for different instruments. How may one obtain the same functionality using a QuantityUpDown control in an AddOn?
    • Setting the Instrument property of the control does not seem to have a useful effect. In fact, when set, it seems to make using the control problematic in that choosing a selectable value from the "calculator" will select that value and allow one to increment/decrement it; but once at a value of 1, it seems to prevent any further increment/decrement. If one does not set the Instrument property, any value can be selected and increment/decrement work as expected. Is this what one should expect?
    Thanks.
    Multi-Dimensional Managed Trading
    jeronymite
    NinjaTrader Ecosystem Vendor - Mizpah Software

    #2
    Hi jeronymite

    I'm trying to play also with the QuantityUpDown Control in the DOM, in that case in the limit orders that one can use in level 2 cells. I'm not able to find how to access this area. I ask you because seems you are playing with similar controls and maybe can help me to find them. Here is my question to NinjaTrader:

    Hi Team, I'm a little lost trying to find the automation ID, or how to access the price levels on the DOM and the quantity up/down in limit orders at the DOM. In the Chart Trader was easy to find the Automation ID, but at the DOM I'm not able to find it. All that I try was failed. See attached pictures... What I need is to


    but si out of support and maybe you or another member can help me to find this.

    Thank you so much

    Comment


      #3
      Hello jeronymite,

      I am not able to reproduce this behavior with a test script.

      Quantities should be whole numbers.. Are you wanting decimal values for the quantity?



      Are finding this test attached script is reproducing the behavior on your end?
      Attached Files
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Hi Chelsea. Couldn't find a test script in your response. Nevertheless, I have seen the AddOnFramework example demonstrate the 0/1 oscillation.

        Not wanting decimal numbers, just whole integers. But would like the "predefined" values based on Instrument type that happen in Basic Entry.

        Thanks.
        Multi-Dimensional Managed Trading
        jeronymite
        NinjaTrader Ecosystem Vendor - Mizpah Software

        Comment


          #5
          Hello jeronymite,

          Apologies for not attaching the script. Post above has been edited.

          I think I am understanding the issue, the quantity should always be 1 or greater and clicking the down arrow is able to set this to 0 which would be an invalid quantity. Further, when 0 and clicking down it sets it to one.

          I will submit a feature request for QuantityUpDowns to not allow a value below 1 when clicking the down arrow.

          As far as setting a default value based on the instrument type, you could check the instrument type.
          Code:
          For example:
          if (Instrument.MasterInstrument.InstrumentType == InstrumentType.Stock)
          {
          myQuantityUpDown.Value = 100;
          }
          Last edited by NinjaTrader_ChelseaB; 11-02-2020, 10:40 AM.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Hello jeronymite,

            I found there is a <QuantityUpDown>.Minimum that can be set to prevent the quantity from having a value of less than 1.

            For example:
            Code:
            myQuantityUpDown.Value = 1;
            myQuantityUpDown.Minimum = 1;
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Thanks, Chelsea. I appreciate you looking into this. Your observations are helpful.

              What is the purpose of the Instrument property of the QuantityUpDown control? And why does the Value essentially freeze at 1 when an Instrument is set?

              Thanks.
              Multi-Dimensional Managed Trading
              jeronymite
              NinjaTrader Ecosystem Vendor - Mizpah Software

              Comment


                #8
                Hello jeronymite,

                I don't think the Instrument has a purpose for addon scripts and may be used for something in the core code.

                I am not able to reproduce freezing.

                Below is a link to a video.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                607 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                353 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                560 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                561 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X