When trying to VALIDATE the ex5 file of my EA for the market, it throws an illogical error.

 
I have tried to upload my .ex5 file as indicated by the seller platform, however every time I try it, it throws up the following error, which does not seem logical given that in EURUSD a position of 0.01 should be perfectly possible. I've been thinking about this a lot and can't find a solution:

ERROR DISPLAYED:
Validation state: Test completed with errors
Errors count 22
Started 2025.10.02 21:21:52
Finished 2025.10.02 21:22:13
Expert Advisor Type
test on EURUSD, H1 (netting)
2023.02.01 00:00:07 failed market buy 0.01 EURUSD [Invalid volume]
2023.02.01 01:00:05 failed market buy 0.01 EURUSD [Invalid volume]
2023.02.01 02:00:03 failed market buy 0.01 EURUSD [Invalid volume]
2023.02.01 03:00:01 failed Market buy 0.01 EURUSD [Invalid volume]
2023.02.01 04:00:06 failed market buy 0.01 EURUSD [Invalid volume] 
Please, does anyone know what could be happening? And how to fix it?

Thank you very much.

Improperly formatted post edited by moderator. Please use the CODE button (Alt-S) when inserting code or log output

Code button in editor

[Deleted]  

Did you read the Market rules?

V. Product Testing

  1. Products offered through the Market service are subject to automatic pre-testing. The necessary requirements are described in the articles "The checks a trading robot must pass before publication in the Market" and "Tips for an effective product presentation on the Market".
Invalid volumes in trade operations

Articles

The checks a trading robot must pass before publication in the Market

MetaQuotes, 2016.08.01 09:30

Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Rules of Using the Market Service
Rules of Using the Market Service
  • www.mql5.com
General Provisions and Conditions of Use service Market
 

Hello, brokers can indeed reject a volume of 0.01 for any symbol. Symbol specifications vary greatly from broker to broker. To circumvent this invalid volume issue, use the function below before submitting the order to open a position:

//+--------------------------------------------------------------------------------------------------------------------+
//| This function normalizes the volume according to the minimum volume change step                                    |
//+--------------------------------------------------------------------------------------------------------------------+
bool NormalizeVolume(string symbol, double &lots)
  {
// Local variables
   double LotMin, LotMax, LotStep;

// Minimal allowed volume for trade operations
   if(!SymbolInfoDouble(symbol, SYMBOL_VOLUME_MIN, LotMin))
     {
      Print("<", __FUNCTION__, "> Error getting the SYMBOL_VOLUME_MIN: ", GetLastError(), " - ", symbol);
      return false;
     }
// Maximal allowed volume for trade operations
   if(!SymbolInfoDouble(symbol, SYMBOL_VOLUME_MAX, LotMax))
     {
      Print("<", __FUNCTION__, "> Error getting the SYMBOL_VOLUME_MAX: ", GetLastError(), " - ", symbol);
      return false;
     }
// Get minimal step of volume changing
   if(!SymbolInfoDouble(symbol, SYMBOL_VOLUME_STEP, LotStep))
     {
      Print("<", __FUNCTION__, "> Error getting the SYMBOL_VOLUME_STEP: ", GetLastError(), " - ", symbol);
      return false;
     }

// Normalizes the volume
   lots = LotMin + MathFloor((lots - LotMin) / LotStep) * LotStep;
   lots = NormalizeDouble(MathMin(LotMax, MathMax(LotMin, lots)), 2);

// Normalized volume
   return true;
  }