Hi....my first post here....will try to make it simple.
I have a trading system spreadsheet where I want to calculate Consecutive Day Wins / Loss, as well as the money won or loss by those consecutive days.
IF I would have valid data (call it a WIN or LOSS) EVERY day, I know how to do this in some way (maybe not the ideal way). BUT the problem I face is there are many days that there is no trade (no value win/loss), so the concept of consecutive is not really consecutive days, but consecutive days WITH TRADES. Not sure how to do this.
The real output I need is the MAX number of consecutive wins (and the $ it represents) as well as for losses.
I attached the example on the file to visualize it better.
Thanks a lot.
Maybe this way?
Use a helper column, say Column E, this can be hidden (use the grouping icon/button)
In E1 enter 1
In E2
In F2=IF(OR(AND(D3="W",D2="L"),AND(D3="L",D2="W"),D3=""),ROW(),"")
Drag/Fill both Down to the last row of your table.=IF(ISNUMBER($E2),SUM(INDEX(C:C,MAX($E$1:$E1)+1,1):INDEX(C:C,ROW(),1)),"")
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
Thanks for your time.
For the $ part it's ok, still I need to have the numbers of consecutive days of W / L, so where we have the 13 on your formula, it should say 6 (as there were six consec TRADING days without Losses).
Yest night I found some type of solution to this, but as always is A WAY I managed to do it with many helper cols, but would love to know if some more complex formulas I do not know can optimize this as I like learning new tips.
Attached is the solution I got.
Add this
In G2
In H2=IF(ISNUMBER(E3),D3,"")
Drag/Fill both down.=IF(ISNUMBER($E3),MAX(COUNTIF(INDEX(D:D,MAX($E$2:$E2)+1,1):INDEX(D:D,ROW(),1),"W"),COUNTIF(INDEX(D:D,MAX($E$2:$E2)+1,1):INDEX(D:D,ROW(),1),"L")),"")
See the C/F for the cell colour rules.
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks