DislikedAlthough you can directly select by ticket instead of position, ignoring in which of the two lists it is, which is useful in *some* cases, you would still need a way to get a list of all existing ticket numbers if you want all orders and you are back at square one where you still have to go separately through both lists.Ignored
PHP Code
for(int v=0; v<=L+1; v++)
{
OrderSelect(T1[v],SELECT_BY_TICKET,MODE_HISTORY); ct1[v]=OrderCloseTime(); if(ct1[v]>0){ gt1[v]=0; }
OrderSelect(T2[v],SELECT_BY_TICKET,MODE_HISTORY); ct2[v]=OrderCloseTime(); if(ct2[v]>0){ gt2[v]=0; }
OrderSelect(T3[v],SELECT_BY_TICKET,MODE_HISTORY); ct3[v]=OrderCloseTime(); if(ct3[v]>0){ gt3[v]=0; }
OrderSelect(T4[v],SELECT_BY_TICKET,MODE_HISTORY); ct4[v]=OrderCloseTime(); if(ct4[v]>0){ gt4[v]=0; }
OrderSelect(T5[v],SELECT_BY_TICKET,MODE_HISTORY); ct5[v]=OrderCloseTime(); if(ct5[v]>0){ gt5[v]=0; }
}