Forum

BE for both directions

Hello, I am working on an EA and have a problem with my BE function . For Example: BUY 1.00 BUY 1.10 BUY 1.20 Calculation of the BE is easy, it would be 1.10, so close all Trades if < = 1.10 But what do I do if I have this situation? BUY 1.00 BUY 0.80 BUY 0.85 First the BE would be above the price

tradeinformation multidimensional array

Hello, I want to identify which of the open trades has the biggest open loss. And then I want to close it or a part of it. I got the part with the biggest open loss, but I do not know how to add the ticketnumber to that information in the array. so I could select this one trade after I guess working