A brief background:
I have been divorced for 3 years now. My ex wife wants me dead, she made threats like "Both of us won't come out of this alive" near the end of our marriage. She has opened an assault case against me, the case is not over yet. In short, she made a huge scene one morning while dropping of my 5 year old, screaming for help and later sent my 5 year old to go look for help (like I had her handcuffed or something), seriously, I haven't seen someone behave like my ex wife did that morning. I went after my 5 year old since I do not want anything to happen to her, and of course, she's traumatized through the scene my ex wife made.
My ex wife wants to party, she had a new boyfriend which I actually liked apart from the fact that he was the lead singer of a band that had the following slogan "How much snake can you take". All the feedback I got from my 5 year was good. My ex wife sent him packing and is now on the market so to speak, partying away. My ex wife would drop my 5 year old at my parents place while not informing me, including my parents. At any point in time I have no idea where my 5 year old is, I can try and contact her mother, but she either, ignores the call, text or whatsapp. If I try and call on a wednesday afternoon to chat to my 5 year old, my ex wife would do say stuff like, she is in the bath, or she doesn't want to speak to you, she is playing outside. That trend ended up in me not calling anymore. I cannot trust a word my ex wife says.
My ex wife has no set schedule with me regarding when and where I may/may not see my 5 year old, it's always a game of ok, you can see her at 10am for instance on Saturday, then later on that day (Friday), she texts me to say that my 5 year old wants to be with me. I know, because I know the way she handles things, she didn't have an event planned on friday, but did manage to have an event at around 9PM on friday night. My ex wife does everything and anything she wants, I gave her a car and everything in the house we stayed in when getting the divorce. I literally left with my car and a bag full of my clothes.
Having an open assault case against me I have my hands tied behind my back, I can't say, display or hint to anything or she can go back and make some more trouble for me. Apologies for the way in which I try and explain things, I am very confused and miss my 5 year old badly. I am lucky that I get to see my 5 year old every weekend, but my question is the following: I am a programmer, I like to code until 3am or 4am, I might then sleep until 10am. When I wake up, I see a lot of calls made to and from my ex wife. Trying to get in contact with my ex wife is difficult as I've stated before. But, during those calls, my 5 year old asked my ex wife to come and fetch her, keep in mind, she was dropped off at 9:30pm friday night, at 10am saturday morning my 5 year old have already scheduled a move back to her mother. Who then knocks on the door a while later and leave with my 5 year old princess. Sometimes hours would go by while my 5 year old doesn't even tell me that she scheduled all this and pretend that nothing is going on.
I love my princess with everything I have inside, I do anything and everything to try and have a good relationship with her even though I do not know how to have a relationship to begin with.
Is there something wrong with me? I know I can't change anyone else, I learned that lesson with my divorce, I haven't had a girlfriend since. Is there something I can do to prevent my 5 year old from doing this, should I try to prevent this or is it better to have her with her mother if that is what she wants.
Any ideas are welcome, as I am alone, I live alone and wait for the weekend to be able to see my princess, I have no other reason to get up in the morning.