OrderSelect() questions...

 
Could someone please answer the following questions:

1: When OrdersHistoryTotal() is used, is ALL historical trades for the account downloaded from the brokers server, or is this data stored locally on the computer?

2: When using 'Orderselect(i,SELECT_BY_POS,MODE_TRADES)' why are there sometimes closed trades included in the Open-trades pool, necessitating the use of OrderCloseTime() to find out for sure?

Thanks.
 
Not an answer, but for cases like #1:

I write a code snippet to exercise the command in question, and time the result.
Requests that need a server response will take many milliseconds to complete, local operations
are very fast.
 
1. Data stored locally depending of your Account history tab' setting
2. It is impossible. Investigation needed
 
1. Data stored locally depending of your Account history tab' setting
2. It is impossible. Investigation needed



Thank you.