0

I have a data frame recorded all my trading in a column. (Not actually my trading, but results according to a set trading strategy) Wins are positive number, and losses are negative numbers. Now I want to count the losing streak. But I have no idea what to do. Please help. If possible can you teach me how to add a new column that shows the losing streak as well, not just show me the max losing streak. Thanks very much :)

I did a bit research and found this website: https://predictivehacks.com/count-the-consecutive-events-in-r/

But my skill in R is not great enough to apply it to my case.

Phil
  • 7,287
  • 3
  • 36
  • 66
John W
  • 1
  • 1

0 Answers0