Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1556

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'm sure it'll be a lot better now. And I won't be draining as fast as I used to.
Good luck in trading!
Regards, Vladimir.
Good luck with your trading!
Regards, Vladimir.
Thank you! Likewise.
Good morning everyone!
I must have missed something in OOP self-training. I take a function to modify a pending order:
and I specify only ticket, price, sl and tp values. The compiler generates an error that the number of parameters is incorrect. As far as I remember, if other parameters are not needed to modify a pending order, they could be omitted. Or am I confused with something?
But when I fill the parameters type_time and expiration that I do not need with zeros, then there is no error.
Regards, Vladimir.
and I specify only ticket, price, sl and tp values. The compiler generates an error that the number of parameters is incorrect. As far as I remember, if other parameters are not needed to modify a pending order, they could be omitted. Or am I confused with something?
But when I fill the parameters type_time and expiration that I don't need with zeros, then there is no error.
Regards, Vladimir.
OOP has nothing to do with it, you should observe syntax when calling a function
and I specify only ticket, price, sl and tp values. The compiler generates an error that the number of parameters is incorrect. As far as I remember, if other parameters are not needed to modify a pending order, they could be omitted. Or am I confused with something?
But when I fill the parameters type_time and expiration that I don't need with zeros, then there is no error.
Regards, Vladimir.
Hi Vladimir. You should zeroise the structure before filling it. There is rubbish stuck in these fields and the compiler considers it as entered values.
Hi Vladimir. You should zeroise the structure before filling it. There is rubbish stuck in these fields and the compiler considers it as entered values.
He has an error in compilation, not in sending the order.
I agree with the zeros.OOP has nothing to do with it, you have to respect the syntax when calling a function
In procedural programming in MQL5 to modify a pending order the use of
is not required at all. This may be the reason for misunderstanding how the OrderModify() function works in OOP.
Regards, Vladimir.
Hi Vladimir. You should zeroise the structure before filling it. There is rubbish stuck in these fields and the compiler considers it as entered values.
Hi Alexey, thanks for the hint.
Regards, Vladimir.
In MQL5 procedural programming to modify a pending order the use of
is not required at all. This may be the reason for misunderstanding how the OrderModify() function works in OOP.
Regards, Vladimir.
can you insert a function from the procedural variant?
can you insert a function from the procedural version?
I can. Taken from MetaEditor 5 Reference Manual
Regards, Vladimir.