Within the narrow context of trading and from a perspective of subjective introspection I'd suggest the time to quit is when you lose interest. Blowing your account one or more times or multiple series of consecutive losing trades draining your account will contribute to a lack of interest, but will not necessarily extinguish it. Clear evidence over a prolonged period that you are not making any money will not necessarily dampen your enthusiasm either.
From an objective viewpoint you won't fare much better as although there is the possibility others can see you for the damaged gambler you are and the obvious fact that you are losing on a consistent basis, they probably don't have the capability to accurately analyse what it is you know, or think you know, and see that you could make a success of the enterprise with a few tweaks here or there, regardless of your probabilities of ever discovering what these tweaks are and even if you do, how to implement them.
The statistics for failure rates in trading suggest the vast majority lose some or all of their capital. I don't have any counter to that and suspect it's correct. Not all of those that fail are stupid or unintelligent either as trading, as retail traders do it anyway, isn't that complex a task as far as I have been able to establish thus far. There's a lot of information to assess and there are rules to obey, but aside from that, I suspect the process of learning those rules and learning how to stick to them and getting comfortable with all the information you need to assess to make decisions is acquired at varying lengths of time due to all sorts of factors. Varying amount of time, varying amounts of startup capital and varying amounts of burn rate. If real capital is used in the process of acquiring those prerequisites the money may well run out before the tuition is complete.
The argument for cutting your teeth on a demo account are all valid, as are those for when and if to switch to real funds as that has a quantitatively different feel to it. But I think based on much of what I have read that the primary first step to failure is the lack of control of risk in the early stages of trading real capital and the sidelining of all those good rules that were so easy to stick to on the demo account which suddenly don't apply as you seek to avenge the first few bites the market inevitably will take out of you.
My answer has deviated from answering "The best time to quit" to suggesting "The best way to start" and I apologise for that as I know less than possibly anyone else here, but I thought I'd offer my views anyway.