This is really a grey area in terms of what people should do. Every situation is different. I think that usually the answer is
1) I'm still in love with my ex.
2) I am still hurting over the breakup.
3) I want to be friends so I can prove to him we belong together.
4) I would be very jealous if he started dating someone else.
5) I think we should still be together.
6) I have not moved on.
If any of these statements are true, walk away and take sometime to yourself to really move on and then come back and evaluate if these statements apply to you. Trust me, trying to be friends with an ex that you still want to be with will only lead to further heart break and prolong getting over them. Your intentions for staying friends with an ex should be that you understand that why did not work out, you don't want to be with them, and you believe there was a friendship there before you broke up that is worth continuing. There you have it. I'll do another post on how to stay platonic friends with an ex later on. Remember to love yourself!