how can close order with ticket?
one of my problem solve I use this for save ticket now:
ticket = MTResult.deal;
But still i can not close the position with ticket. i read the document again and i found i should add namespace "#include <Trade\Trade.mqh>" in my Expert. however I get the error "'PositionClose' - undeclared identifier "
how can solve this?

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 try create EA. in my EA every open position ticket save in array and close with their ticket too. But i got some error and i do not know how to do it.
first: this is my open trade function. from my source for training MTRequest get error. also i do not know how to get ticket after position open.
second: this is my function for close all order with tickets. I use this link "https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradepositionclose", but the PositionClose method not working.
how to solve my problems? please help.