Le Minh Duc:
I might be wrong but from my memory, aren't you supposed to retrieve the type of "trans" in your case using something like trans.type and switch the value you get with an ENUM_TRADE_TRANSACTION_TYPE ? (Instead of request.action).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.
Le Minh Duc:
Your code is wrong. A bulk operation doesn't send a request with an action 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.
Alain Verleyen #:
Your code is wrong. A bulk operation doesn't send a request with an action TRADE_ACTION_DEAL.
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
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 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
Le Minh Duc #:
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
So who is wrong ?
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
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.