Sorry, I am not here to code for you. You can apply the suggested changes if you want. If the current code does not give alerts at all, then you need remove the current alert code and to uncomment the lines that produced the alerts. Apply the LastAlertTime check to that code to prevent multiple alert calls of the same signal.
Your conditions are checking whether the last alert time is not on the current bar, but your code never assigns the last alert time to any bar's time.
As I have said, you need to add this line to do that:
In your current code, I would add it after line 98 and line 90.