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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        60 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        146 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        161 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        97 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        284 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X