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 kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    33 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    29 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    36 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    33 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    141 views
    0 likes
    Last Post SalmaTrader  
    Working...
    X