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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        47 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        15 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        21 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X