Hi i am trying to see if i can do some analysis on a set of values in several columns.
It is basically a set of records of many buy and sell orders versus time and profit or loss made.
A file is attached with a few records to help explain.
In essence we have several columns where one column has record numbers where each col(1) has a time/date plus one of either a buy, sell, or close string in the same row col(2).
So each record number col(3) can appear more than once but will have a SELL or BUY first and then a CLOSE line. Note some columns are not used in this analysis.
In the rightmost column against every line with a CLOSE in it, will have a profit or loss.
I would like to find the time and date of the record numbers that end up being traded (so would have a BUY or SELL when the trade is opened and a CLOSE when it closes along with a value in the rightmost column
So ultimately i might be able to select the time of day that most profiable trades start, the time of day that most profitable trades finish and so on.
So trying to express this simply. For each record number col(3) with a CLOSE value col(2) find the associated BUY or SELL date/time value col(1) for both and store profit/loss.
Then using the date/time the BUY/SELL occured and the date/time of the CLOSE we have the length of time the trade was open and the profit loss made.
It might be too complex for a function so i can take a look at VBA if required.
Thanks
Neil
Bookmarks