slimalex:
Hello, can anyone help with this problem?
When exiting my EA (File\Exit), I want the remaining pending to be deleted.
So I write:
....
void OnDeinit(const int reason)
{Delete=OrderDelete(MyPendingTicket,CLR_NONE);
Sleep(3000);
} ...
I added Sleep(3000) to check, and 3 sec pause is clearly executed before the EA closes.
But the pending still remains open in the market. Please help to find the mistake!
//--- void OnDeinit(const int reason) { If(REASON_CLOSE) {Delete=OrderDelete(MyPendingTicket,CLR_NONE); Sleep(3000); } ... }

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
Hello, can anyone help with this problem?
When exiting my EA (File\Exit), I want the remaining pending to be deleted.
So I write:
....
void OnDeinit(const int reason)
{Delete=OrderDelete(MyPendingTicket,CLR_NONE);
Sleep(3000);
} ...
I added Sleep(3000) to check, and 3 sec pause is clearly executed before the EA closes.
But the pending still remains open in the market. Please help to find the mistake!