Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetMinMaxvalues and Infinite

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

    GetMinMaxvalues and Infinite

    When looking for values in a dataseries that is set to infinite, there appears to be no index value to search on.

    Is there a work around on this? Or can I set the size to a different value the 256?

    Highbanddata = new DataSeries(this,maximumBarsLookBack.TwoHundredFift ySix);

    Highbanddata = new DataSeries(this, maximumBarsLookBack.Infinite);

    Code:
            public override void GetMinMaxValues(ChartControl chartControl, ref double min, ref double max)
            {    
                if (Bars==null)    return;
    
                int lastBar        = Math.Min(this.LastBarIndexPainted, Bars.Count - 1);
                int firstBar    = this.FirstBarIndexPainted;
            
                min=Double.MaxValue;
                max=Double.MinValue;
                                                            
                for(int index=firstBar;index<=lastBar;index++)
                    {        
                    if ((index<=lastcalcbar) && (index >=Math.Max(1,startbar)))
                    {   
                    min=Math.Min(min,Lowbanddata.Get(index));
                    max=Math.Max(max,Highbanddata.Get(index));
                    }
                    }
            }

    #2
    tinkerz, unfortunately we do not support custom dataseries sizes, it will either need to be infinite or the 256 setting.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    601 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    347 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    559 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    558 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X