How It Works

General Information

This is a section for theory articles about business logic and complicated concepts that requires separate articles. It is very recommended to read all articles and especially articles about account types.

Main topics

Account Types & Features

  • How they work

  • What type to choose

  • Pros & Cons

  • Logic of allocations

Fees Types and Settings

  • How traders can charge investors

  • What to choose

  • How they are calculated and charged

  • How they can be shared with partners

Other Articles

  • Statistical parameters

  • Recommendations for sales

  • Everything else we made for you

Risk Limits for Accounts

  • How they work

  • What type to choose

  • Pros & Cons

API Integrations

  • Seamless authorization

  • Other requests

Accounts: Types & Settings

There are 3 account types in investment platform:

Copy Trading (Social Trading)

PAMM (Percent Allocation Management Module, act like investment fund)

MAM (Multi Account Management)

Differences about Account Types

All account types work in different way and designed for different purposes. One better for retail, second one - for institutional or private money management.

Learn the core differences between them in comparison table.

Detailed Articles about Each Account Type

Learn everything about how they work and how it is better to use each account type in your business.


For more details ref. to Copy Trading (Social Trading)


For more details ref. to PAMM


For more details ref. to MAM


PAMM (Percent Allocation Management Module) accounts give the opportunity for all your traders to run their own investment funds.

Main Features

  1. All investment accounts are combined in the one trading account (master account = pamm account).

  2. Only money manager can trade on PAMM account. Trading is disabled for investors.

  3. All investors get share of PnL made on PAMM account proportionally to sizes of their accounts.

  4. Can work as social investment tool with money managers shown in the Leaderboard and as institutional investment tool (MAM) when broker subscribes investors to master accounts.

  5. Several execution options are available, including autocorrection of master’s positions on withdrawals.

  6. Automated rollovers for deposits and withdrawals processed by the individual schedule.

  7. No need to close master positions during subscriptions / unsubscriptions / deposits or withdrawals.

  8. Fees for all investors can be set up separately.

  9. Automated subscriptions / unsubscriptions of investors.

  10. Investors can not see any opened positions in their MT5 terminal.

  11. Investors can see their performance and current equity including floating PnL of their investment accounts in web interfaces.

  12. All PnL is distributed to invesment accounts with 0.01USD/EUR/GBP precision (min available part of base currency of investment account).


Allocation of Positions in PAMM Accounts

  1. Master account (PAMM account) consists of investment accounts (Equity of PAMM account = sum of equities of investment accounts).

  2. Only Money manager can trade on master account.

  3. When money manager makes trades they doesn’t appear on investment account.

  4. When money manager closes positions investors get balance operations with their share of PnL for that position.

Formula for calculation of PnL for investment account

PnL of investor = Closed PnL for master position x (Investor's Equity / Master’s Equity)


PAMM account = 10000 USD

Investment account #1 = 1000 USD

Investment account #2 = 2000 USD

Investment account #3 = 7000 USD

Step 1: Master opens BUY 1 lot EURUSD @1.2110. Nothing is opened on investment accounts.

Step 2: Master closes 1 lot EURUSD @1.2120. Closed profit = 100USD.

Step 3: Investor #1 gets balance operation with 10USD. Investor #2 gets balance operation with 20 USD profit. Investor #3 gets balance operation with 70USD profit.

Behavior of PAMM Accounts During Deposits / Withdrawals

When somebody makes Deposit/Withdrawal (DW) shares of investment accounts are recalculated accordingly to new shares of investment after DW. After DW lblin label creates for all opened positions on master account and all floating PnL for all master positions is redistributed by balance operations to investment accounts.


Initial state:Master account = 1000USD. it has only 1 investor with 1000 USD

Step 1: Master opened BUY 1 lot EURUSD @1.2110.

Step 2: Investor #2 subscribed and deposited 2900 USD when EURUSD was @1.2120.

Step 3: Investor #1 got balance operation with floating PnL at the moment of DW: +100USD

Step 4: Master closed position @1.2110.

Step 5: Investor #1 got a balance operation with his share of PnL between DW and closing of position: -27,5 USD (-100USD x (1100/4000). Investor #2 got his share of PnL: -72,5USD

Additional Options of Execution

  1. Autocorrection of master positions on Withdrawals.

  2. Deposits without rebalancing of positions.

How Autocorrection Works

Autocorrection helps money manager to automatically save same leverage (or margin level) on his account as before withdrawal by partial close of opened positions.

For example, we have PAMM account (4000USD) with 2 investors: 1000USD (25%) and 3000USD (75%). He has 1 lot EURUSD opened position.

Then investor #2 withdraws 2000USD.

Before withdrawal investor #1 had virtual position: 0.25 lot EURUSD and investor #2 0.75 lots respectively.

With autocorrection Master position will be partially closed by autocorrection proportionally to withdrawal amount >>> 2000USD/4000USD x 1 lot >>> 0.5 lots will be closed.

So after withdrawal investor #1 will get same size of virtual position: 0.25 lot same as investor #2 (they have same equity).

Without autocorrection Positions of money manager will not be affected but investors will get new shares in PAMM after withdrawal: investor #1: 50% and investor #2: 50%.

So both investor #1 and investor #2 will get 0.5 lots of EURUSD after withdrawal.


That means that leverage for investor #1 increased by 2 because of actions of investor #2.

We implemented rollovers to eliminate such surprises because of withdrawals or deposits even on model without autocorrection.

Money manager can set a schedule for deposits and withdrawals, so he knows when exactly will be executed DW requests and how much money investors plan to deposit and withdraw.

He can make set a schedule for rollovers in settings of master account in his account settings in Web UI.

Deposits without Re-Allocation of Positions

For example, we have PAMM account (4000USD) with 2 investors: 1000USD (25%) and 3000USD (75%). He has 1 lot EURUSD opened position.

then investor #2 deposits 4000USD.

Before deposit investor #1 had virtual position: 0.25 lot EURUSD and investor #2 0.75 lots respectively.

After deposit their virtual positions will not be changed. Investor #1 will have same 0.25 lots and Investor #2 will have 0.75.

It is highly recommended not to use that feature because of 2 side effects:

  • Performance of master account will be different from performance of investment accounts (as positions were not rebalanced)

  • Master account will have bigger margin level then investor #1, so investor #1 can hit stop-out earlier than master

Copy Trading (Social Trading)

Social trading is the best account type for launching a retail investment product in brokerage company.

Main Features

  1. Investor can copy trades from several signal providers simultaneously.

  2. Investor can subscribe and unsubscribe from signal provider without help of broker.

  3. Subscription and Unsubscription can be made within seconds by investor without approval of trader.

  4. Investor can make his own trades on investment account.

  5. Deposits / Withdrawals are immediate on investment and master accounts.

  6. Investor can partially / fully close positions of money managers.


Allocation of Positions in Social Trading

  1. Investment account and master account are separate accounts.

  2. Trades that are opened on investment account don’t affect master account.

  3. In social trading only Proportionally By Equity x Ratio allocation method is available.

  4. Risk Ratio is equal to 1 by default and can be changed in the account subscriptions in the web.

Formula for calculation of investor’s position size for social trading

Position of investor = Master position x (Investor’s Equity / Master’s Equity) x Risk Ratio

Example for calculation

All masters have 1000$ on their accounts and investor has 2000$.

When master #1 opens 0.5 lot EURUSD, 2 lots are opened on investment account because he has 2 times more moneyplus x2ratio multiplier (0.5 lots x (2000USD/1000USD) x 2).

When master #2 opens 0.5 lot EURUSD then 1 lot is opened on investment account.

When Master #3 opens 0.5 lot EURUSD then only 0.5 lot is opened on investment account.



MAM accounts are the best tool for managing pool of clients in a unique way. It was developed specifically for professional money managers and hedge funds managers.

BIG article about unique ways of using MAM

Main Features

  1. 7 allocation methods

  2. Activation / Deactivation of investors without closing positions

  3. Trader can use several master accounts for managing his pool of investors

  4. No need to create separate MT groups for each money manager

  5. Fees for all investors can be set up separately

  6. All fees are paid automatically

  7. Money manager can use several master accounts for managing his pool of investors with different allocation methods, risk ratios and activated/deactivated investors

  8. All investors in MAM are in read-only mode. Investors can not trade on them on their own

  9. Investors can see their opened positions on their MT accounts.

  10. Deposits and withdrawals don’t affect master account’s equity as accounts are separate.


Allocation Methods for MAM

  1. Proportionally by Balance

  2. Proportionally by Equity

  3. Proportionally by Balance x Ratio

  4. Proportionally by Equity x Ratio

  5. Proportionally by Free margin

  6. Fix lot allocation

  7. Ratio Multiplier

Formulas for Allocation Methods

  1. Proportionally by Balance

Position of investor = Master position x (Investor's balance / Master’s Balance)

  1. Proportionally by Equity

Position of investor = Master position x (Investor's Equity / Master’s Equity)

  1. Proportionally by Balance x Ratio

Position of investor = Master position x (Investor's balance / Master’s Balance) x Ratio

  1. Proportionally by Equity x Ratio

Position of investor = Master position x (Investor's Equity / Master’s Equity) x Ratio

  1. Proportionally by Free margin

Position of investor = Master position x (Investor's free margin / Master’s free margin)

  1. Fixed lot allocation

Position of investor = fixed lot (ratio) Position of investor is opened in the direction of master trade

  1. Ratio Multiplier (sometimes called lot allocation)

Position of investor = Master position x Ratio

General Comparison of Account Types

When to use each account type

  1. Social trading

  • Best for retail

  • Really easy to use without any complicated details about its behavior

  1. PAMM (Fund)

  • Can be used both for retail and professional money management

  • Can be used both with and without leaderboard. Depending on situation and business model. Without leaderboard can be also considered as a type of MAM for professional money managers

  • Everybody is used to this account type as it very natural for everybody if explained as investment fund

  • As soon as deposit and withdrawal requests are not immediate, it is more complicated for retail investors than copy trading. So better to prepare some materials and FAQ on a website prior to launch it

  1. MAM (Multi-Account Management)

  • For institutional or professional money managers only. Because in this account type money manager can change allocation settings for investors by himself

  • MAM is a general name of investment structure when money manager holds full power over allocation method for each investor. In many situations PAMM also can be called MAM

  • MAM can be combined with PAMM. For that kind of structures and setups please ask for consultation B2Broker’s support team



Social Trading





Money managers appear in leaderboard




Better to hide MAM Master from leaderboard as his performance can be different from investor’s. Because Money manager can activate / deactivate Investor and use different formulas for copying trades to investment account


Investors can subscribe to money managers by themselves




Any master account can be hidden from leaderboard - investors will not see and subscribe it


Investors can see opened positions in MT5




Investors of PAMM accounts get only balance operations on invesmtent accounts with their share of PnL of position opened on master account


Investors get exact same return as money manager




MAM and Social Trading are based on coping trades from master’s account to investor’s and this operation always takes a piece of time. So execution prices on investors and master can be slightly different


Deposit/Withdrawal on investment account affects equity of Master account




PAMM-master account is combined from several investment accounts, so that’s why when you deposit money on PAMM investment account same amount will be deposited to PAMM Master. In MAM and ST investment accounts are separated from Master accounts


Instant Deposits/Withdrawals




Deposits/Withdrawals (DW) in PAMM accounts usually made with scheduled rollovers so DWs will not be a surprises for money managers. But it is possible to set them in Immediate mode


Subscriptions and Unsubscriptions are immediate




Subscriptions/Unsubscriptions trigger deposits trigger Deposit/Withdrawals, so here is the same logic as above: PAMM-master can manage the schedule when his investors can subscribe and unsubscribe


Investor can trade on investment account




In MAM and PAMM investment accounts are in Read-Only Mode


Investor can close position that was opened by a master




In MAM and PAMM investment accounts are in Read-Only Mode.


Investor can get reversed position




Investor in social trading or money manager in MAM can set a reverse copy setting on a subscription and get reverse trades. In social trading it helps get profits even by copying losing traders.

Fees: Types & Settings

Guides to Manage Fees in Manager’s App

Introduction into Fees’ Types

Basic Points

  1. There are 5 fees types are available for you in investment platform.

  2. All fees are calculated and paid automatically from investor’s account to money manager’s payment account.

  3. Money manager can change fees in web interfaces, but that will affect only new subscribers. Old investors will save previous fees settings.

  4. Fees can be set individually for each investor.

  5. Money manager can set several tiers of fees for investors of different size. Bigger investors can pay less than smaller ones. It helps to increase average deposit by 50%.

  6. Fees can be shared with the team of money manager. Broker can specify one or several other payment accounts and fees from all investors will be splitted between several payment accounts automatically.

  7. Fees from one investor also can be shared between money manager and his IB partner.

  8. Broker can turn on only specific fees and hide all other from web interfaces.

  9. Broker can change fees for existing users in database or admin panel.

5 Types of Fees Available in the Platform

Trade Fee = USD / Lot

Perf. Fee = Performance fee. Paid in % from net profit. Calculations are based on High Water Mark

Prof Fee = Profit fee. Paid in % from profit only from profitable positions

Mngm. Fee = management fee. Paid in % yield

Subscription Fee = $ / month (or $/day, or $/week, or $/quarterly, or $/semiannual, or $/annually)

Fees Description

Trade fee

  • Paid as USD / lot traded on investment account

  • Popular type of fees and used by 65% of our clients. very simple and useful. More you trade - more you get paid

  • Usually from 2 to 10 USD/lot

  • Paid right after closing trade

Performance fee (% from net profit)

  • Performance fee is a default and most used fee type. It is an industry standard when you hear “i want investors pay me 40% from their profits”

  • Profits are calculated using the High Water Mark Approach (HWM). It means that incentive fees are paid only on NET new rises in asset value

  • Usually Performance fee is charged between 20% and 40% from profits. Rear high profitable masters can charge >40% and nobody wants to earn less than 20%. At least from deposits <$100k

  • Paid once in a period (day / week / month) or before the deposit or withdrawal



PerfFee = (( RealisPL + FloatPL ) - PrevPL HWM ) x %PF


PrevPL HWM = RealisPL_prev+FloatPL_prev


New Fee HWM = RealisPL + FloatPL if it > PrevPL HWM, else it left PrevPL HWM

Profit fee

  • % from gross profit. Paid as % from only profitable positions

  • Paid once in a period (day / week / month) or before the deposit or withdrawal


Only 1 our client use it. So it is unpopular as can harm your reputation. Master can lock their positions and get paid when he close it. But can be good motivation for traders to open accounts.

Management fee

  • Management fee is a type of fees which is used mostly by investment funds, not retail money managers. They say that it covers their expenses on offices, IT etc. Good type of fees as it is independent from profit or trading volume

  • Usually Management fee is set from 2 and 5% per year from net assets (equity)

  • Paid once in a period (day / week / month / quarterly / semiannual / annually) or before the deposit or withdrawal

Subscription fee

  • New type of fee

  • It is flat fee. Just $/time period

  • Can be charged as $/day or $/week or $/month or $/quarterly or $/semiannual or $/annually

  • Simple and easy but small accounts will pay same amount as big ones

  • Paid at the beginning of the period

How to Check Calculations?

You as a broker can find all calculations in logs.

Real example

Below are logs for one of performance fees payments on PAMM investor:

2089011'/2089022 last @12320, Weekly 2019.12.05 12:12:26: RelisPL=164.36, Float MT=0.00, FloatPL(CM)=-0.58, Prev Fee HWM =0.67  new PerfFee=53.83, proc=33.00(lvl_id 178) 2019.12.05-10:12:26.196 | Commiss       | DWSynced MA 2088902 |      | @17135 IA 2088902953/MA 2088902243 add fee=-53.83 period Weekly, New Fee HWM =163.78

And here we can find the following info:

RealisPL=164.36 — net realized profits & losses on account

Prev ReaislPL=0.67 — realized net profits & losses on account which participated last time in calculations (PrevPL HWM)

PrevPL HWM = RealisPL_prev+FloatPL_prev

Float MT=0.00 — floating PnL in MT on investment account

FloatPL(CM)=-0.58 — this is a floating profit/loss for particular PAMM investment account. But this amount is virtual and calculated based on PnL of all master’s positions at the moment

New PerfFee=53.83 — fee amount which will be deducted now from invest account by formula:

PerfFee = (( RealisPL + FloatPL ) - PrevPL HWM) x %PF

PerfFee = (( 164.36 - 0.58 ) - 0.67 ) * 33%

New Fee HWM =163.78 — new High Water Mark for fee calculation

RealisPL + FloatPL if it > PrevPL HWM else it left PrevPL HWM

Risk Limits for Accounts

2 Types of Risk Limits

The investment platform has risk management tools for its clients. It can act as a personal and automated risk manager for money managers and limit risks for investment accounts as well making investments a passive source of income.

The Main Difference Between 2 Types of Risk Limits

  1. Risk limit on master account is Daily (renewable). It closes all positions and master account is turned into read-only till 00.00 MT server time. The only purpose of setting it is to limit risks for any particular day but not the total risks for the account.

  2. Risk limit for investors work in a different way. It sets for each subscription (link between master and investor). And It limits only risks for each subscription. If it is reached, investment account will be unsubscribed only from 1 master account and only positions opened by this master account will be closed on investment account.


Please go through this articles to learn more about Risk limit types:

Risk Limit for Traders (Master accounts) Risk Limit for Investors (Investment account)

Risk Limit for Traders (Master accounts)


How to sell it to a client

Daily Risk Limit is automated risk manager for every trader in Social Trading / MAM / PAMM. Every professional trader in hedge fund has its own so do you.


How it Works

This risk limit is a daily risk limit. It resets every day.

It is calculated as a % from equity at the beginning of each day (00.00 MT server time).

After it reached, investment platform closes all opened positions and blocks account till next trading day (00.00 MT server time).


Daily risk limit for traders helps them to protect their accounts from huge losses in a single bad day.


Risk_Limit_Signal_Equity = Equity_daystart x (1-RL%)

  • Equity_daystart - equity of account at 00.00 MT server time

  • RL% - risk limit in %

If equity of account is lower than Risk_Limit_Signal_Equity - then all positions will be closed and account will be turned into read-only till 00.00 MT server time.

How Deposits/Withdrawals Affect Risk Limit


Equity_daystart is adjusted by new Deposits/Withdrawals during the day. So withdrawal will not trigger the risk limit.

But as soon as Equity_daystart_afterwithdrawal will be smaller than equity_daystart_before_withdrawal, risk limit in $$$ will be also changed as after withdrawal.

The formula

Equity_daystart_afterwithdrawal = Equity_daystart - withdrawal_amount

so the signal equity will also be changed → → →

Risk_Limit_Signal_Equity_afterwithdrawal = Equity_daystart_afterwithdrawal x (1-RL%)

Risk Limit for Investors (Investment account)

Risk limit for investment account is a core thing for investments as it helps clients sleep well at night time.

Only risk limit can make from investments really passive source of income as without it investor will be forced to monitor performance and risks of account everyday or several times a day.

How It Works

Risk limit is set not on a whole account but on a link between master account and investment account (a subscription).

So Investor can set several risk limits that can be different for all master accounts.

Once risk limit is reached, the platform will close all opened positions on investment account that were copied from a master account. If it is a PAMM investor, the platform will also withdraw all funds to a payment account of investor.

Flat Risk Limit

Flat risk limit (in $$$). Set in absolute values in amount of currency units in which investment account is nominated (e.g. 500$ for USD account in USD)

Formula of a Flat Risk Limit

Risk_Limit_Value = Sum of realized profit + sum of floating profit

  • It is calculated by equity (includes floating loss)

  • Sum of realized profit and sum of floating profit is calculated by positions that were copied from a particular master

  • Until Risk_Limit_Value > Loss_limit, subscription is active

  • Once Risk_Limit_Value < Loss_limit, investment account will be unsubscribed from a master


Loss_limit = 500$

Until Sum of realized Profit + Sum of floating Profit is bigger than -500$, account is active (-490$ is bigger than -500$)

Once Sum of realized profit + sum of floating profit becomes smaller than -500$, subscription will be closed.

API Integrations

API Requests for Seamless Authorization

Every broker can make a seamless authorization between Trader’s room and investment platform so their clients will not need to see that page anymore.


Users will be redirected from TR straigth forward to dashboard page inside of investment area.

How to Make a Seamless Authorization

Step 1: Make a la.auth Request to Backend Server

TR should make a POST request to a backend with a URL that looks like:


la_login: 432450857 la_type: 0 lbl: 1 ManagerPass: "QwMkfeAL1B"



la_login = wa_login = payment account of user; are same and must exist in MT and be available for MT managers that are connecting the platform to MT.

Step 2: Add Token to the Link

In response you will get an access token. You need to redirect user to URL of your investment section and add it to the end:

So the link will look like:

Step 3: Redirect User to that Link Above

TEST Credentials



la_login: 432450857 la_type: 0 lbl: 1 ManagerPass: "QwMkfeAL1B"



Add Token to URL:

Redirect User to a Specifit Language Version

To redirect user to a specific language version please add to a link language tags to make it like:

Supported Languages

  • ch

  • cn

  • de

  • en

  • es

  • ja

  • ko

  • pt

  • ru

Requirements for Setup

Requirements for Servers

Requirements for PAMM Backend Server


  • 4 CPU

  • 8 GB RAM

  • 150 GB SSD

  • OS Windows server 2016

  • Should be hosted in same city as MetaTrader Server


  • MySQL DB (Server + Workbench) - No encryption of password (compatible with MySQL 5.7)

  • Notepad++

  • MetaTrader Manager 4 и 5

  • Firefox / Chrome

  • Zabbix Agent

  • Microsoft Visual C++ 2017 x64 бит

Requirements for PAMM Web Server

  • CPU 1 core 2Ghz

  • RAM 2 GB

  • HDD 20 GB

  • nginx

Other Things

Checking Account Details

  • login + password from any account on a server


No deposit required, but we must be able to login in MT with its credentials.

Server Details

  • IP address of MT server

  • Name of MT server (as client see it in MT terminal)

Company Details

  • Name of a Company

  • Website of a Company

Create MT MANAGERS with Following Rights


Credentials for MT managers don’t need to be shared but must be prepared. Credentials could be filled by you during the setup. After it they will be encrypted.


  • Manager

  • Internal Mail System (optional)

  • Connections

  • Supervise trades

  • Personal Details

  • Accountant

  • Dealer


  • Manager

  • Send emails

  • Accountant

  • Access accounts

  • Access the account personal details

  • Edit accounts

  • View currently connected clients

  • Access orders and positions

  • Edit orders, positions and deals

  • Dealer

  • Supervisor