PAMM Client Data

PAMM account manager from a strategy can retrieve information about client accounts from the IAccount interface.

Retrieve client data

Consider retrieving all client account data, which in the API is represented by the IClientInfo interface.

@Override
public void onStart(IContext context) throws JFException {
    account = context.getAccount();
    console = context.getConsole();

    for(IClientInfo clientInfo : account.getClients()){
        console.getOut().printf("Client ID=%s, account currency=%s, equity=%s\n", clientInfo.getClientId(), clientInfo.getAccountCurrency(), clientInfo.getEquity());
    }
}

PammManagerTest.java

Follow account change

Consider following client stop loss level changes and withdrawals.

@Override
public void onMessage(IMessage message) throws JFException {
    if(message instanceof IStopLossLevelChangedMessage){
        console.getOut().println("Client stop loss change: " + message);
    }
    if(message instanceof IWithdrawalMessage){
        console.getOut().println("Client withdrawal: " + message);
    }    
}

PammManagerTest.java

The information on this web site is provided only as general information, which may be incomplete or outdated. Click here for full disclaimer.