Hello,
I am having a foreach statement:
foreach (var item in listm)
{
fibo2 = (item - lowPrice0) / (Ncma - lowPrice0);
}
Inside my list i have the current trading price:
var listm = new List<double>();
listm.Add(Close.GetValueAt(CurrentBar));
Later in the code i have a variable call nearclose. That variable return the equivalent of a new Close price.
Than i have another list:
var listN = new List<double>();
listN.Add(nearclose));
I want to be able to pass the result of listN into the foreach, replace listm by listN. But nearclose wont return a value until listm has been process first.
Than nearclose will return a second value that will return in listN to be pass into the foreach again, and a third value, and a fourth...
It should return in listm: 10
than listN: 10, 11, 12 ...
Is there a way to do that?
Thank you