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
OK one last question, sorry lol!
How do I obtain the Ticket ID of the newly created Trade (Position)?
I can see that MqlTradeResult does not have the related Ticket for the new position but it does have the 'order' and the 'deal'. Do I need to loop through and find a new one or can get it from the order ID within the MqlTradeResult object that is returned?
OK one last question, sorry lol!
How do I obtain the Ticket ID of the newly created Trade (Position)?
I can see that MqlTradeResult does not have the related Ticket for the new position but it does have the 'order' and the 'deal'. Do I need to loop through and find a new one or can get it from the order ID within the MqlTradeResult object that is returned?
I use the following algorithm in my recent advisors (example for opening a BUY): I issue a trade order to open a BUY and check the result. If the result is 'true' and the trade server return code is correct, I raise the flag and wait for confirmation in OnTradeTransaction.