for(int i= MyList.Count - 5 ;i<MyList.Count;i++) { Print(" " + MyList[i]); }
Commented out I get these prints:
//for(int i= MyList.Count - 5 ;i<MyList.Count;i++) //{ //Print(" " + MyList[i]); //}
MyList.Count 25222
CurrentBar 25241
MyList.Count 25223
CurrentBar 25242
MyList.Count 25224
CurrentBar 25243
Something like:
Print("MyList Items Bars index " + Bars.GetBarIndex(MyList.Count - 5) );
MyList.Count 25222
MyList Items Bars index ??
CurrentBar 25241
In order to perform this kind of bars check:
if (CurrentBar < Bars.GetBarIndex(MyList.Count - 5)) return;
Comment