OnTradeTransaction : Not Catching Enough Events When Performing Close All Positions Bulk Operation
I tested this code without errors when closing each position one at a time. But when performing Close All Positions Bulk Operation, it does not recognize enough events. You can watch the video for more information.
I tested this code without errors when closing each position one at a time. But when performing Close All Positions Bulk Operation, it does not recognize enough events. You can watch the video for more information.
Your code is wrong. A bulk operation doesn't send a request with an action TRADE_ACTION_DEAL.
You are wrong, It will send actions TRADE_ACTION_DEAL if I close all the positions with the same direction
I just tested again, the reason is that when closing 2 orders in opposite directions, it will generate a request TRADE_ACTION_CLOSE_BY instead of two of TRADE_ACTION_DEAL
Update:
I just tested again, the reason is that when closing 2 orders in opposite directions, it will generate a request TRADE_ACTION_CLOSE_BY instead of two of TRADE_ACTION_DEAL
I tested this code without errors when closing each position one at a time. But when performing Close All Positions Bulk Operation, it does not recognize enough events. You can watch the video for more information.