Your math is incorrect, you want setStopLoss(entryPrice * .95) in order to set it 5% below the entryPrice.