My demo terminal is not setting a position identifier for positions ... and naturally it is absent also for deals and orders on the history tab.
What can be the reason?
Thanks.
As far as I know this field is not used.
I was talking about the ID in the Terminal, there is no problem with HistorySelectByPosition().
I think that the "deal ticket", the "order ticket" and the "position identifier" data are a little bit mixed with each other.
I think that these data are three different concepts, am I wrong?
Let me give you an example ...
The appearance of my history tab:
And the trivial code I'm trying:
datetime from = D'2015.03.13'; datetime to = TimeCurrent(); HistorySelect(from, to); Print(HistoryDealsTotal()); for(int i=0;i<HistoryDealsTotal();i++) { Print("."); Print(HistoryDealGetInteger(HistoryDealGetTicket(i),DEAL_POSITION_ID)); Print(HistoryDealGetInteger(HistoryDealGetTicket(i),DEAL_ORDER)); }
And the result I'm getting with this code:
First of all ... I'm getting "order tickets" in place of "deal tickets".
And secondly, I'm also getting "order tickets" in place of "position identifier" ... I don't know, maybe, are these same things?
And additionally, in the last image ... some order tickets are written for the next order as well. I could not understand what can cause this in my code fragment.
It's better to post the log rather than a screenshot. With a log I can copy it and add comment, I will not do it with a screenshot.
OzanK:
First of all ... I'm getting "order tickets" in place of "deal tickets".
And secondly, I'm also getting "order tickets" in place of "position identifier" ... I don't know, maybe, are these same things?
And additionally, in the last image ... some order tickets are written for the next order as well. I could not understand what can cause this in my code fragment.
This is position ID, which remains the same during all the "live" of a position.
I hope it's more clear.
It's better to post the log rather than a screenshot. With a log I can copy it and add comment, I will not do it with a screenshot.
You don't print the deal ticket, your print the order ticket (DEAL_ORDER).You get the position_ID which is the first ticket of the first order used to open a position.
This is position ID, which remains the same during all the "live" of a position.
I hope it's more clear.
Yes, thanks ... a little bit more clear now.
Then, position identifier is the same thing with the order ticket ... right?
And, one more additional question ... how can I print the deal ticket numbers with the HistoryDeal....() functions?
I could not see any field in the related enumarations for printing deal tickets?
Yes, thanks ... a little bit more clear now.
Then, position identifier is the same thing with the order ticket ... right?
And, one more additional question ... how can I print the deal ticket numbers with the HistoryDeal....() functions?
I could not see any field in the related enumarations for printing deal tickets?
What do you think this is ?
HistoryDealGetTicket(i)
What do you think this is ?
:))
Thank you so much.
Non proprio. Una posizione può essere il risultato di molti ordini (e offerte), l'identificatore di posizione è il biglietto del PRIMO ordine.
Cosa pensi che sia questo?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
My demo terminal is not setting a position identifier for positions ... and naturally it is absent also for deals and orders on the history tab.
What can be the reason?
Thanks.