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 futtrader, 04-21-2024, 01:50 AM
        6 responses
        57 views
        0 likes
        Last Post futtrader  
        Started by sgordet, Today, 11:48 AM
        0 responses
        1 view
        0 likes
        Last Post sgordet
        by sgordet
         
        Started by Trader146, Today, 11:41 AM
        0 responses
        2 views
        0 likes
        Last Post Trader146  
        Started by jpapa, 04-23-2024, 07:22 AM
        2 responses
        16 views
        0 likes
        Last Post rene69851  
        Started by funk10101, Today, 11:35 AM
        0 responses
        1 view
        0 likes
        Last Post funk10101  
        Working...
        X