Mql5 guys, can you help me make a request to close a position in a hedge account? Situation: opened BUY position, we need to close it with Sell Limit. Question: How do I correctly write a request, to close exactly chosen position, and not to open new SELL locking BUY? Please write a piece of code with comments! Thank you in advance!
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.
Mql5 guys, can you help me make a request to close a position in a hedge account? Situation: opened BUY position, we need to close it with Sell Limit. Question: How do I correctly write a request, to close exactly chosen position, and not to open new SELL locking BUY? Please write a piece of code with comments! Thank you in advance!
Hello. Help, please.
Hello. Could you please help me?
The switch statement must be of integer type
The switch statement must be of integer type
But"LastDir" is a buffer, it cannot be int.
How to get out of this situation?
But"LastDir" is a buffer, it cannot be int.
How to get out of this situation?
Do away withthe switch operator,
work with the if() operator
There is no certainty that this is equivalent to the first case
@Alekseu Fedotov, thanks, it works) In 2009the switch could have been double)
it was always only a whole )
Hello. Help, please.
If the buffer can only contain integer values represented as double 0.0, 1.0 and -1.0 I would check this option
Also, I would put case -1 before case 0If the buffer can only contain integer values represented as double 0.0, 1.0 and -1.0 I would check this option
Also, I'd put case -1 before case 0.Here -1 should probably be set as default : especially since there is no default case
Although ... You'd have to be an author to know which one would be better to set as default.