Your topic has been moved to the section: Expert Advisors and Automated Trading
You have been advised before, so please pay more careful attention in the future.
Consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
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
Hi,
I am looking to get the specific ticket position of orders when they hit a take profit or a stop loss. I wrote the following code to store the tickets whenever a new position is opened:
And the following to get the ticket of every positions whenever a take profit or stop loss is reached:
However, in this way I am getting the ticket of each deal that is different for each opened/closed transaction. Instead, I would like to get the position ticket (so the same ticket of the open deal) within the OnTradeTransaction function to identify which of the position was closed.