I want to know how I can get all orders from the account history. The HistoryTotal() function only return the number of history orders that are loaded in the terminal. Is there a way to load ALL orders - even the ones that are not loaded in the terminal?
To my knowledge, you have to save all orders to a file yourself as they are closed, cos' as you suggested, MT does the same - store them locally and 'forgets' them periodically. Probably whenever it's closed down and re-started but don't quote me on this.
At least, this is what I have being doing!...
Isn't there a way to go through all history orders if you haven't saved them to file before that? A function I don't know of?
The only available 'historical' Order function is 'OrdersHistoryTotal()' function which returns the number of closed orders that MT loads into the terminal - you can access these with the 'Orderselect' function and the 'MODE_HISTORY' switch.
In the MT manual, it states that you can change this number in the 'Accounts History' tab - damned if I can find it, even on my real account!
I would be very surprised if the Brokers actually store gazillions of demo orders on their servers though. All real closed orders should be accessible, but then few will have huge numbers of them...
Thanks guys for the answers.
All orders are saved under the next tab after the closed orders. Right click and choose "all history". I have history for the last 4 months on one of my demos.
I always assumed that just effected the number of days displayed in the report. From reading the MT manual you are led to believe that this historical data is d/l from the brokers server but I have one EA running for more than a year with North Finance (doesn't 'reset' accounts) and selecting 'All History' doesn't add to the month or so that's available.
Probably a limit set by the broker...
Please enable the necessary setting in your browser, otherwise you will not be able to log in.