I have the following piece of code:
if(IamHappy) { if(IaskforHelp) { Int IgetHelp = Bars.GetBar(Time[0]); } }
I used afterwards the container Series<int> container as well as int[] val1 = new int[x] container. In these cases, when I try to get the value of val1[1] for example, I get the value of the bar with the index 1 from IgetHelp, what is not what I wanted. Let imagine that I want to have the values of IgetHelp when one moving average crosses over another. The arrows in my case would not be one direct next another, but could be separated by either two or three or more bars.
How can I solve this problem so that:
1) The values of IgetHelp can be found in a container where ONLY these values must be and not also those of bars with indexes 1 or 2 just near to my arrows?
2) I can set the length of the container <List> to not higher than 5 for example before starting to save IgetHelp inside? Is that possible?
Is there a way to solve this problem differently?
Best regards
Comment