This algo has a csv file that it is trying to read through with dates. If the date is passed, it will either open a long or short position for the day. The problem is that some positions aren't closed at the end of the day. This results in the security remaining in my universe and being bought or sold repeatedly.
Please help.