public override void OnCalculateMinMax() { try{ if (Bars == null || ChartControl == null)return; } catch (Exception ex) { string exMessage = FormatExceptionMessage(ex); Print(exMessage + " CurrentBar: " + CurrentBar + "|ActiveBar: " + activeBar + "|idx: " + ChartBars.ToIndex + " [COLOR=#FF0000][B]MinMax2[/B][/COLOR]"); throw; } }
<EXCEPTION: Index was outside the bounds of the array.> at NinjaTrader.NinjaScript.NinjaScriptBase.get_Bars() at NinjaTrader.NinjaScript.Indicators.SectorJunky.sjMarketCapBasket.OnCalculateMinMax() CurrentBar: 340|ActiveBar: 340|idx: 340 [COLOR=#FF0000][B]MinMax2[/B][/COLOR] Indicator 'sjMarketCapBasket': Error on calling 'CalculateMinMax' method on bar 340: Index was outside the bounds of the array.
Comment