At "Safety settings" you will find following rules that should be added in following order:
1. Auto restart - set it to execute 5 minutes after midnight
2. Max profit/loss - set it to Stop placing new bets after max profit/loss is exceeded. Do not set it to pause strategy as paused strategies cannot be automatically started again
Then test it in simulation mode.