Better "for" loop New comment Chunsheng Yang 2017.08.07 01:58 (int i=OrdersHistoryTotal()-1,i>=0,i--){ //do something }...since major CPUs' "count" registers count the "for" loop backward. William Roeder 2017.08.07 02:57 #1 You assume history is ordered by date, it's not. Could EA Really Live By Order_History Alone? (ubzen) - MQL4 and MetaTrader 4 - MQL4 programming forum Alain Verleyen 2017.08.07 13:16 #2 Chunsheng Yang: ...since major CPUs' "count" registers count the "for" loop backward.What's your problem ? I don't get it. New comment