IS IT OK TO STILL HANG OUT WITH YOUR EX EVEN WHEN YOU TWO HAVE BEEN BROKEN UP FOR A WHILE?? I NEED ADVICE

Ok people so i have a big problem and i need advice!! well i have a incredible friend who is also my ex! and me and him get along great and everything but i cant stand when people tell me that its wrong to hang out with him because i dont see no problem with that just as long as were both single ya know. i mean i dont see any problem with it because we've known each other for about 3 years now and we have a great relationship. I honestly just see him as one of my best friends because we know everything about each other. so please tell me what u thin about this whole situation cuz i dont wana be making a mistake again!!