• 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 lupearadu, Today, 01:58 PM
    2 responses
    4 views
    0 likes
    Last Post lupearadu  
    Started by nctpar, Today, 02:13 PM
    0 responses
    1 view
    0 likes
    Last Post nctpar
    by nctpar
     
    Started by rexmie888, Today, 01:47 PM
    0 responses
    4 views
    0 likes
    Last Post rexmie888  
    Started by aslane, Today, 12:41 PM
    0 responses
    4 views
    0 likes
    Last Post aslane
    by aslane
     
    Started by NinjaCustomer, 06-06-2018, 08:47 AM
    15 responses
    1,083 views
    0 likes
    Last Post cls71
    by cls71
     
    Working...
    X