Sounds like some frayed wires going on in there. If it works fine when you hold it a certain way, it's because it's losing connection at the other angles. This could happen from the cable being stressed while plugged in (i.e. plug is on one side of the system but the outlet is on the other, so the cord pulls against its head), or from being loose in your bag and the cable getting crimped or otherwise damaged.

While replacement cords are expensive, it may not be a bad idea to start saving up to invest in one, as your current one may not last much longer. I leave my cords in loose pockets in bags as well, but I always wrap them. Find a wrapping scheme that works for you and stick with it.