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.