F
Frankdot
Guest
Hello,
I want to process values in a list by order in a while statement. It need to listm.Add(previous2) First and than switch to listm.Add(previous). Right now Close.GetValueAt has a value, lets say 10 but nearclose has no value. Once Close.GetValueAt has been process first nearclose will get a value. How can i do that?
var listm = new List<double>();
listm.Add(Close.GetValueAt(CurrentBar));
listm.Add(nearclose);
while (listm.Count <= 4)
{
// nearclose cant return a value until Close.GetValueAt
has been process first. That is why previous2 must be
process before previous.
var previous = listm[listm.Count-1];
listm.Add(previous);
var previous2 = listm[listm.Count-2];
listm.Add(previous2);
}
Thank you
Continue reading...
I want to process values in a list by order in a while statement. It need to listm.Add(previous2) First and than switch to listm.Add(previous). Right now Close.GetValueAt has a value, lets say 10 but nearclose has no value. Once Close.GetValueAt has been process first nearclose will get a value. How can i do that?
var listm = new List<double>();
listm.Add(Close.GetValueAt(CurrentBar));
listm.Add(nearclose);
while (listm.Count <= 4)
{
// nearclose cant return a value until Close.GetValueAt
has been process first. That is why previous2 must be
process before previous.
var previous = listm[listm.Count-1];
listm.Add(previous);
var previous2 = listm[listm.Count-2];
listm.Add(previous2);
}
Thank you
Continue reading...