Errors, bugs, questions - page 2598

 
 
Andrey Khatimlianskii:

Why an i-di position for all this? I can't see how to use it at all.

It's enough to analyse trades.

I use internal algorithm clearing. Accordingly, there are several virtual positions, and they have to be regularly checked against the real position, so that there are no discrepancies. In addition, the trade is carried out on several Symbols, so there are several real positions.

 
Francuz:

I use internal algorithm clearing. Therefore, there are several virtual positions, and they have to be regularly checked against the real position to avoid discrepancies. In addition, the trade is carried out on several Symbols, so there are several real positions.

Why the i-di position? What do you check it with?

Do you manage your virtual positions? Great, just calculate the volume and make sure it is equal to the real volume.

Apparently, I just don't see the task as a whole.

 
Andrey Khatimlianskii:

Why an i-d position? What do you check it against?

Keeping your virtual positions? Great, just calculate the volume and make sure it equals the real volume.

Apparently, I just don't see the task as a whole.

This is during normal operation. But when the terminal suddenly shuts down, everything is lost. For this reason, I've made protection against failures using global variables of the terminal. I can't put Symbol there. So I use PositionID instead. It is even more convenient.

But we have deviated from the essence of the issue. The error in transactions was detected. But nobody from the developers bothered to reply. Has the information been taken into account, or have they not even read it?

 
Francuz:

This is during normal operation. But when the terminal is suddenly switched off, everything is lost. That's why I protected it with global variables of the terminal. And you can't put Symbol there. So I use PositionID instead. It is even more convenient.

But we have deviated from the essence of the issue. The error in transactions was detected. But nobody from the developers bothered to reply. Has the information been taken into account, or have they not even read it?

What is the mistake?

 
Artyom Trishkin:

Which error?

This error:

https://www.mql5.com/ru/forum/1111/page2596#comment_13707304

Accurately established that it does not work as stated in the official description of the structure:

https://www.mql5.com/ru/docs/constants/structures/mqltradetransaction

Ошибки, баги, вопросы
Ошибки, баги, вопросы
  • 2019.10.29
  • www.mql5.com
Общее обсуждение: Ошибки, баги, вопросы
 
Francuz:

This error:

https://www.mql5.com/ru/forum/1111/page2596#comment_13707304

Accurately established that it does not work as stated in the official description of the structure:

https://www.mql5.com/ru/docs/constants/structures/mqltradetransaction

position

Ticket of the position affected by the transaction.


What's wrong? You are shown a position ticket. This is the position ID. You have a netting account - there is only one position on it until it is closed. Turning over a position is not closing it.

 
Artyom Trishkin:

position

Ticket of the position affected by the transaction.


What's wrong? The position ticket is shown to you. This is the ID of the position. You have a netting account and there is only one position on it until it is closed. Turning over a position is not closing it.

You are mistaken. The position ticket and position id are different entities. They are very similar, so there's no reason to confuse them. In theENUM_POSITION_PROPERTY_INTEGER enumeration,they are clearly separated as different entities.

 

MT5 tester does not see history :






available history in the terminal :



You can see all the launch details in the screenshots. Thank you all.

 
Francuz:

You are mistaken. The position ticket and the position id are different entities. They are very similar, so there is no reason to confuse them. In theENUM_POSITION_PROPERTY_INTEGER enumeration,they are clearly separated as different entities.

I'm not mistaken in saying that the ID of the position is shown to you. That's what I've been saying for the last time.

Идентификатор позиции - это уникальное число, которое присваивается каждой вновь открытой позиции и не изменяется в течение всей ее жизни. Соответствует тикету ордера, которым была открыта позиция.

 Идентификатор позиции указывается в каждом ордере (ORDER_POSITION_ID) и сделке (DEAL_POSITION_ID), которая ее открыла, изменила или закрыла. Используйте это свойство для поиска ордеров и сделок, связанных с позицией.

 При развороте позиции в режиме неттинга (единой сделкой in/out) идентификатор позиции POSITION_IDENTIFIER не изменяется. Однако при этом POSITION_TICKET изменяется на тикет ордера, в результате которого произошел разворот. В режиме хеджинга разворот позиции не предусмотрен

Just use your logic.
If the number shown does not change when the position is reversed and remains the same, it can only mean one thing - this number is a position ID. Look at the order that spawned the transaction - it is not the same as the position number, which means that position is the position ID.

That is the basis from which you should proceed. It is not an error in the transaction, but rather a mistake in the help then.

And regarding this statement of yours I can say - please look at my articles and imagine how I would write them without a thorough study and understanding of the subject? I understand everything perfectly and know the difference - I'm just showing you exactly what you see in the magazine.
Reason: