All is in the title. If anyone can explain, when closing a position, the difference between TRADE_ACTION_DEAL and TRADE_ACTION_CLOSE_BY.
Apparently is it the same? In the Trade.mqh file, it is closing using TRADE_ACTION_DEAL. With my broker, in certain occasions, Trade.ClosePosition opened an opposite position. So I'm trying to change this with TRADE_ACTION_CLOSE_BY, but is is a wild guess.
So if anybody could put some light on this. What should I use? TRADE_ACTION_CLOSE_BY or TRADE_ACTION_DEAL?
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.
Hello,
All is in the title. If anyone can explain, when closing a position, the difference between TRADE_ACTION_DEAL and TRADE_ACTION_CLOSE_BY.
Apparently is it the same? In the Trade.mqh file, it is closing using TRADE_ACTION_DEAL. With my broker, in certain occasions, Trade.ClosePosition opened an opposite position. So I'm trying to change this with TRADE_ACTION_CLOSE_BY, but is is a wild guess.
So if anybody could put some light on this. What should I use? TRADE_ACTION_CLOSE_BY or TRADE_ACTION_DEAL?
Thanks.