Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get number of digits after decimal for a given Instrument?

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

    Get number of digits after decimal for a given Instrument?

    Hi is there a way to get the number of digits after the decimal for a given Instrument?

    I saw an old thread from 2007 saying the only way is to use tick size and substring it. I'm hoping that still isn't the case in 2024?

    Is there something like Instrument.Digits?

    TIA

    #2
    Hello defa0009,

    Thank you for your post.

    Can you explain further what you mean by "digits after a decimal for an Instrument"? What digits are you referring to in regard to an Instrument? The price?

    Comment


      #3
      For example BTCUSD has 2 digits after the decimal

      65000.50

      Tick size will give 0.01

      But is there something like Instrument.Digits to get number of digits after the decimal?

      In 2007 people were doing a tick size tostring substring on decimal and counting the string length to figure this out. Hopefully in 2024 we got something better?

      Comment


        #4
        Hello defa0009,

        There is no built-in method in NinjaScript to get this.

        Here is a more recent thread discussing it.

        Comment


          #5
          Thanks... NT should add it to their API as it's a common request. It exists in many other trading platforms APIs so it's a valid use case.

          Comment


            #6
            Thank you for your suggestion.

            Please use the link below to submit this request to our product team for consideration to implement in future releases:

            NinjaTrader Feature Request Form

            You can use this link for future feedback or features you'd like to see as well.

            Thank you again for your feedback on this item!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            566 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            547 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            548 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X