Download MetaTrader 5

HistoryTotalOrder

To add comments, please log in or register
meta44
48
meta44  

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 

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
https://www.mql5.com/en/job
whroeder1
15574
whroeder1  
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.
Simon Gniadkowski
Moderator
18024
Simon Gniadkowski  
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."

whroeder1
15574
whroeder1  
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.
meta44
48
meta44  

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

    } 

 

meta44
48
meta44  
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/

 

meta44
48
meta44  
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:
whroeder1
15574
whroeder1  
meta4: I can not apply  ( OrdersHistoryTotal )
Don't double post.
To add comments, please log in or register