Skip to main content

MAAB Trade Filter: Copy Master Account Only When It Is Making Profits

Local-Trade-Copier-Tutorials-MAAB-FILTER-How-To-Copy-Master-Account-1745x1080

All strategies have drawdowns or periods when they face unfavorable market conditions. MAAB Trade Filter is specifically made to reduce negative effects on your account when combined with the Local Trade Copier. It is an easy solution to minimize drawdown and copy Master Account only when it is making profits. This tool also has the power to turn bad EAs and strategies into winners. Find out how MAAB Trade Filter makes it happen in this guide.

MAAB Trade Filter – How it Works

MAAB stands for Moving Average on Account Balance. As traders, we open and close trades, and the account balance moves up and down, creating a histogram. Now, plotting a Moving Average on top of the balance histogram we instruct MAAB Trade Filter not to allow losing trades to take effect. Losing trades that make the balance or equity below this Moving Average are simply filtered out. They are not copied from the Master account to the Client account. Once winning trades makes the account balance histogram go above the Moving Average, MAAB Trade Filter will allow them to grow the Client account. A simple, yet unique solution to effectively protect Client accounts.

In the picture below you can see the Master account where the purple background is. MAAB Trade Filter indicator is also visible here. The Client account is just below. This example shows two MAAB Trade Filters applied from two Master accounts.  It is just a demonstration that you can merge multiple MAAB Trade Filters into one Client account.

MAAB Trade Filter for the Local Trade Copier™

MAAB Trade Filter for the Local Trade Copier™

MAAB Trade Filter tracks one Master account. However, you can stack up multiple MAAB Trade Filters to track multiple Master Accounts. Very useful if you have different strategies from multiple Master accounts and want to filter those who are not currently making profits. This way, the Client EA only receives trades from winning Master accounts. MAAB Trade Filter can also work in reverse mode if you need it.

Note that the red Moving Average you see on the Master account histogram is just for your reference. The Moving Average on the Client-side is the one that will be used by Client EA for filtering. Just to avoid confusion if you use different Moving Average settings on those accounts.

Setting up your MAAB Trade Filter

  1. First things first, set your MAAB Trade Filter indicator on the server-side, on your Master account. The MAAB Trade Filter will scan every closed trade on the Master account and then send the signal to Client accounts, if applicable.
  2. Secondly, plug-in MAAB Trade Filter to your Client account too. MAAB Trade Filter histogram you see on the Client account shows the account balance from the Master account, not the Client account balance. The reason behind this is to show you what trades are filtered out from the Master account.
  3. After you plug in MAAB Trade Filter on the Client-side you need to type in the account number you want it to track. In the top right part of the picture below, we use account number 60055865 as an example:
    MAAB Trade Filter settings

    MAAB Trade Filter settings

  4. Now, we need to enable MAAB Trade Filter on the Client EA. It may look like it is automatically enabled once you see the visuals, but we need to turn it on from the Client EA settings window. Scroll to the Trade Filter section and set it to True.

We are ready now to put MAAB Trade Filter into action! But make sure you understand all of MAAB Trade Filter powers and how to adjust it to your preference. In the next section, we will demonstrate exactly that.

MAAB Trade Filter Features Demonstration

So, I have my VPS up and four MetaTrader accounts running on it. MetaTrader 4 will be my Master account #1, and MetaTrader 5 will be my Master account #2. On the right side, I have two Client accounts, running on MetaTrader 4 and MetaTrader 5.  Now, both Client accounts will copy trades from both Master accounts, however, MAAB Trade Filter will be engaged so we can see how it filters undesirable trades.

First, I will set up my server-side Master accounts. Open MetaTrader 4 and apply Server EA to the chart (drag n drop) from the Experts list. You will need to have at least version 2.9.9 of the EA to make it work with the MAAB Trade Filter. Click OK and do not worry about settings now.

Setting up Server EA on the Metatrader Master Account

Setting up Server EA on the Metatrader Master Account

