A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
The linked-to file below is your data from your Book1.xlsx but with corrected dates/times.
It's a mess because it's work in progress (I put formulae I'm experimenting with in separate columns so that I can see where they might be going wrong, before trying to put them all together into as few formulae as possible (often only one formula ultimately)).
This is only the long trades.
In this sheet, the cell F1 (green) is an input cell for you to input the interval you want to explore (50 minutes at the moment). The sheet should recalculate (slowly-at the moment!; don't use 2 minutes - it takes ages to recalculate).
The results are showing in columns N:O at the first row of each interval. Very few positive results because most trades are thrown out on the first bar of the interval because the low is lower than the open.
I recommend putting calculation to manual to prevent repeated (slow) recalculations.
I've hidden columns H:M. These are single cell formulae which process all the rows.
The results in columns N:O are formulae in column N which spills one cell to the right, which go down the whole sheet.
The workbook: https://app.box.com/s/gj9x1psxrmmojnwf0eh0g8wf5z7ynhxb