Can I assume that new history orders are been added only to the very end of the history pool?

 

Hello,

I'm coding an EA and in my EA I need to detect the changes in the history pool.

Is it safe to assume in MQL4 that the pool is being changed only by adding new orders to the very end of the history pool?

If not, how one can detect all changes which happened in history pool since last time change detection code was ran?

Thank you,

Roman

 
Don't assume.
Do not assume history has only closed orders.
Do not assume history is ordered by date, it's not.
          Could EA Really Live By Order_History Alone? (ubzen) - MQL4 programming forum
 
Remember the EA is accessing the history pool that is present on the MT4 platform so make sure there is enough data (that there is the right period selection set) and that the orders are sorted the way you like for your treatment, on each platform the EA is running on.
Reason: