In general, you should have 10-20% of your total profolio in cash. The allocation really depends on where you are in the market. Idea case is that you have a lot of cash close to bottom of the down turn, so you can buy a lot of asset in cheap. So, when the market turns positive, it is the time that you have min amout of cash (all invested).
We all know that one can not time the market, not to mention time it perfectly. So, do not get over influenced by the market timing. As long as you are having a good deal, take it.
However, the min amount of cash you should have is the amount that allows you to live your current life for 6 month. You never know what would happen (car accident, lose your job, etc.), so you need a reasonable cushion.
That cushion is also your reserve to catch a good financial investment opportunity. If you deplete your cusion by any reason, try to rebuild it as quickly as possible.