An order is closed, if you cannot find it in the list of active orders. So,
if(!OrderSelect(GlobalVariableGet("currentOrderB"), SELECT_BY_TICKET, MODE_TRADES) ) { //order is already closed } else { //order is still open }
Use time
OrderSelect(GlobalVariableGet("currentOrderB"),SELECT_BY_TICKET); if(OrderCloseTime()!=0){
Thank you guys !
I've choosen the OrderCloseTime() way because it means less modification to my code, I'm a bit lazy ;)
Good day !
гитлер капут
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 everybody,
Does anyone know how can I know if the order i've selected through its ticket number ?
Currently i've this :
But it doesn't work, ClosePrice seems to be always defined.
Thank you.
PS : I understand only english, no russian please.