OrderType() == 6, 7 in the history pool?

 

Besides the 6 basic trade operations as detailed here https://docs.mql4.com/constants/trading, I've noticed that when selecting from the history pool, there are also: type 6 which is a 'balance' line and type 7 which is a 'credit' line.


Questions:

1. Where is this documented? I simply can't find it anywhere.

2. Are there any other types or are the possible types only 0-7?

3. I have noticed that selecting from the history pool depends on user settings of how long a history to show... Is there some way to override this and read all history regardless of the user setting?

 
I'd love to know this, as well. The issue has just come up in a client project...
 

1. Not documented.

2. No other type.

3. With WinAPI call, search the forum...

 
I vaguely remember that this could be (not documented - why?) IDs for deposits/withdrawals.
 

Hi!

6 is balance

7 is credit

8 is rebate


Some brokers pay the rebates when you invite some people to open an account. If the broker have the rebate option, you will receive a % of spread for each order opened. It doesn't mather if the order close with profit or not.


Regards.

 
Some brokers don't use the Commission/Swap fields. Instead the add balance entries.
 

you can try with test Print OrderType().


 for (int i = 0; i < OrdersHistoryTotal(); i++) {

      if (OrderSelect(i, SELECT_BY_POS, MODE_HISTORY)){

Print("Order Type : " + OrderType());

}

}

 
Amsori:

Please edit your post and

use the code button (Alt+S) when pasting code

 
gustavodemelo #:

Hi!

6 is balance

7 is credit

8 is rebate


Some brokers pay the rebates when you invite some people to open an account. If the broker have the rebate option, you will receive a % of spread for each order opened. It doesn't mather if the order close with profit or not.


Regards.

Hi, What about withdrawals? is there a way to calculate?

Reason: