Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with OnCalculateMinMax()

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

    Problem with OnCalculateMinMax()

    I am not sure if I understand OnCalculateMinMax() .

    I have added the test method in my code ( Obviously I have also set IsAutoScale = true; in SetDefault state :

    Code:
    public override void OnCalculateMinMax()
    {
    // make sure to always start fresh values to calculate new min/max values
    double tmpMin = double.MaxValue;
    double tmpMax = double.MinValue;
    
    
    tmpMin = 68.50;
    tmpMax = 74.00;
    
    // Finally, set the minimum and maximum Y-Axis values
    MinValue = tmpMin;
    MaxValue = tmpMax;
    }
    I should expect the chart range set to 74.00 and 68.50.

    That's not what I get.


    #2
    Hello blar58,

    Thank you for the post.

    What is the result that you see?

    Have you also tried placing the script in a new panel where the only item being plotted is that item?


    I look forward to being of further assistance.

    Comment


      #3
      Jesse

      I see the whole chart range not the range set by OnCalculateMinMax()
      Attached Files

      Comment


        #4
        If I put the OnCalculate in a new panel it shows the right scale.
        But what I need to do is scaling the chart panel
        Attached Files

        Comment


          #5
          Hello blar58,

          If you have it in the price panel you would need to right click the chart -> Data series and uncheck auto scale. The DataSeries will also be autoscaled by the chart in that use case.

          I look forward to being of further assistance.

          Comment


            #6
            Thank you Jesse !

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            571 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            331 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            549 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            550 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X