Make an EA when I get for example 50$ in 24 hours stop working and waits for next day

Hi there please make an EA when I got for example 50$ daily, the EA stops working and waiting for next day and starts working to get 50$ again and stops and wait for next 24 hours. is it possible?

24hours or when the new day starts?

I think having a daily profit target makes more sense. Right?