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 rdtdale, Today, 01:02 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by alifarahani, Today, 09:40 AM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by RookieTrader, Today, 09:37 AM
        4 responses
        18 views
        0 likes
        Last Post RookieTrader  
        Started by PaulMohn, Today, 12:36 PM
        0 responses
        9 views
        0 likes
        Last Post PaulMohn  
        Started by love2code2trade, 04-17-2024, 01:45 PM
        4 responses
        41 views
        0 likes
        Last Post love2code2trade  
        Working...
        X