title : switching and reloading tabs consecutively index error
Hello everyone, happy new year and best wishes, may the markets listen to you this time,
I have 2 tabs on the same window with the same indicator working almost as desired, if it were not for :
when switching tabs and reloading multiple times consecutively, there is a System.ArgumentOutOfRangeException of this kind :
// for the below code line we get the following error :
double someDouble = Ypct(myCustomIndicator[1][1]); // where myCustomIndicator[1] is one indicator in an array of the same indicator for multiple frames, initialized dynamically // (would there be here a subtlety which would interfere with initialization when tab switch while reload consecutively ?).
// HResult=0x80131502
// Message=Index was out of range. Must be non-negative and less than the size of the collection.
// Parameter name: index
// Source=mscorlib
// StackTrace:
// at System.ThrowHelper.ThrowArgumentOutOfRangeExceptio n(ExceptionArgument argument, ExceptionResource resource)
// at NinjaTrader.NinjaScript.Series`1.get_Item(Int32 barsAgo)
// at NinjaTrader.NinjaScript.NinjaScriptBase.get_Item(I nt32 barsAgo)
// at NinjaTrader.NinjaScript.Indicators.A00indicators.A 03Analyzer.<OnBarUpdate>g__OBU_ini_coreFlagLists|6 6_1() in C:\Users\myUserName\Documents\NinjaTrader 8\bin\Custom\Indicators\A00indicators\A03Analyzer. cs:line 585
// at NinjaTrader.NinjaScript.Indicators.A00indicators.A 03Analyzer.OnBarUpdate() in C:\Users\myUserName\Documents\NinjaTrader 8\bin\Custom\Indicators\A00indicators\A03Analyzer. cs:line 521
// at NinjaTrader.NinjaScript.NinjaScriptBase.Update(Int 32 idx, Int32 bip)
the switching of tabs cause no issue if each tab is reloaded once the other has finished loading.
has anyone a clue about non-frenetically tab switchable-while-reloading script issues ?

Comment