This will provide the desired assignment for currentValue:
var currentValue = pin1[i, 0] < 0 ? ++postNeg : ++postPos;