Can I withdraw funds while having open positions?

Yes, you can. However, at the moment of processing your request, your free margin must exceed the amount specified in the withdrawal instruction including all payment charges. Free margin is calculated as equity minus the necessary margin (which is required to maintain an open position).