![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
prostotrader:
Does that make more sense "professor"?
Heh-heh-heh. Are you even an adult or what?
What did you want to show in the screenshot?
Let's go through the points in your log.
First up:
2016.08.15 15:37:17.720 Test_deff_order (GAZR-9.16,M1) History done. Ticket: 50942179
In the second paragraph, what do you see?
I'll take the trouble to write it down:
2016.08.15 15:37:17.720 Test_deff_order (GAZR-9.16,M1) Volume initial: 1.0. Volume current: 0.0 Deals done: 0.0
But once again you are trying to analyse something (orders) without taking into account that the trigger that allows you to analyse the position volume is a transaction of the TRADE_TRANSACTION_DEAL_ADD type - adding a deal to the history.
Yet you persistently, for the umpteenth time, with TRADE_TRANSACTION_DEAL_ADD you don't check the position volume.
Here is your code from the message above:
Can't you see that the position (in the second case) has changed BEFORE the transaction arrived?
THIS SHOULD NOT BE, because Alexndr wrote:
Изменение позиции в терминале происходит СТРОГО в результате получения сделочной транзакции, ....
STRICTLY!
STRICTLY!
STRICTLY!
STRICTLY!
Can't you see that the position (in the second case) changed BEFORE the transaction came in?
THERE SHOULD NOT BE, because Alexndr wrote:
Oh that's it... Only the author will say more precisely :-))
But, imho, it's not worth picking on these words. The trade transaction has already arrived, it's just not immediately processed in OnTradeTransaction().
Funny thing is that you point to the trade transaction, while in your code there is case TRADE_TRANSACTION_HISTORY_ADD .
Imho, here it is important to process it by examining transactions - case TRADE_TRANSACTION_DEAL_ADD.
Ah, that's it... Only the author can be more precise :-))
But, imho, we shouldn't pick on these words. The transaction already arrived, it just wasn't immediately processed in OnTradeTransaction().
Imho, it's important to process it by examining the transactions...
Thanks Denis!
I'm a sucker for not even knowing whatOnTradeTransaction is
Thanks Deniska!
I am a sucker for not even knowing what OnTradeTransaction is.
My pleasure! But your irony is baseless. You have already been rubbed several times in a row what is wrong in the code.
At least you should have thanked Vladimir, he was the first to point in the right direction ;-)
My pleasure! But your irony is not meant to be. You have been told several times in a row what is wrong in the code.
At least you should thank Vladimir, he was the first to point in the right direction ;-)
Read "at your leisure":
https://www.mql5.com/ru/forum/93357#comment_2707875
Karputov Vladimir
Can't the numbers under my avatars be multiplied by 1000?
One more thing...
In case you haven't noticed, I would say that in all the examples the orders are put out
Asynchronously, so it's important to control them!
Karputov Vladimir
Can't the numbers under my avatar die by 1000?
The digits under your avatar don't belong to you, so you have no power over them (you can't change them at will).
Added.
Forget about orders until transaction with type TRADE_TRANSACTION_DEAL_ADD. Why "forget it"? Because it's WRONG.