Now go to the MT4 Indicator list and apply the “MA on Account Balance (server)” indicator to the chart too. No need to change the settings, however, if you need it to track an EA with a specific Magic Number you have that option available. Otherwise, a setting of 0 means it tracks manual trading. If you set the Magic Number input to -1 it will track all the trades on this account.

Configuring MAAB Trade Filter settings on the Master account

Configuring MAAB Trade Filter settings on the Master account

If you zoom into the histogram, you will notice each histogram bar represents how closed trade affected the balance. A mouse-over tooltip above the indicator will display balance information on each bar. Notice that the histogram went down as losing trades closed and it went just below the Moving Average. At that point, MAAB Trade Filter would stop accepting trade signals from this Master account.

Master account balance histogram with a Moving Average (MAAB Trade Filter)

MT4 Master account balance histogram with a Moving Average (MAAB Trade Filter)

Now I will set up a Metatrader 5 account, my second Master account. I can repeat the same procedure as for the first Master account. I apply the Server EA for the MT5 (at least version 1.1.6), then attach the MAAB Trade Filter indicator dedicated for the MT5 server-side. Notice this second Master account has a balance histogram below the filtering Moving Average, meaning it has a series of losing trades. We do not want these losing trades on the Client account, don’t we? That is why we filter them out using the MAAB Trade Filter.

MT5 Master account balance histogram with a Moving Average (MAAB Trade Filter)

MT5 Master account balance histogram with a Moving Average (MAAB Trade Filter)

Moving on to the Client account on MT5. Here I will first insert the MAAB Trade Filter indicator for the client-side onto the MT5 chart window. A settings window will pop up and it will show a few options. You can change the Moving Average periods (default 13), MA types like Simple, Exponential, Smoothed, etc. For the MAAB Trade Filter to work, we must input the Master account number in the ServerAccountNumber field. No worries, in case you forget to type in the number the indicator window will display a warning.

Setting up MAAB Trade Filter on the client-side

Setting up MAAB Trade Filter on the client-side

In my example, the Master account number is 60055865. Again, the indicator will now show the Master account balance, not the Client account balance.

MAAB Trade Filter applied on the client-side is actually tracking Moving Average on Master Account Balance

MAAB Trade Filter applied on the client-side is actually tracking Moving Average on Master Account Balance

Finally, I can attach the Client EA now onto the chart. In the EA settings, scroll down and find the MA Trade Filter line and set it to True. Right below you will also see the option to apply the Moving Average to the Master account balance histogram or account’s equity.

Setting up Client EA on Metatrader 5 Client Account

Setting up Client EA on Metatrader 5 Client Account

Regardless of your preference, The MAAB Trade Filter indicator will show an orange horizontal line that represents the current equity of the Master account. It will refresh every 15 seconds or so. As we see, the balance of this Master account is above the Moving Average so the Client EA will copy the trades to the client side.

Master Account balance histogram is above its Moving Average which means the Client EA is allowed to copy the trades.

The Master Account balance histogram is above its Moving Average which means the Client EA is allowed to copy the trades.

If you want to set the Moving Average to 50 periods, of course, this will also affect how the MAAB Trade Filter indicator behaves. With a 50-period Moving Average, the histogram balance is now below the MA, meaning the MAAB Trade Filter will cease copying trades from this Master account. Since the 50 period MA reacts slower to the histogram changes, it will need more winning trades before the histogram is above the MA(50). Only then the Master account trades will be allowed again to the Client account.

With 50-period MA, the MAAB Trade Filter will not allow Client EA to copy trades from the Master.

With a 50-period MA, the MAAB Trade Filter will not allow Client EA to copy trades from the Master.

For now, let’s change back the MA period settings to 13.

While I am still on this client-side platform, I will add the MAAB Trade Filter for the second Master account (the MT5). I will insert the MAAB indicator (client-side) into the chart and input the Master account number in the settings.

Setting up the second MAAB Trade Filter on the Client Account

Setting up the second MAAB Trade Filter on the Client Account

Now we can see two indicator windows showing the balance histogram from each Master account.

Two MAAB Trade Filters tracking two Master accounts

Two MAAB Trade Filters tracking two Master accounts

When we have a Client account setup like this, the MAAB Trade Filters will cease copying trades for any Master account that does not qualify. To qualify they need to have a histogram above the Moving Average you set.

Finally, we have a second Client account that we want to improve with MAAB Trading Filter. I will attach the MAAB Trade Filter (client-side) indicator first and then set it to connect with the first #60055865 Master account in the ServerAccountNumber field.

Setting up a MAAB Trade Filter on the client-side

Setting up a MAAB Trade Filter on the client-side

Now we add the Client EA v2.9.9f from the Experts list and enable it from the settings window. This time I will also set the EA to compare the Moving Average to equity instead of the account balance.

Setting up the Client EA on the Metatrader 4 to use the MAAB Trade Filter

Setting up the Client EA on the Metatrader 4 to use the MAAB Trade Filter

Check out the orange Equity line. It is below the Moving Average right?

Orange equity line representing the Master account equity

Orange equity line representing the Master account equity

Because of this, all trades from this Master account will be suspended until the equity goes above the Moving Average.

MAAB Trade Filter in Action Examples

Let’s go ahead and make some trades to see how MAAB Trade Filter manages trading from winning Master accounts and from those that currently do not show good performance. I already have a lot of trades open so I will pick one currency pair that does not have any. It is the USDJPY.

Let’s buy half a lot on the first Master account (#60055865) and see what happens on the Client-side platforms.

USDJPY BUY trade filtered out by MAAB Trade Filter

USDJPY BUY trade filtered out by MAAB Trade Filter

As expected, the first Client account immediately copied the trade. The account balance from the Master account was above the Moving Average.

However, the second Client account denied that trade. This is because we set the rule to compare the MA to Master’s equity – which was below the MA. We can confirm this by looking at the Experts tab and the line that says “Ignored trade BUY USDJPY because of the MAAB Trade Filter. Master account equity below MA13”. Clearly said, it is doing what we set it to do.

Ignored trade BUY USDJPY because of the MAAB Trade Filter. Master account equity below MA13.

Ignored trade BUY USDJPY because of the MAAB Trade Filter. Master account equity below MA13.

Even though the balance histogram was above the MA for this Master account, the equity was not. Once the equity goes above MA(13) the MAAB Trade Filter will allow it to pass to the Client account.

Trades that are ignored by the system will also trigger the question mark on the main chart screen to turn red.  A counter for all ignored trades is available too.

Ignored trades counter on the Client EA dashboard

Ignored trades counter on the Client EA dashboard

Let’s do some more trading from the other Master account. EURUSD looks like a good example, buying 1 lot. This trade is sent to two Client accounts we have linked, but let’s see if it is filtered on any.

The first Client account ignored this EURUSD trade, but the second Client account accepted it. Simply because we did not set up the second MAAB Trade Filter for this Master MT5 account on the second Client account. All trades that come from the Admiral Markets Master account to the IC Markets Client account are copied without any filtering.

EURUSD trade filtered out by MAAB Trade Filter

EURUSD trade was filtered out by MAAB Trade Filter on one account but copied on another.

If we go to fullscreen we can see the message in the Experts tab that trades from one of the Master accounts are ignored. The reason is “Master account balance is below MA13”. Perfect! That is what we want.

EURUSD trade filtered out by MAAB Trade Filter because Master account balance is below MA13.

EURUSD trade is filtered out by MAAB Trade Filter because the Master account balance is below MA13.

Now let’s see what happens when we close this EURUSD trade. It is in a small profit. Alright, the histogram went up a bit as the balance increased by the profit amount. The equity was updated too. On the Client side, the same balance and equity changes are also visible.

After I close the trade, the MAAB Trade Filter updates the balance and equity figures and the histogram.

After I close the trade, the MAAB Trade Filter updates the balance and equity figures and the histogram.

I will find and close some trades in a loss so I can show you what happens in this case. In the screenshot below, you can see that the loss caused the balance to go down which can be seen on the balance histogram going below the Moving Average.

t11-image-23_maab_trade_filter_(time_0_28_03;09)

This means MAAB Trade Filter will no longer allow trades to this Client from either Master account. They both do not pass the filter rules we have set in the MAAB Trade Filter. To test this I will open a new USDJPY trade. As expected I see a “sell USDJPY ignored” message on the Client (see screenshot below), good job!

MAAB Filter ignored a trade because the Master Account Balance histogram is below its Moving Average.

MAAB Filter ignored a trade because the Master Account Balance histogram is below its Moving Average.

Since I have some trades in profit too I will close them to see what happens.

After I close a profitable trade, the balance goes up and its histogram goes above Moving Average again!

t11-image-25_maab_trade_filter_(time_0_28_53;08)

Does it mean the MAAB Trade Filter will now allow this Master account trades to the Client-side? Let’s test it out, I will make another USDJPY trade.

t11-image-26_maab_trade_filter_(time_0_29_20;14)

Alright, the first client copied this trade, however, the second Client account did not. If you remember, there is a rule for MAAB Trade Filter we set – If equity is below the MA, ignore trades from this Master account. It just does what is supposed to do.

MAAB Trade Filter Reverse Logic

I open the Client EA settings on the first Client account (the one with two MAAB Trade Filters) and set the MAAB Reverse Logic parameter to True.

Enabling reverse logic for the MAAB Filter

Enabling reverse logic for the MAAB Filter

I will also set the Reverse Trades to True under the Trades Manipulation settings section in the Client EA.

Enabling Reverse Trading mode in the Client EA

Enabling Reverse Trading mode in the Client EA

Click OK and then open the Client EA settings on the second Client account (the one with just one MAAB Trade Filter set to compare equity). Now, let’s keep the equity rule and change MAAB Reverse Logic to True.

Enabling reverse logic for the MAAB Filter

Enabling reverse logic for the MAAB Filter

Ok, now the first Client account has the EA instructed to use MAAB Reverse Logic and also reverse trades, meaning “buy” trades become “sell” trades and “sell” trades become “buy” trades.

The second Client account has MAAB Trade Filter set to compare MA to Master account equity but with Reverse Logic – meaning if equity is below the MA trades are copied to the Client account and if above they are filtered. Let’s test this setup with a trade now.

Opening USDJPY “buy” trade…

Copying trades with Reverse MAAB Filter logic

Copying trades with Reverse MAAB Filter logic

The second Client account with the reversed equity rule was allowed to copy trades. Makes sense since the equity is below the MA. Before the Reverse Logic change, all trades were filtered.

Meanwhile, the first Client account ignored this USDJPY trade. The Reverse Logic denied it now since the balance is above the MA. Normally, the MAAB Trade Filter would allow it, however, we have reversed its logic.

But what will happen if I open a EURUSD “buy” trade on the second Master account, the one with reversed trade logic? My “buy” EURUSD trade gets copied as “sell” EURUSD.

Copying trades with Reverse MAAB Filter logic

Copying trades with Reverse MAAB Filter logic

The second Client account copied the trade normally since we do not have any MAAB Trade Filter enabled for this Master account.

The first Client account is a different story though. The Master account has a balance histogram below the MA. Normally, it would not be allowed to the Client-side, yet we have inversed its logic. With the Reversed Trade enabled too, the “buy” EURUSD becomes “sell” EURUSD.

After all this, you might be wondering why would we need all this inversion? Well, this is a perfect solution for all Reversal trading strategies! It makes sense to reverse trades from a losing account, right? Why not make bad, losing strategies profitable? And with the MAAB Filter reverse logic, we are going one step further – we copy bad losing strategies (and reverse their trades) only when the Master account is losing. It is funny but true, now you can start composing bad strategies as well, and make use of all those EAs or strategies you have thrown into the trash bin.

Rimantas Petrauskas

Rimantas Petrauskas is one of the most well-known programmers among Forex traders. Having more than 20+ years of programming experience, he created two of the most popular trade copiers for the MetaTrader 4 platform—the Signal Magician and Local Trade Copier. Rimantas is also a best-selling author on Amazon after his book "How to Start Your Own Forex Signals Service" hit #4 in the Forex category during the first launch week.

One Comment

Leave a Reply to Juan David Cardona Cancel Reply

Malcare WordPress Security