I don’t use MT4, but I’ve programmed and backtested several systems in Excel. This is what I would do:
Use your “setup” as an entry order. Then run your system over the desired time-period. The amount of filled entries is the amount of time your setup occurred.
Its quite easy. Loop through each bar testing for the set up, and write the bar number, or date/time to a file each time a set up occurs.
Take a look at the MQL help file on writing data to a file.
There’s also loads of examples on various forums of scripts that write our indicator values to a file, these should be easy enough to modify. I do this all the time, and at the time the data being written, I also add a vertical line to the chart to help identify the setups.