if (Highs[2][0] > Highs[1][1]) { // do something }
Parameter name: index
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at NinjaTrader.Data.MemBars.GetOpen(Int32 index)
at NinjaTrader.Data.Bars.GetHigh(Int32 index)
at NinjaTrader.Indicator.DataSeriesHelper.get_Item(In t32 barsAgo)
i cannot use the following logic as the bars with missing data varies based on the instrument and i dont have a common ground.
if (CurrentBar < somebar)
return;
NT support pointed to this link but i cannot get my head on clear as to how to fix the code,
how do i check in my Highs[1] to see if data exists before doing the comparision?
Comment