You can withdraw at any time, even if you have open positions, provided you're not withdrawing an amount that is required for your trading and 'free margin'. The free margin amount is constantly 'floating' since it reflects the floating profit or loss on your open positions.
Free Margin = Equity - Used Margin
You will be able to see the free margin on your account in your MT4 / MT5 terminal.
Making a withdrawal will reduce the free margin and margin level on your trading account and this can impact your open positions. If the account margin level falls below Stop Out level (E.g. Stop Out level for Advantage Account is 50%), open positions will begin to close automatically. It's important to have sufficient funds in your account to cover the floating losses in order to maintain these open positions.