I get an error message: NinjaScript File Error Code Line Column
NEWSDBA.cs Operator '-' cannot be applied to operands of type 'void' and 'double' CS0019 159 14
var listm = new List<double>();
listm.Add(Close.GetValueAt(CurrentBar));
var listf = new List<double>();
listf.Add(nearclose);
var list = new List<double>();
var listmAndlistf = listm.Zip(listf, (m, n) => new { item1 = m, item2= n });
foreach (var mn in listmAndlistf)
{
fibo2 = (list.Add(mn.item1 + mn.item1) - lowPrice0) / (Ncma - lowPrice0);
Print("num"+mn);
}
I thought it could be possible by using a combination of foreach and while loop:
while (listm.Count <= 4)
{ }
Cant figure out how to solve this one.
I just want to iterate both of my list seperatly throught the foreach. Than reiterate once more the result of nearclose into fibo2 multiple times.
The 9.5 and 10 are just examples, its the result of the variables that need to be fix.
What you dont understand is that i cant iterate listN in the foreach until listm has iterated first, otherwise nearclose get no result and listN is empty.
Than once nearclose has a result, listN has too and can be iterated thought the foreach to produce a new result.
Than you can use a for loop or while loop to reproduce a chain of iteration for listN and produce multiple results of nearclose.
ty