Isn't "unknown ticket" an error?
How do you tell the OrderSelect function which ticket to select? The problem may be there.
How do you tell the OrderSelect function which ticket to select? The problem may be there.
Anyway for knowing if a particular Ticket is deleted or not? How do I ensure 100% of the time that OrderSelect will properly identify that a particular Order is still in the Trade Panel or is already removed/closed?
Here is a hint:
Open orders have OrderCloseTime() set to 0.
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
It is supposed to return FALSE is I dont have such a ticket on the Trade Panel as defined by documents:
Selects order by index or ticket to further processing. If the function fails, the return value will be false. To get the extended error information, call GetLastError().
Parameters
index - Order index or order ticket depending from second parameter.
select - Selecting flags. It can be any of the following values:
SELECT_BY_POS - index in the order pool,
SELECT_BY_TICKET - index is order ticket.
pool - Optional order pool index. Used when select parameter is SELECT_BY_POS.It can be any of the following values:
MODE_TRADES (default)- order selected from trading pool(opened and pending orders),
MODE_HISTORY - order selected from history pool (closed and canceled order).
My script created the Order and knows the ticket number.
After a while, I deleted the Order which should make the OrderSelect not finding the order anymore. However, it still sees the ORDER and no Error is returned.
Sometimes it works oftentimes it doesnot.
Anyway for knowing if a particular Ticket is deleted or not? How do I ensure 100% of the time that OrderSelect will properly identify that a particular Order is still in the Trade Panel or is already removed/closed?