Block the EA after X same trade consecutive in Y hour

 

Hi

I want that my EA, if make 2 or 3 consecutive trade es like 3 short in 3 hour ( where i can set the consecutive same trade, and hour) my Ea block the short operation for the day,so i can made long, but not other short in this day.

How i can do it?