Hello to all friends Dear professor, if I have a request, help me in this code
I need to close any position that is in profit and also the last position that is in loss when several positions are open and when it comes to profit and exit signal was issued. In the code I wrote, when all the positive positions gain, it binds everyone together, but I want to close any position that is positively profitable, plus the last position that is at a loss, whenever the signal leaves.