"Floating PositionSelect() error - page 5

 

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:

      case TRADE_TRANSACTION_DEAL_ADD:
        if((order_ticket!=0) && (trans.order==order_ticket))
        {
         Print("Deal done. Ticket: ",trans.order);
        }
      break; 
 
Изменение позиции в терминале происходит строго в результате получения сделочной транзакции, ....

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!

 
prostotrader:

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.

 
Dennis Kirichenko:

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

 
prostotrader:

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 ;-)

 
Dennis Kirichenko:

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!

 
prostotrader:

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.