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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    58 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    35 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    103 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    184 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    171 views
    0 likes
    Last Post CarlTrading  
    Working...
    X