           now.position = now.trade
           now.extreme = now.price
           now.sar = now.price
-          now.openPrice = if now.trade then now.price
+          now.openPrice = if now.trade then now.price else 0
       last = now
     console.log last.return
 

      if @rollback < i # Set rollback maximum and minimum
        do =>
          t = parseInt data[i - @rollback][1]
          now.max = if last.max < t then t
          now.min = if t < last.min then t
      if last.position # SAR
        if i == data.length - 1 # Force cover at the end of day
          now.trade = -last.position
        else
          now.extreme = if 0 < (now.price - last.extreme) * last.position
          then now.price else last.extreme
          now.af = do ->
            t = last.af + (now.extreme isnt last.extreme) * @stepSize
            if t < @maxAF then t else @maxAF
          now.sar = last.sar + (now.extreme - last.sar) * now.af

          (1 + last.return) *
          (1 - now.trade * (now.openPrice / now.price - 1)) - 1
          now.openPrice = 0
      else if @cutoff < i # Consider opening a position
        if last.max <= now.price
          now.trade = 1
        else if now.price <= last.min
