var w=sec.GetClosedPositions(i).TakeWhile(pos => pos.EntrySignalName == "short").Count();