diff --git a/mq4/MtApi.ex4 b/mq4/MtApi.ex4 index 6d0d391a..77779ef4 100755 Binary files a/mq4/MtApi.ex4 and b/mq4/MtApi.ex4 differ diff --git a/mq4/MtApi.mq4 b/mq4/MtApi.mq4 index a919da4e..564aa3db 100755 --- a/mq4/MtApi.mq4 +++ b/mq4/MtApi.mq4 @@ -3507,8 +3507,9 @@ string ExecuteRequestGetOrders(JSONObject *jo) int pool = jo.getInt("Pool"); Print("ExecuteRequestGetOrders: Pool = ", pool); + + int total = (pool == MODE_HISTORY) ? OrdersHistoryTotal() : OrdersTotal(); - int total=OrdersTotal(); JSONArray* joOrders = new JSONArray(); for(int pos = 0; pos < total; pos++) {