Print the number, ticket and order type before the second if and inside the second if.
Got it. Tried it. It's counting, but it's not quite right. It counts orders by the tick. I need the last but one order at the top of the grid. If the price goes down and another order is opened, the penultimate order is the one with the maximal OrderOpenPrice.
ObjectsDeleteAll is fine. But if you need to delete not EVERYTHING, you cannot do it without a loop with conditions! And that's where the golden rule is - you have to start at the end!
pribludilsa #: How to work with a file in an mql5 program without writing the file to disk, but work only in RAM, to speed up. I want to transfer data from an mql5 program to a program on my computer.
Перед многими разработчиками встает одинаковая проблема - как пробиться в песочницу торгового терминала без применения небезопасных DLL. Одним из простых и безопасных методов является использование стандартных именованных каналов (Named Pipes), которые работают как обычные файловые операции. Они позволяют организовать межпроцессорное клиент-серверное взаимодействие между программами. Посмотрите практические примеры на C++ и MQL5 в виде сервера, клиента, обмен данными между ними и замер производительности.
Got there. Tried it. It's counting, but it's not quite right. It counts orders by the tick. I need the last but one order at the top of the grid. If the price goes down and another order is opened, the penultimate order is the one with the maximal OrderOpenPrice.
Got there. Tried it. It's counting, but it's not quite right. It counts orders by the tick. I need the last but one order at the top of the grid. If the price goes down and another order is opened, the penultimate order is the one with the maximal OrderOpenPrice.
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.
I didn't know there was an ObjectsDeleteAll.
I use it everywhere
I use it everywhere
I did not know that there is ObjectsDeleteAll and now I want to get to the bottom of it.
Forum on trading, automated trading systems & strategy testing
Any questions from newbies on MQL4 and MQL5, help and discussion of algorithms and codes
Artyom Trishkin, 2021.09.30 05:31
You may delete it. If you have already understood the reason, you may better understand it once, so that you don't try to do it again.
When deleting an object from an array, the position of the next one is shifted in the array and the loop index now points to where? Think about it.
Print the number, ticket and order type before the second if and inside the second if.
Got it. Tried it. It's counting, but it's not quite right. It counts orders by the tick. I need the last but one order at the top of the grid. If the price goes down and another order is opened, the penultimate order is the one with the maximal OrderOpenPrice.
How to work with a file in an mql5 program without writing the file to disk, but work only in RAM, to speed up. I want to transfer data from an mql5 program to a program on my computer.
Here it is:
https://www.mql5.com/ru/articles/503
Got there. Tried it. It's counting, but it's not quite right. It counts orders by the tick. I need the last but one order at the top of the grid. If the price goes down and another order is opened, the penultimate order is the one with the maximal OrderOpenPrice.
Got there. Tried it. It's counting, but it's not quite right. It counts orders by the tick. I need the last but one order at the top of the grid. If the price goes down and another order is opened, the penultimate order is the one with the maximal OrderOpenPrice.
The last one comes out, not the penultimate one(