Apex Drawdown Zero v2 Update: Spread-Aware Lot Sizing and Better Trade Diagnostics

Apex Drawdown Zero v2 Update: Spread-Aware Lot Sizing and Better Trade Diagnostics

16 May 2026, 22:01
Tshivhidzo Moss Mbedzi
0
22

The latest update to Apex Drawdown Zero (v2) ships two changes that look small on the surface but make a real difference for anyone running the EA on a live or funded account. Both fixes came out of stress-testing the EA across brokers with different spread behaviour on XAUUSD, and both directly improve how the EA behaves when conditions are less than ideal.

This post walks through what changed, why it matters, and what to expect after updating.

Why the update was needed

The original lot sizing routine in Apex Drawdown Zero calculated position size purely from the stop-loss distance. That works cleanly in a backtest with tight modelled spread, but live XAUUSD trading is a different environment. Spread on gold widens around the London open, around news releases, and during low-liquidity hours. If the EA calculates lot size assuming a clean stop-loss distance but the broker quotes a wider spread at execution, the effective monetary risk on the trade ends up larger than the value set in the inputs.

For an EA that markets itself on controlled drawdown and fixed dollar risk per trade, that gap matters. The v2 update closes it.

Fix 1: Spread-aware lot sizing in PlaceOrders()

The lot sizing call in PlaceOrders() now adds the current spread to the stop-loss distance before passing it to CalcLotSizeSafe() . This means the lot size is reduced slightly to compensate for the spread the trade will pay at entry, keeping the actual monetary risk in line with the configured RiskAmount .

The before and after looks like this:

// Original

double lots = CalcLotSizeSafe(slSize); // v2 fix double spread = SymbolInfoInteger(_Symbol, SYMBOL_SPREAD) * _Point; double lots = CalcLotSizeSafe(slSize + spread);

What this means in practice:

When spread is tight (1 to 2 pips on XAUUSD with a Raw or ECN account), the lot size change is negligible — well under one percent of the original calculation. When spread widens to 3 or 4 pips during the New York close or around scheduled news, the lot size is reduced enough to keep the worst-case loss on the trade within the configured risk amount.

This change is most visible for traders running the EA on:

  • Prop firm evaluation accounts where exceeding a daily loss limit by even a small amount can fail the challenge
  • Brokers with variable spread on XAUUSD
  • Smaller account sizes where a single trade going over the intended risk has a larger proportional impact

If you have been using Set B on a 500 USD account with RiskAmount set to 50 USD, you should now expect the live result of a stopped-out trade to land much closer to that 50 USD figure regardless of spread conditions at entry.

Fix 2: Enhanced error logging for order operations

The second change is diagnostic rather than mechanical. The original EA relied on CTrade for order execution but did not log the reason when an order placement failed. If a trade was rejected by the broker, the Experts log gave no detail on why.

In v2, every g_trade.Buy() , g_trade.Sell() , g_trade.BuyStop() , and g_trade.SellStop() call is now followed by a check on the return value, and on failure the EA prints the result code description.\

cpp

        // Example for a Buy order
if(g_trade.Buy(lots, _Symbol, 0, sl, tp, "ADZ2_Buy"))
   g_buyTicket = g_trade.ResultOrder();
else
   Print("[!] Buy failed: ", g_trade.ResultRetcodeDescription());

The same pattern is applied to all four order types used by the EA.

The practical value of this is when something goes wrong and you need to figure out what. Instead of an empty Experts log on a missed trade, you now see entries like:

  • Buy failed: No money — account margin too low for the calculated lot size
  • Buy failed: Invalid stops — stop-loss distance is closer to entry than the broker minimum
  • Buy failed: Market closed — outside trading hours for the symbol
  • Buy failed: Off quotes — connection or quote feed issue at the broker

Each of these tells you something different and points to a different fix. Before v2 you would have to reproduce the problem and dig through journal entries to work out what happened. Now the EA tells you directly.

What this means for current users

The v2 changes are non-breaking. The strategy logic, range detection, end-of-day close, and risk parameters all behave the same way they did in v1. No reconfiguration is required after updating. Existing preset files (Set A, Set B, Set C) work without modification.

What you should notice over time:

  1. Risk per trade stays closer to the configured RiskAmount across varying spread conditions, particularly on trades that hit stop-loss
  2. The Experts log gives you a clear reason when an order is rejected, instead of a silent miss
  3. Funded account compliance is more predictable because the actual loss on losing trades tracks the intended figure more closely

How to update

The update is delivered through the standard MQL5 update channel. In MetaTrader 5, open the Navigator, right-click the EA, and select Update. The latest version will be installed automatically on the next chart attach.

If the EA is currently running on a live chart, remove it before updating and reattach it after the update completes. Open positions and pending orders are not affected by the update itself, but reattaching the EA ensures the new logic is active for any new trades.

What is next

Work on v3 is already underway. The focus areas are a Judas Swing detection module for the Asian session sweep pattern, a daily bias engine to filter entries against higher-timeframe direction, and additional prop firm compliance features around daily loss tracking. Those changes are larger and will be released as a separate version rather than a patch.

For anyone running Apex Drawdown Zero on live or evaluation accounts, the v2 update is recommended. The risk control behaviour is cleaner, and the logging change alone will save time the next time something needs troubleshooting.

Support and questions are handled through the MQL5 private messaging system on the seller profile.

MPC Labs builds Expert Advisors and trading tools for the MQL5 marketplace. Apex Drawdown Zero is available on the MetaTrader 5 Market.