prostotrader: It does not matter what order and what is the volume
The scheme is as follows:
You set a pending order, set the volume of the order in the m_volume variable
When TRADE_TRANSACTION_DEAL_ADD is received, compare the position volume with m_volume variable and check if the initial order still hangs there (maybe it was a partial execution and you have added the volume manually).
You set a pending order, set the volume of the order in the m_volume variable
When TRADE_TRANSACTION_DEAL_ADD is received, compare the position volume with m_volume variable and check if the initial order still hangs there (maybe it was a partial execution and you added the volume manually).
Karputov Vladimir how to dance with tambourine I (approximately) know....
So you don't need the example - it clearly spells out all the stages of trade order execution. You haven't even looked at it:
You haven't even looked!!!
MQ Alexander 2016.08.0318:00# EN
Что касается ордеров, позиций и сделок.
Как написано в хелпе - последовательность поступления транзакций не гарантирована - транзакция переноса ордера в историю может быть получена раньше, чем транзакция сделки.
Изменение позиции в терминале происходит строго в результате получения сделочной транзакции, соответственно её получение является гарантией того что позиция поменялась.
Получение транзакции переноса ордера в историю, гарантирует только то, что ордер перестал быть активным (открытым) и был перенесён в историю ордеров.
Кроме того, транзакции могут потеряться при доставке от сервера к терминалу.
Что касается этой фразы.
Судя по всему - она осталась из документации к одной из начальных версий терминала с асинхронной торговли. В ближайшее время уберём. Виновные будут расстреляны.
TRADE_TRANSACTION_DEAL_ADD is all yours. Until you get this event - the position information may be false. Everything else is just your idea of how it works. Wants, in other words.
Wait for TRADE_TRANSACTION_DEAL_ADD, then get position information. That's it.
TRADE_TRANSACTION_DEAL_ADD is your everything. Until you receive this event - the position information may be false. Everything else is just your idea of how it works. Wants, in other words.
Wait for TRADE_TRANSACTION_DEAL_ADD, then get position information. That's it.
I have already told you:
How to dance with the tambourine I (roughly) know.
It does not matter what order and what is the volume
The scheme is as follows:
Hi!
The situation is as follows MT5, build 1375
In its work, when trading futures, the robot uses the OrderSendAsync() function.
Suppose that there is an open position with a volume of 2 contracts.
How should I perform logging to inform the developers about the error?
There is an example of an oscillator that listens to TradeTransaction events in the article " Where to start when creating a trading robot for the Moscow Exchange MOEX ".
Try to run it and see the logs of executed trades. There should be no questions.
An example of how this "listener" works:
There is an example of an owl that listens to TradeTransaction events in the article How to Start Creating a Trading Robot for the Moscow Exchange MOEX
Try to run it and see the logs of trade operations. Any questions should go away.
Thank you very much.
I just want to know the gist of it:
Will you fix it?
The scheme is as follows:
prostotrader:
Only, I would like a substantive answer:
Will you correct the error?
I'm sorry to barge in again... but let me be clear, what is the mistake?
Thank you very much.
Only, I would like a substantive answer:
Will you correct the error?
Then you don't need the example - all the stages of trade order execution are clearly spelled out there. You haven't even looked at it:
So you don't need the example - it clearly spells out all the stages of trade order execution. You haven't even looked at it:
You haven't even looked!!!
You haven't even looked at it!!!
TRADE_TRANSACTION_DEAL_ADD is all yours. Until you get this event - the position information may be false. Everything else is just your idea of how it works. Wants, in other words.
Wait for TRADE_TRANSACTION_DEAL_ADD, then get position information. That's it.
TRADE_TRANSACTION_DEAL_ADD is your everything. Until you receive this event - the position information may be false. Everything else is just your idea of how it works. Wants, in other words.
Wait for TRADE_TRANSACTION_DEAL_ADD, then get position information. That's it.
I have already told you:
How to dance with the tambourine I (roughly) know.