The best way to flip a psychedelic is to take a sufficient enough dose of the psychedelic that you somewhat forget your sense of self. Then you time it so that the MDMA takes effect at around about the same time that you come off the peak of the psychedelic and your sense of self begins to return. The return of your self (having been somewhat lost) combined with the influx of MDMA to your system, creates a beautiful sense of self and peripheral perception that directs the experience towards a gorgeous new ending.
You may well already know this, but a lot of people will tell you to take the MDMA and mushrooms in such a way that the peaks combine. This is not flipping a psychedelic. It is a misconception. Just think about the name candy flip, and what that implies. You flip the struggle of the first few hours with something that leaves a sweeter taste in your mouth. It's a metaphor for what the experience is meant to be.
I have taken the MDMA earlier so that the peaks combine and all it creates is a somewhat confusing, muddied, more intense experience. It might be a pretty cool thing to experience, but it just isn't anywhere near as cool as a successful flip.
I've also tried hippie flipping but the dose of mushrooms were never sufficient, so I just ended up with a kind of dirty, wired tale end to the mushroom experience.
Once I took mushrooms (2.5-3g dry Psilocybe semilanceata, which are more potent than cubensis) and can remember after a few hours the relief as I suddenly began to remember who I was and kind of thought "ahhhh yeah, that's it. I'm this guy. I have a personality and a character and I'm starting to remember who that is now". As it happens I didn't have MDMA at the time, but if you've experienced this sensation then know that this is the kind of state of being in a mushroom/LSD trip that is the ideal flipping territory.
When your ego returns, take ecstasy (or, ideally, take the ecstasy just before). With LSD this is at the 4~ hour point. With mushrooms I'd expect it to be at around the 2.5 - 3 hours point.
If anybody tells you to flip a psychedelic earlier, or the psychedelic happens to be too weak, then it just isn't the same experience that they're referring to. Fun, but ultimately a let down and not worth muddying the experience.