Thank seems to work fine if you have a positive profit. But I can't figure it how I can get from the Sell Positions that are in loss the one is losing less. Thanks
Lorentzos Roussos: I think i get what you are trying to accomplish . You want to "Absorb" losses into winning positions but keep the closed "set" in profit , right?
I think the only way to get the Position that is winning the most is this:(I have to add commissions and swap) but I think the only way is through a loop. So this way I can get the Position with the smallest loss or the largest profit.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Thank seems to work fine if you have a positive profit. But I can't figure it how I can get from the Sell Positions that are in loss the one is losing less. Thanks
You want to "Absorb" losses into winning positions but keep the closed "set" in profit , right?
I think i get what you are trying to accomplish .
You want to "Absorb" losses into winning positions but keep the closed "set" in profit , right?
I think the only way to get the Position that is winning the most is this:(I have to add commissions and swap) but I think the only way is through a loop. So this way I can get the Position with the smallest loss or the largest profit.
I see . Try these :