Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1634
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
Write an example, because I'm already a bit confused. If it's not too much trouble. Thanks
In the loop to search for orders:
if (OrderOpenPrice()<previous_value) { previous_value=OrderOpenPrice(); nearest_order=OrderTicket(); }
Before the loop, initialize previous_value=DBL_MAX a nearest_order=0
in the order loop:
initialise previous_value=DBL_MAX a nearest_order=0 before the loop
Exactly. Thank you. Works
in the order loop:
initialise previous_value=DBL_MAX a nearest_order=0 before the loop
DBL_MAX is categorical).
The main thing works)
How to find OP_BUY with maximum OrderOpenPrice and determine its OrderProfit.
I can't put them together, everything works through the ass... If you can give me an example right away) Thank you)
The main thing works)
How to find OP_BUY with maximum OrderOpenPrice and determine its OrderProfit.
I can't put them together, everything works through the ass... If you can give me an example right away) Thank you)
I just wanted to say that I'm all done.
But you have made it more compact. I'll take your suggestion.)
Thanks
I delete all objects in OnDeInit() by loop (arrows indicating signal bars and one button):
I am aware that there is ObjectsDeleteAll(), but still if I do it through a loop, only half of the objects are deleted in one. Actually here is the work of the loop and I don't understand why it happens so:
I delete all objects in OnDeInit() by loop (arrows indicating signal bars and one button):
I am aware that there is ObjectsDeleteAll(), but still if I do it through a loop, only half of the objects are deleted in one. Actually here is how the loop works and I don't understand why it happens this way:
The loop when deleting should be reversed:
and this applies not only to deleting graphical objects, but in general to deleting any objects in the lists of the terminal.
I delete all objects in OnDeInit() by loop (arrows indicating signal bars and one button):
I am aware that there is ObjectsDeleteAll(), but still if I do it through a loop, only half of the objects are deleted in one. Actually here is how the loop works and I don't understand why it happens:
but if you try it this way - only you need to put all the names