var а = sec.Positions.GetClosedForBar(i);
foreach (var z in x)
{
if (z.EntrySignalName == "short")

x++;
}
так тоже не получается