Download MetaTrader 5
To add comments, please log in or register
Have you just installed MetaTrader 5? Learn it in details!
meta44
48
meta44 2014.10.25 13:58 

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 2014.10.25 15:26  
https://www.mql5.com/en/job
whroeder1
13641
whroeder1 2014.10.25 16:57  
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
17963
Simon Gniadkowski 2014.10.26 17:34  
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
13641
whroeder1 2014.10.26 19:29  
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 2014.10.28 17:47  

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 2014.10.29 04:32  
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 2014.10.29 15:00  
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
13641
whroeder1 2014.10.29 15:08  
meta4: I can not apply  ( OrdersHistoryTotal )
Don't double post.
/
To add comments, please log in or register