Drawdown Limiter for funded challenges and to protect your balance – Other – 22 March 2023
Are you tired of watching your trading account balance dwindle down to zero after a few bad trades? Do you struggle to meet your daily drawdown targets imposed by funding organizations like FTMO and My Forex Funds? Look no further than Draw Down Limiter, the expert advisor that protects your account from catastrophic losses and helps you meet your funding requirements.
Draw Down Limiter is the ultimate risk management tool that ensures your trading account stays afloat during volatile market conditions. Its sophisticated algorithms detect potential drawdowns and automatically limit your losses, preventing your account from being wiped out. Plus, it helps you meet your daily drawdown targets, increasing your chances of successfully securing funding from top trading firms.
With Draw Down Limiter, you can trade with confidence, knowing that your account is protected from the unpredictable nature of the markets. So, whether you're a beginner or an experienced trader, add Draw Down Limiter to your arsenal and take your trading to the next level.
I am an EA automated trader, and I developed this utility to help me respect this rule, and I am proposing it here to help you too. This EA is ideal for copy trading or EA trading with a prop firm.
You can find the EA under:
The EA functionalities:
The expert advisor’s essential function is to monitor all the activities on the account, whether it was a manual or automated trade by another expert advisor. You need to add it to a chart, and it will take control. It calculates the Maximum Daily Loss = results of closed positions of this day + the result of open positions. When a trade opens, the EA will display your daily profit/loss. Once the draw-down percentage is reached, it closes all open positions and orders. Any new order will be instantly closed. At the end of the day or mentioned range, the threshold is set back to zero, and a new day begins.
An advanced mode of this EA, if you are an expert advisor developer, is to use to complete your current expert advisor. The Drawdown Limiter EA can pass instructions to prevent your EA from sending orders, and this will help you not to pay commissions for trades executed after the drawdown limit is reached. Check the advanced section below.
The EA Settings:
- GENERAL EA SETTINGS
- Magic number: It keeps track of the trades closed by the EA.
- Trade comment: Comment included in the order executed by the EA
- DEFINE YOUR RESET RANGE
- Drawdown Reset Cycle: You can even choose a cycle on the opening of the daily bar or a specific range. If the latter is chosen, you must define your start time range. The specific range will be compared last known server time visible in the Market Watch window.
- Specific Range hour (0-23): Start hour of the range.
- Specific Range minute (0-59): Start minute of the range.
- SET YOUR RISK
- Initial Deposit: You can calculate the drawdown from the initial deposit amount, usually FTMO impose this rule, from the equity which is rule from My Forex Funds, or from the balance at the start of the day. The EA will monitor and reset the Initial Deposit on each new range and use it as a reference.
- Max Daily DD: The maximum daily drawdown. Usually, the daily drawdown is 5% in most Prop Firms. I recommend to have some margin and configuring it to 4.5%. Once the EA detects 450$ loss, it will trigger the security option and block any new trade.
- Include Swap and Commission: Include Swap and Commission in your Draw Down calculation. Some of the Prop Firms require this.
- ADVANCED SETTINGS
- GV to use in other EA: This is the name of the Global Variable created by the EA. If you are an mql developer, you can check this Global Variable in your code to prevent opening any new position if the draw-down threshold is reached
- Check Frequency in Milliseconds: The frequency to check open trades in milliseconds.
- Close Terminal When DD reached: If set to true the terminal will be closed
How to use the advanced mode:
This EA needs to run on a chart on your account where other EA are running. Once the drawdown threshold is reached, it will create a Temp Global Variable with the name you defined in the inputs: “ GV to use in other EA”, for example GV_isDD. Check https://www.mql5.com/en/docs/globals for more information about global variables. In your EA you can check if this variable exists, and if it is the case you don’t take a trade. At the end of the range/day, “DrawDown Limiter” will remove the Global Variable allowing your EA to take trades again
//If daily DD reached
if(GlobalVariableCheck(GV_isDD))
{
Print(“Max Daily DrawDown Active. No more trades will be opened!”);
return;
} else
{
…Your logic to open a trade…
}
An example for you to test this EA, is to run in the strategy tester of MT5, it automatically creates random sell trades to allow you to test the essential features. Unfortunately, you cannot run two EA in strategy tester to test the advanced functionalities.
If you need to have a limited version to test by own feel free to contact us or reach us via the support group of this EA.
/!\ FOR MT4 USERS BE AWARE
MT4 do have couple of limitation when it comes to the use of such EA.
- The first one is that you cannot do the same test in the strategy tester as for MT5, this is a limitation in MT4 where the OnTimer() function is not implemented in the tester.
- The second point which is THE MOST IMPORTANT, in MT4 the order history is read from your terminal history tab, so make sure you have selected the right time frame. This is due to the limitation of OrdersHistoryTotal() function in MT4, you can find the reference under: https://docs.mql4.com/trading/ordershistorytotal. However in MT5 this limitation do not exist as we can load the history based on a start and end date directly in the EA what ever the history selected in the terminal. This is available via the HistorySelect() function in MT5, you can find the reference under https://www.mql5.com/en/docs/trading/historyselect.
To illustrate this limitation for you, you can find below the screen shots, where the order history selected today's closed trades and you can see in the first image that the DrawDown limiter is calculating perfectly the numbers.
While in the image below, I changed the history in the terminal back to a past day, and you can see that the DrawDown limiter lost the history, and the calculation is back to 0
Comments are closed.