ticket = OrderSelect(pos,SELECT_BY_POS,MODE_TRADES)
I know if among open or pending orders at position pos if there is an order then ticket = TRUE.
But in which case ticket = FALSE ?
In MQL4 manual it's said that OrderSelect return a boolean value.So what do you mean ?May be you're confused by variable ticket and pos
int index, // index or order ticket
int select, // flag
int pool=MODE_TRADES // mode
[in] Order index or order ticket depending on the second parameter.
[in] 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.
[in] Optional order pool index. Used when the selected 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).
It returns true if the function succeeds, otherwise falses. To get the error information, one has to call the GetLastError() function.
In this case the word ticket is a variable that contains the booelan return value of the instruction OrderSelct()
I can also call it by the word bill or anything else...that will not affect this instruction
I suppose when you add a comment your aim is to extol your knowledge..rather then to answer clearly
If you want answers on this forum I suggest to change your way to answer.
When you receive an answer you should say thank you. When you don't understand the answer, you should ask more explanation. You should not start to offend the one who tried to help you.
You have supported the answer given to you in 1# and 3#
BTW ticket should be "int ticket"
You should used <code>(Alt+s) to show your code issues.
Please reframe from insulting members trying to guide you.