Basically (And I think it's the same for Greninja?), you get two "boosts", one is used automatically when you do up B, and the other is used if once the first is finished and you move in a different direction. So what you end up doing is moving away from the ledge to get same distance and space, and then moving back towards the ledge to complete, otherwise you'll just go once and not get enough height, which is what happened to me.