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

int input not accepting large numbers

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

    int input not accepting large numbers

    Hi,
    an int input parameter in NT8 does not accept the value 223456789. The finaldigit cannot be typed in. A value of 123456789 can be typed successfully.
    The number is below int.MaxValue, so it should be acceptable.

    This problem does not exist in NT7.

    Cheers,
    saltminer

    #2
    A 32-bit integer (int or Int32) can take all values between int.MaxValue and int.MinValue.

    For C# int.MaxValue takes the value 2.147.483.648, while int.MinValue takes the value -2.147.483.648.

    If you need to use values larger than int.MaxValue or smaller than int.MinValue, then you need to use 64-bit integers. For C# the values are

    Int64.MaxValue = 9.223.372.036.854.775.807
    Int64.MinValue = - 9.223.372.036.854.775.807

    Comment


      #3
      Hi Harry,
      thanks for that, but I'm reporting an NT8 behaviour glitch/bug, it isn't about the max value of int32.

      NT7 will accept a value while the same programming in NT8 will not. Something's up.

      I have coded a workaround in the meantime to use 'long' not 'int'.

      Cheers,
      saltminer

      Comment


        #4
        Where did you type that value in?

        I could try to reproduce it here.

        Comment


          #5
          Hello saltminer,

          Would you be able to provide a sample script demonstrating the problem in NT8 as well as the script for NT7 which does not cause an issue so I may test on my end please?

          I look forward to your reply.
          Alan P.NinjaTrader Customer Service

          Comment


            #6
            Hi,
            use this simple test indicator. It prints to the Output Window, but you don't even need that to see the fault. Just try typing in 223456789 and you are unable to type the 9 into the box.

            saltminer
            Attached Files

            Comment


              #7
              Actually the problem can be reproduced with any indicator that comes with an input parameter that is an integer.

              The behaviour of NinjaTrader is more than strange here:

              I enter a value of 231456789 (9 digits).

              Now I want to replace the digit "1" with a digit "0", Therefore I put my cursor next to the "1"and delete it. Afterwards I try to type in the "0" at the original position of the "1". This is not possible. Actually it is impossible to add a 9th digit after I have deleted the "1".

              The whole entry logic checking the integer input parameter is flawed. This is indeed a bug.

              You may just use a regular SMA or any other indicator to reproduce it.

              Comment


                #8
                Hello saltminer and Harry,

                I am able to reproduce and have passed this on to development in the form of a bug report.

                Thank you for your report.

                Please let us know if you need further assistance.
                Alan P.NinjaTrader Customer Service

                Comment


                  #9
                  Hello saltminer and Harry,

                  The maximum allowed integer input value in the UI is 99999999 (8 digits).

                  A update to the helpguide has been submitted.

                  Please let us know if you need further assistance.
                  Alan P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by agclub, 04-21-2024, 08:57 PM
                  4 responses
                  18 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by Irukandji, Today, 04:58 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post Irukandji  
                  Started by fitspressoburnfat, Today, 04:25 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post fitspressoburnfat  
                  Started by Skifree, Today, 03:41 AM
                  1 response
                  4 views
                  0 likes
                  Last Post Skifree
                  by Skifree
                   
                  Started by usazencort, Today, 01:16 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post usazencort  
                  Working...
                  X