You do something wrong. And this line
OrderSelect (1, SELECT_BY_POS, MODE_HISTORY );is not safely and correct.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am trying to write an EA that uses OrdersHistoryTotal and OrdersTotal...problem is, both of these keep returning 0 even though I am running these on the live mini-lot account I have been using for over 5 months. I can see the order history in the Account History tab, but I get nothing in the EA.
I have inserted this code in several working EAs to see if they will return anything but 0, but no luck yet. Does anyone have any ideas what I am doing wrong?
Print (OrdersHistoryTotal());
Print (OrdersTotal());
OrderSelect (1, SELECT_BY_POS, MODE_HISTORY );
Print (OrderSymbol());