Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 735
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
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.