Discussing the article: "Trade transactions. Request and response structures, description and logging" - page 7

 
Vladimir, I recommend you to study the material in the article. Then many questions will answer themselves ))
Ордерa, позиции и сделки в MetaTrader 5
Ордерa, позиции и сделки в MetaTrader 5
  • www.mql5.com
Надежный торговый робот не может быть создан без понимания механизмов работы торговой системы MetaTrader 5. Клиентский терминал получает от торгового сервера информацию о позициях, ордерах и сделках. Чтобы правильно обработать эти данные средствами MQL5 необходимо хорошо представлять как происходит взаимодействие mql5-программы и среды исполнения терминала.
 
MrBrooklin open position) and worked according to the algorithm? No, it's a hell of a thing!

Regards, Vladimir.

You made a correct correction, not a deal, but an open position. No one ever sees the deal. And they answered you without penetrating into the maze you are parsing.

You go to the market. You buy a potato. You give the money, put the potato in the hat. The vendor put the money in the stocking. You see the potato, the seller sees the money, and the sale is the transaction.

 
Denis Kirichenko #:
Vladimir, I recommend you to study the material in the article. Then many questions will answer themselves ))

Even I know that he read it.

 
Alexey Viktorov #:

Even I know he read it.

He did, but I guess he didn't fully understand it. It's worth repeating! ;)

Regards, Vladimir.

 
Alexey Viktorov #:

You made the correct clarification, not a transaction, but an open position. No one ever sees a deal. And they answered you without getting into the rubbish you are parsing.

You go to the market. You buy a potato. You give the money, put the potato in the hat. The vendor put the money in the stocking. You see the potato, the seller sees the money, and the fact of buying/selling is the transaction.

I remember about the potatoes too. ) Then Artyom was not quite accurate (holy holy!)? Was he? I am completely, damn, confused!

Regards, Vladimir.

 
MrBrooklin #:

I remember about the potatoes too. ) Then Artyom wasn't quite accurate (holy holy!)? Was he? I'm totally fucking confused!

Regards, Vladimir.

Who called me?!?!?

 
Artyom Trishkin #:

Who called me?!?!

Oh, man, here it is. In short, I do not understand how long the information on the transaction is stored on the server!!!!

Regards, Vladimir.

 
MrBrooklin #:

Well, here's the fucking thing. In short, I do not understand how long the information on the transaction is stored on the server!!!!

Regards, Vladimir.

Alexey answered. It depends on the broker.

But you are doing something wrong.

You are trying to catch yesterday's event in the event handler. It was yesterday. The handler signalled it yesterday. And only when it came into it.

That's it. Today you can't catch this event in the handler. It is like an alarm clock: the time has come - it rang. The event happened - it signalled it. That's it. Tomorrow there will be other events. And those that were - the train has left. Now we have to search through history.

The event handler works in real time.

 
Artyom Trishkin #:

Alexei answered. It depends on the broker.

But you are doing something wrong.

You are trying to catch yesterday's event in the event handler. It was yesterday. The handler signalled it yesterday. And only when it came into it.

That's it. Today you cannot catch this event in the handler. It is like an alarm clock: the time has come - it rang. The event has occurred - notified. That's it. Tomorrow there will be other events. And those that were - the train has left. Now we have to search through history.

The event handler works in real time.

How did this event handler find an open position after one trading day? Roughly speaking, the position was opened the day before yesterday, yesterday the event handler did not see it, and today it suddenly "woke up" and saw the position, and then worked according to the algorithm. Miracles are nothing but miracles.

Regards, Vladimir.

 
Artyom Trishkin #:
Now I have to look through history.

Isn't this deal on the history I'm looking for?

if(HistoryDealSelect(trans.deal) && HistoryDealGetInteger(trans.deal,DEAL_ENTRY)==DEAL_ENTRY_IN)

Regards, Vladimir.