Implemented calcStopLoss