amin_mohammadi:
I've written this piece of code on OnTradeTransaction event handler to know whether it is finished or not, but I don't get suitable result.
Your question is vague.
"to know whether it is finished or not" : What do you want to know exactly ?
"I don't get suitable result" : Of course, your code do nothing. What result are you expecting ?
angevoyageur:
I want to know if it has met the T/P line and successfully finished
Your question is vague.
"to know whether it is finished or not" : What do you want to know exactly ?
"I don't get suitable result" : Of course, your code do nothing. What result are you expecting ?
amin_mohammadi:
I want to know if it is moved from current orders to history list
Which "current orders", pending orders ? buy/sell orders ?
I want to know if it is moved from current orders to history list

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
- www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
And another question :D
How can I delete a file contents?
yes, pending orders
amin_mohammadi:
This one is clear at least. But you are off-topic, open an other one.
And another question :D
How can I delete a file contents?
amin_mohammadi:
yes, pending orders
Ok, so you want to detect when your pending orders are triggered and became buy/sell deals.
yes, pending orders

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
- www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5
angevoyageur:
Ok, so you want to detect when your pending orders are triggered and became buy/sell deals.
yes
Ok, so you want to detect when your pending orders are triggered and became buy/sell deals.

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
I've written this piece of code on OnTradeTransaction event handler to know whether it is finished or not, but I don't get suitable result.