To get around the US FIFO restrictions, which prevent you from closing a newer trade while an older trade of the same lot size is still open, I recommend adding a feature to "dither" the lot size of each trade. For example, you set the target lot size to 0.05 and enable FIFO dithering. The first trade is opened at the target lot size of 0.05. If another trade is opened, it would be at 0.04 or 0.06. That would allow you to close the last trade first. Other EA tools allow this.