Guide

Prop Firm Drawdown Limit EA for UAE Traders: 7 Rules to Build In

A prop firm drawdown limit EA for UAE traders reads account equity on every tick and closes everything before the firm's daily or overall limit breaks. The awkward rule is the reset clock. For a firm on Central European time, the new day starts at 2 am or 3 am in Dubai, depending on the season.

Prop firm drawdown limit EA: daily loss and max drawdown gauges, a lock that checks every tick and new trades locked at the limit
On this page
Prop firm drawdown limit EA for UAE traders flow: every tick, read equity, check limits, warn or close all, then lock until reset
A one second timer repeats the check on quiet charts

One bad hour can end a challenge account. A news spike hits two open trades together, equity dips under the daily floor for a few seconds, and the breach still counts after price recovers. A guard EA checks faster than anyone at a screen.

What a prop firm drawdown limit EA for UAE traders does

The guard trades no strategy of its own. It sits on a spare chart and steps in when equity nears a limit you set. Because it reads the whole account, trades from a trade copier or from another EA count as well. Some sellers call the same tool an equity protector EA.

Of the seven rules it follows, Gulf traders most often get the daily reset wrong.

Checklist of seven rules: daily loss base and reset, static or trailing drawdown, tick equity checks, safety buffer, lot caps, news pauses and lockout

The daily reset runs on your firm’s clock

Each daily loss limit resets at a time the firm picks, whatever your broker’s clock says.

A common pattern is midnight Central European time, with the new day measured from the balance at that moment. Other firms use 5 pm New York time, which is 1 am or 2 am in Dubai. The floor is often that balance minus 5% of the starting capital, though some one-step challenges allow only 3%. These figures vary, so check your programme’s rules page.

The UAE stays on UTC+4 all year and Saudi Arabia on UTC+3, with no daylight saving. Central Europe moves from UTC+1 to UTC+2 between late March and late October:

A midnight reset in Central Europe Dubai Riyadh
European summer time (UTC+2) 2 am 1 am
European winter time (UTC+1) 3 am 2 am

Why care? A UAE evening overlaps the New York session, so a trade opened after dinner may still run at the reset. If your firm measures from the balance, that floating loss is left out of the new day’s starting figure. A position down 3% at the reset then leaves about 2% of a 5% daily limit.

Handling the clock in code

The guard stores the reset in the firm’s zone and converts it to broker server time. It re-checks that offset after each daylight saving switch. MQL5’s TimeGMT() function helps, but it reads DST from the computer’s own clock. That means the clock on your VPS or home PC has to be right.

The day’s starting value is written to disk too. A reboot at 4 am then can’t hand you a fresh daily allowance.

Balance base or equity base

Some firms measure the day from the balance at the reset, while others take the higher of balance and equity. Use the same base as your firm, or the guard’s numbers will drift from its dashboard. Ask support in writing when the rules page is vague.

Static or trailing max drawdown

A static floor stays where it started for the whole challenge. Many two-step challenges work this way, often with a 10% maximum loss from the initial capital.

A trailing floor climbs behind you. On many one-step challenges it moves up at the end of each day from the highest earlier balance, and it never moves down. After a good week it sits much closer to your equity, so a normal pullback reaches it sooner than you expect. A few programmes recalculate the trail in real time, which is stricter still.

Static drawdown floor fixed at the start compared with a trailing floor that follows the account’s peak
How the trailing floor moves varies by firm

One input switches the EA between the two models. It also saves the peak to disk, and the trailing floor survives a restart.

Equity on every tick, plus a one-second timer

A guard that only looks at closed trades reacts after the damage. This one reads ACCOUNT_EQUITY through AccountInfoDouble() on every tick, one of the values on the MQL5 account properties page.

Ticks are not a clock, though. An EA gets new ticks only for its own chart’s symbol, which can sit still for seconds while other symbols move. So the EA also calls EventSetTimer(1) and runs the same check in OnTimer(). MQL5 allows one timer per program, and this job needs no more.

A safety buffer, lot caps and news pauses

Never set the guard at the firm’s exact figure. Spread and slippage keep working while the EA closes trades, and the last fill can land well past your trigger. If the firm allows 5%, act at 4%. A push alert at 3% gives you time to step in first.

Lot caps stop the fastest breaches. The guard can check each new trade against:

  • a maximum lot size per trade
  • total lots open across the account
  • the number of open positions
  • separate caps for fast movers such as gold

A trade that breaks a cap is closed and logged. Inside your own strategy EA, the guard can instead size each trade from the stop loss distance.

For time rules, it can pause trading around releases you pick from the economic calendar built into MT5. It can also flatten everything before the weekend if your firm asks. Minimum trading days are the firm’s rule, although the EA can still count them on its panel.

The hard stop, and what survives a restart

At the action level the order is fixed. First the EA closes every position. Next it deletes pending orders, and then it locks the account, so any new trade closes at once until the next reset.

People forget to test the lock. Kept only in memory, it disappears when the terminal restarts. The EA therefore writes it to a file or to terminal global variables, which MetaTrader deletes four weeks after their last access.

An optional extra stops at the challenge target. Once equity gets there, the EA closes everything and pauses, so a late trade can’t undo a finished phase.

Test the guard before you pay for a challenge

Start in the Strategy Tester. A test mode can open random trades against tiny limits, such as a 0.2% daily loss, so each rule fires within minutes. Check the level and the order of every action.

The tester has one blind spot. The MQL5 docs say TimeGMT() equals the simulated server time during testing, so your reset conversion never meets a real clock. For that, leave a demo account running across a real reset, ideally with a trade held past 2 am Dubai time.

EA inputs panel with a 4% daily loss limit, 8% trailing max drawdown, a 00:00 server reset and a 0.5% safety buffer
Example values inside a 5% daily and 10% overall limit

Then restart the terminal halfway through a trading day. The daily count and any active lock should come back exactly as they were.

Have the guard built around your firm’s numbers

Check first that your firm allows EAs at all. Our post on prop firm EA rules lists what to ask. You can code the guard yourself from the docs above. We can also build a prop firm drawdown limit EA for UAE traders around your firm’s rules and reset.

See the prop firm risk manager for MT4/MT5 for features and delivery, or MT5 Expert Advisor development for a full strategy with the guard inside.

Signal followers can read how lot caps apply when you copy Telegram signals to MT5. You test a demo build before the final payment. Still, no software can promise a passed challenge, so check your firm’s terms and your local regulations too.

Sources

Frequently asked questions

Is an EA allowed at my prop firm?

That depends on the firm and the programme. Some allow EAs and risk tools, while others limit copiers, news trading or hedging. Check the rules for your exact programme, and keep the firm's written answer before you start.

What time does my daily limit reset in the UAE?

Your firm's rules page gives the reset in the firm's own zone, and you add the gap to Gulf time. Your clock never shifts, but the firm's may. For a firm on Central European time it moves on the last Sunday of March and the last Sunday of October, so mark those two weekends.

Can the guard protect manual trades and other EAs?

It covers them, because it reads equity for the whole account, trades placed by hand included. When it acts, it closes every position, whichever chart or magic number opened it.

Can the EA run on MT5 mobile?

An EA needs the desktop terminal, and the phone app can't run one. Many traders keep the terminal on a VPS through the night reset, while the app still shows trades and receives the EA's push alerts.

What happens when I reach my own limit?

Everything closes and the account stays flat until the firm's next daily reset. A push alert reaches your phone at the same moment, so you know even away from the screen.

WhatsApp · Email · Telegram

Tell us what you want to automate

Send your rules on WhatsApp. You get a clear quote, then a demo build to test before you pay in full.