Hello,

Some days ago I mentioned that BrokerTrade function could not handle the partial closing of trades done manually, well actually it does not handle it from Zorro too.

Let's take the case when the partial closing of a given trade is pending, then BrokerSell2 function will return a trade ID number only and BrokerTrade will have to check this pending order status.

However, as soon as the value returned by BrokerTrade is negative, Zorro will consider the opened position fully closed.

So far, from what I see BrokerTrade can handle trades fully closed and opened trades updates only.

It would be great to fix this issue in the future release.

Also, I noticed that when partially closing a trade through BrokerSell2, even if we affect a value to pProfit, Zorro will replace it by its own estimation which is wrong in that case. It lseems the real value is being divided by the trade number of lots before being reduced. For instance when calling BrokerSell2 to close 1 lot out of 3, the profit value estimated by Zorro will be the correct value divided by 3, for closing 1 out of 2 it will be divided by 2.

Last edited by byakuren81; 03/27/22 13:02.