Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

minimum or maximum rounded

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

    minimum or maximum rounded

    hi, anyone can suggest me how to code
    for minimum or maximum rounded.


    the code already exists, or I have to create me?

    thanks..

    #2
    Hello,

    Thank you for the question.

    Rounding can be accomplished using the Math.Round method: https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
    Also the Math.Min and Math.Max can be used here :



    Code:
    double value1 = Math.Round(12.3456,2);
    double value2 = Math.Round(15.3332,2);
    
    double minValue = Math.Min(value1, value2);
    double maxValue = Math.Max(value1, value2);
    
    //outputs minValue 12.35 maxValue 15.33

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      i mean that pics.....
      Attached Files

      Comment


        #4
        Hello esignal,

        Thank you for your response.

        I am not familiar with an indicator that plots in such a manner. It would seem you would need to implement your own code for this type of plotting.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by hazylizard, Today, 08:38 AM
        0 responses
        0 views
        0 likes
        Last Post hazylizard  
        Started by Max238, Today, 01:28 AM
        5 responses
        42 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by giulyko00, Yesterday, 12:03 PM
        3 responses
        12 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by habeebft, Today, 07:27 AM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_ChristopherS  
        Started by AveryFlynn, Today, 04:57 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Erick  
        Working...
        X