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 zstheorist, Today, 07:52 PM
        0 responses
        3 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        149 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        5 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        5 views
        0 likes
        Last Post tkaboris  
        Working...
        X