• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plots and rounding

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

    Plots and rounding

    I think this is more of a general C# question than a specific NT question, but I figure someone here will know the answer. Consider the following code:

    double x = 55.0819494948;
    double xx = Math.Round(x, 2);
    Plot0.Set(xx);

    Would the value of Plot0 be rounded to 2 decimal places, or would it have the full number of decimal places that double values have? Thanks.

    #2
    Hello Radical,
    It will be rounded to 2 decimal points.

    The Plot value will be 55.08.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rahul202, Today, 09:53 AM
    0 responses
    6 views
    0 likes
    Last Post rahul202  
    Started by U0000999, Today, 09:45 AM
    0 responses
    6 views
    0 likes
    Last Post U0000999  
    Started by Newtrader101, Today, 08:01 AM
    0 responses
    6 views
    0 likes
    Last Post Newtrader101  
    Started by Johnny Santiago, 10-11-2019, 08:21 AM
    6 responses
    103 views
    0 likes
    Last Post 4x777
    by 4x777
     
    Started by pjsmith, Today, 02:42 AM
    2 responses
    16 views
    0 likes
    Last Post pjsmith
    by pjsmith
     
    Working...
    X