Check Deposit / Withdrawal information

 
Hi,

I would like to using EA to check deposit/withdrawal information of the account, like the date time, amount of the deposit/withdrawal.
There's no way in the forum or documentation stated that it is able to do that.

Please help.

Thanks,
regards,
Yaohan
 
mikeyyh:
I would like to using EA to check deposit/withdrawal information of the account, like the date time, amount of the deposit/withdrawal.
There's no way in the forum or documentation stated that it is able to do that.
  1. 'Balance' statement: OrderType()==6
  2. 'Credit' statement: OrderType()==7
The order must be selected from the history pool first... OrderProfit() will return the amount, OrderOpenTime() will return the datetime, etc.

p.s. This is undocumented for some reason, but it does appear in some official MQ code in the articles...
 
gordon:
  1. 'Balance' statement: OrderType()==6
  2. 'Credit' statement: OrderType()==7
The order must be selected from the history pool first... OrderProfit() will return the amount, OrderOpenTime() will return the datetime, etc.

p.s. This is undocumented for some reason, but it does appear in some official MQ code in the articles...


hi gordon,

what is the difference between 'balance' and 'credit' type?
 
mikeyyh:


hi gordon,

what is the difference between 'balance' and 'credit' type?

'Credit' is bonus money some brokers give under certain conditions for promotional reasons. 'Balance' are statements of deposit/withdrawal, but are also used by some brokers for other reasons (FXCM for example have many 'sync' statements of type 'balance').

 
Hi Gordon,

Thanks for the clarification!
 

I use this code to monitor account debit/credit value. It works great in a demo and live account, but does not work in Strategy Tester. Is this a bug?

//-------- Debit/Credit total -------------------
double Deposits() 
{ 
   double total=0; 
   for (int i=0; i<OrdersHistoryTotal(); i++) 
      { 
         if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)) 
            {
               if(OrderType()>5)
                  {
                     total+=OrderProfit(); 
                           
                  }
            }     
      }  
   return(total); 
}
 
wackena:

I use this code to monitor account debit/credit value. It works great in a demo and live account, but does not work in Strategy Tester. Is this a bug?

Cause there are no Credit/Balance statements in the Tester...
 
That makes sense. Thanks.
 
how to take report of deposit and withdrawal from real account through expert advisor
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
, then each symbol positions will be closed in the same order, in which they are opened, starting with the oldest one. In case of an attempt to close positions in a different order, the trader will receive an appropriate error. There are several types of accounts that can be opened on a trade server. The type of account on which an MQL5 program...
 
I want draw cash from mt4 but cannot can give some solusion
 
20003994:
I want draw cash from mt4 but cannot can give some solusion

Contact your broker, MQL5.com is not a broker not offers real trading accounts.

Reason: