Account Checking

 

Hello,

I'm wondering if under the new MQL of bulds 574+ is there any way to identify if a given account is just a single trading account or a managed master account (PAMM - MAM etc...). I'm not asking for an IsMam() / IsPamm() function... that would be too easy... but I would be happy even for an hint, a string to check somewhere in the MT4 windows, a property of a Windows control or even an heuristic check.

I'm open to ideas and suggestions. The reason behind is quite clear: how to avoid the running of a given software ONLY on managed accounts?

Is there any solution (even complicated)?

I was thinking to navigate (via windows API) the account history in order to grab the various balance changes... but this is a sub optimal solution and I don't like it too much.

Could Metaquotes add something to the AccountInfo function in order to discern if a given account is managed or standalone?

Maybe an additional value for the ENUM_ACCOUNT_TRADE_MODE enumeration like:

ACCOUNT_TRADE_MODE_DEMO

Demo account

ACCOUNT_TRADE_MODE_CONTEST

Contest account

ACCOUNT_TRADE_MODE_REAL

Real account

ACCOUNT_TRADE_MODE_REAL_MANAGEDReal managed account

Thank you for your suggestions!

 

Hello!

I could be wrong, but technically there is not really such a thing as a PAMM or MAM account. They are simply MT4/MT5 "single" accounts that are managed together in software such as the MetaTrader's MultiTerminal.

I have used that software myself for managing several of my own accounts, and you have to input the login credentials of each single account. Even though you may be managing them with a single piece of software, they remain singular accounts and are not viewed as a MAM or PAMM group.

So, in my opinion, it is most likely that you will not be able to distinguish such a grouping of singular accounts.

 
Daltanious:

Could Metaquotes add something to the AccountInfo function in order to discern if a given account is managed or standalone?

Most (all?) PAMM and MAMM services are third-party plug-ins for MT4 Server. The MetaQuotes software itself doesn't know that an account is MAMM/PAMM; all it knows is that some or all orders are coming in from an external source.

There are reliable ways of determining that an account is MAMM/PAMM, but no reliable ways of determining that an account is not PAMM/MAMM - in other words, no false positives but lots of unknowns. For example:

* AccountServer() returns a server name which includes "PAMM".

* Account history only contains deposits and credit movements, not trades (i.e. one of the nasty MAMM services which only credits profit/loss to the account rather than apportioning the individual trades.)

 

Hi FMIC,

thanks for your quick answer!

The point is that the MT4 server know exactly what the account is and/or belong. It would be very useful and informative to know more infos about that.

I was wondering if in the new build 577+ there's something new on this field and/or if somebody can advise me better about that.


Certailny Metaquotes could implements something on this field...

 

gchrmt4:

* Account history only contains deposits and credit movements, not trades (i.e. one of the nasty MAMM services which only credits profit/loss to the account rather than apportioning the individual trades.)

I've never seen any way to read the full history of an account.

I can read only orders, not balance/deposit transactions.

 

A side question...

is there a (simple) way to programmatically force the Account History tab to "Show All" ?

Any hint ?

 
Daltanious:

A side question...

is there a (simple) way to programmatically force the Account History tab to "Show All" ?

Any hint ?

I seem to remember seeing a PostMessageA solution to that . . .
 
RaptorUK:
I seem to remember seeing a PostMessageA solution to that . . .


Thank you for the hint, I found this:

https://forum.mql4.com/ru/14463/page5#401551

And it works.

Cheers!

Reason: