Defend Your Trading Account: Introducing Drawdown Manager EA for MT4/MT5! Wave Goodbye to Account Blowouts!

1 May 2024, 07:33
Biswarup Banerjee
0
202
Drawdown Percentage is the largest percentage of drop from the highest point of your account balance. Let’s say you start your trading with 50 dollars and after some profit, your account reaches up to 100 dollars. Now from this point, after making losses your account balance drops to 70 dollars, and then the drawdown will be 30%.
Why it is important?
Most of the algo traders, add one or more expert advisors in an account without proper backtesting or without doing money management. Sometimes, they just go by the advertisement and rely on the profit shown on the website. As a result, all of a sudden, their accounts just blow someday. To protect your account from such unwanted situations, you need to have a safeguard.
Drawdown Manager is an expert advisor which is designed to manage your trades. These trades can be either from any Expert Advisor or manually placed by you. So, it will act as a safeguard for your account. That means it does not have any logic to place any trades. Rather it only checks if your current trades, reach drawdown, or other safety conditions and then closes them.


How to configure?

There are different inputs that give you lots of flexibility in how you are going to manage your trades for that account. For prop firm traders there are many rules, which they need to follow. For example, There should not be more than N trade per day, Your daily, weekly, monthly, and overall drawdown percent of the account, should not be more than x percent.
So, to set it up, open a new chart with any symbol. Then put the expert advisor into that chart. Then go to the input section of the “EA”.
Now I am going to explain the inputs one by one
Capture Logs
If you set it to true then, If any error occurs due to wrong setup or other reasons, during trade closure or some calculation, it will print valuable information in the Expert tab.
Enable Magic Number
If you set it as true then Ea will only calculate the drawdown of trades which has this particular magic number.
Magic Number
When the Magic Number filter is enabled then, the drawdown and other calculations are done only on the mentioned magic number inside this field.
Delete Pending Order After N bar
Sometimes, you place a manual pending order, or some other "EA" places it, based on some signal. The order for that signal may be not triggered, and you forget to delete that after some time. If it activates after a long time from getting the signal, then there is a high chance that it will result in loss. Because it did not get triggered when it should have. To avoid such a situation, we have this configuration. So, if you mention 5, that means after 5 candles from the time, when the pending order was placed, it will be deleted automatically.
Loss Amount
This input field will check, the total loss of the account. When the total loss of the account is greater than this value, then it will take the action, mentioned in the action tab. Let me show you a quick demo. I am setting the loss amount to 10. Next, I will scroll toward the bottom of the settings and set the action as close all trades. For now, I am setting other values as false. Now, I will place a couple of random trades consecutively, so that, the total loss amount reaches that value quickly. As you can see, as soon as the account loss, reached this value, it closed all the trades.
Loss Percent
This time instead of the amount, the EA will check, if the total loss amount is equivalent to the X percent of the account balance. Where this X is the value mentioned in this input field. So, currently, our account balance is 986. If we mention,1 % in this input field. Then when the total loss, of the account reaches 9.8, it will perform the chosen action. Here, we have chosen to close all the active trades. This time also I am placing some random trades to reach the equivalent loss amount of this percent, quickly. As you can see, when the total loss reached 9.8, which is 1 % of the account value, it closed all the trades.
Check for swap and commission.
When this input field is set to true, then all the loss calculations also consider the swap charges and the commission, imposed by the brokers to carry forward trade to the next day.
Now let's come to the most important section of our EA. Which is SAFEGUARD SETTINGS
Maximum Open Trades
Opening too many trades on an account could be risky and break the trading discipline. Hence the chance of loss increases. That’s why, we have introduced this input. When it is set to true, then a user or EA can not place more than X number of trades, where X is the value of this input. As soon as another EA or you, manually try to place the trade, this logic closes the last trade.
Maximum Long and Short Trades
These inputs are very similar to the last input, but this closes, the last trade based on type. When max long trade is mentioned, it won't allow placing more than the specified amount of long trades and the same goes true for max short trade input settings.
Maximum Trades per day, week, and month
These inputs are also like the last ones. The difference is, that it will check the maximum number of trades placed in the account for the specified timeframe. Let's say we specify the maximum number of trades per day is 5, then when there are already 5 trades placed in that day, If any additional trades are placed in this account, then it will be closed by this EA. We can watch this information in the dashboard. Similarly, if the maximum number of allowed trades in a week, is exceeded then it will stop the further trades till the end of the week. And the same goes for the month.
Maximum Drawdown
If we set this field, then EA will constantly monitor the account’s drawdown. When it reaches the mentioned value in this input field. It will take the corresponding action, mentioned inside the action inputs. So let’s quickly test this feature. I am setting the drawdown % to 0.2. This means, that when our account drawdown reaches that value, it will close all the trades. We can monitor this value in the dashboard. So let me place some random trades and wait to reach the drawdown. As you can see, as soon as the trades reached the drawdown, it closed them. Now you might think, what if even after closing them other EA place trades again? We have a solution for this situation as well. I am going to discuss that at the end of the video. So I am requesting you, not to skip any part.
Daily, Weekly and Monthly Drawdown
These inputs are also meant to monitor the drawdown. But the EA monitors drawdown in individual timeframes. All of these values are displayed in the dashboard. If we mention 5%,10%, and 20% as daily, weekly, and monthly drawdowns. Then when our account drawdown reaches 5% in a day it will take action and it will be effective for the rest of the day. On the other hand, if the drawdown in a week reaches 10% it will take action and it will be effective for the remaining week. In the end, if the drawdown reaches 20% in a month it will take action and it will last till the month's end.
Now let me show you the final and most important part
Action Settings
These inputs control, the action when some criteria are met by the EA. At first glance, you may think that closing all the trades would be the only action. But wait, what if someone tries to manually place trades even after, the maximum drawdown condition is reached? Though it would be closed immediately by this EA. But if the lot size is large, then even after we immediately close it, it would cause us an ample amount of loss. To prevent this situation, we have two options.
Close all charts
Let's say your trades are being placed by any other EA that is running on the other chart. So if this option is enabled, it will first close the trades if the close trades option is enabled. And then it will close all the charts. As the charts are closed, currently no EA can place, modify, or close any trade in the terminal. Only manual trades can be placed by the user. So let's see a demo. I will increase the drawdown amount a little bit and will try to place some random trades, to reach the drawdown quickly. As you can see, it closed all the charts.
Close the terminal
This is the ultimate option. Here you are closing the running terminal itself. So, it will make sure no one can place manual trades or trades from any EA. This time I will increase the drawdown a little more. Now again I will place some random trades, to reach the drawdown. As you can see, this time the terminal is closed by the EA, after closing all the trades.

Alert Settings
There are 3 alert settings alert, notification, and email. When set to true it would send alerts on the terminal, send push notifications on the MT4 or MT5 mobile app, and send email which is configured in the terminal. If you don’t know how to configure email, then follow this video.

As a closing note, I would like to tell you that, this utility is extremely useful for the prop firm traders. Where drawdown control is very crucial. I hope you like these features. If you want any other possible use cases. Please let me know in the comment box.


You can download the MT4 demo version here

You can download the MT5 demo version here


Share it with friends: