HistoryTotalOrder

 

Nice to meet everyone. 

 

I need a sample

Help me create a template

 Write a function that returns the total number of orders in history, named function is HistoryTotalOrder 

 I am very grateful for that 

Thanks for your reply 

 
https://www.mql5.com/en/job
 
meta4: I need a sample
HistoryTotalOrder
  1. order accounting - MQL4 forum
  2. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
 
meta4:


 Write a function that returns the total number of orders in history, named function is HistoryTotalOrder 

Please read the documentation . . .

 

OrdersHistoryTotal()

 "The number of closed orders in the account history loaded into the terminal."

 
RaptorUK: Please read the documentation . . .

OrdersHistoryTotal()

 "The number of closed orders in the account history loaded into the terminal."

While that is a start for the OPs question, he'll be off track because he won't filter by magic number, pair or credit entries in his order select loop.
 

OrdersHistoryTota 

not be loaded into the terminal MT4 

help me debugging

// retrieving info from trade history
  int i,hstTotal=OrdersHistoryTotal();
  for(i=0;i<hstTotal;i++)
    {
     //---- check selection result
     if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false)
       {
        Print("Access to history failed with error (",GetLastError(),")");
        break;
       }
     // some work with order

    } 

 

 
WHRoeder:
RaptorUK : Xin vui lòng đọc các tài liệu hướng dẫn. . .

OrdersHistoryTotal ()

 " Số lượng đơn đặt hàng đóng trong lịch sử tài khoản được nạp vào thiết bị đầu cuối. "

Trong khi đó là một khởi đầu cho câu hỏi Ops, anh ấy sẽ tắt theo dõi bởi vì anh ta sẽ không lọc bởi số, cặp hoặc tín dụng mục phép thuật để chọn vòng lặp của mình.

I can not apply  ( OrdersHistoryTotal )

help me with demo code 

  I am very grateful for that 

Thanks for your reply 

 

I use the translation

 https://translate.google.com/

 

 
WHRoeder:
RaptorUK: Please read the documentation . . .

OrdersHistoryTotal()

 "The number of closed orders in the account history loaded into the terminal."

While that is a start for the OPs question, he'll be off track because he won't filter by magic number, pair or credit entries in his order select loop.

I tried mounting 

I can not apply 

  // retrieving info from trade history

  int i,hstTotal=OrdersHistoryTotal();
  for(i=0;i<hstTotal;i++)
    {
     //---- check selection result
     if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false)
       {
        Print("Access to history failed with error (",GetLastError(),")");
        break;
       }
     // some work with order
    }

 

on MT4 

 no return value

build 735 

Files:
 
meta4: I can not apply  ( OrdersHistoryTotal )
Don't double post.
Reason: