Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a function that calculates round numers?

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

    Is there a function that calculates round numers?

    Hi,

    Is there a function (or a procedure) that calculates round numers?.

    For example, when EURUSD is at 1.4222, then I want to set a EnterlongStop order with price value of the first multiple of 0,0010. In this case at 1,4230.

    Or at the first multiple of 0,0100. In the same case at 1,4300.

    Thanks a lot in advance.

    #2
    Hi "CJS",

    You can use Math.Round for this. Something like...
    Code:
    Math.Round(1.4222, 3)
    More info at - http://msdn.microsoft.com/en-us/library/as4h66hd.aspx
    TimNinjaTrader Customer Service

    Comment


      #3
      I believe you can use the Math.Round() function provided by .NET

      Info here. Focus on this overloaded method.

      hope this helps.
      mrlogik
      NinjaTrader Ecosystem Vendor - Purelogik Trading

      Comment


        #4
        Thanks a los for the quick replies!!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        649 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        576 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X