In fact the logic is that close price enter first in fibo2 equation:
fibo2 = (Close.GetValueAt(CurrentBar) - lowPrice0) / (Ncma - lowPrice0);
fibo2 is process in the big part not shown.
at the end of the big part nearclose which is a private double return a value.
the idea is to return that value (nearclose) in:
fibo2 = (nearclose - lowPrice0) / (Ncma - lowPrice0);
at the end of the big part nearclose return a new value that we send back again
fibo2 = (nearclose - lowPrice0) / (Ncma - lowPrice0); ... and so on.
The problem nearclose wont produce a value until Close.GetValueAt(CurrentBar) has been process first: fibo2 = (Close.GetValueAt(CurrentBar) - lowPrice0) / (Ncma - lowPrice0);
Thats why i thought by using two lists i could process both Close.GetValueAt(CurrentBar) and nearclose at the same time and then recycle nearclose again and again with for loop or while loop.
I am out of idea.
TY