MetaQuotes demo server showing strange minimum volumes on NZD/CHF, NZD/CAD, and NZD/JPY (0.1 instead of 0.01)

 

I was working on my first EA in which I'm doing fixed (for now) position sizing and scalp piece-out volumes. I have it running on 14 symbols now just to monitor its behavior. Everything was functioning as expected until all hell broke loose and it kept generating non-stop errors on NZD/CHF and NZD/JPY when it tried to piece out into profit. I was attempting pieceouts of anywhere from 0.01 to 0.05 depending on the situation, out of a 0.1 position.

2023.07.04 09:22:57.463 MTF_Stochastics_Base_System_v0001 (NZDJPY,H1)   Alert: [Func_Position_Initial_Scalp_Targets_Piece_Out_Execute] *ERROR* OrderSend failed. Last Error: 4756 - Trade request sending failed / Return Code: 10014 - Invalid volume in the request / Retcode External: 0

At first I thought it was a double precision problem, but after doing whatever I could to avoid that, it changed nothing.

Eventually I figured out that for some reason, these 3 symbols had a minimum volume of 10 microlots instead of 1 microlot, or 0.1 instead of 0.01. For the life of me, I cannot figure out why this would be. Shouldn't they all be 0.01? Has anyone else noticed this odd discrepancy with MetaQuotes? Is it normal for these symbols to have such volume requirements? Why is it like this?

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   Print("----------------------- SYMBOL_VOLUME_MIN --------------------------");
   for(int i=0; i<28; i++)
      Print(Func_Currency_Pair_Index_To_String(i)," - ",SymbolInfoDouble(Func_Currency_Pair_Index_To_String(i),SYMBOL_VOLUME_MIN));
   Print("----------------------- SYMBOL_VOLUME_MAX --------------------------");
   for(int i=0; i<28; i++)
      Print(Func_Currency_Pair_Index_To_String(i)," - ",SymbolInfoDouble(Func_Currency_Pair_Index_To_String(i),SYMBOL_VOLUME_MAX));
   Print("----------------------- SYMBOL_VOLUME_STEP --------------------------");
   for(int i=0; i<28; i++)
      Print(Func_Currency_Pair_Index_To_String(i)," - ",SymbolInfoDouble(Func_Currency_Pair_Index_To_String(i),SYMBOL_VOLUME_STEP));
  }
//+------------------------------------------------------------------+

//+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
//| Func_Currency_Pair_Index_To_String - Convert currency pair array number to string                                                                                                                        |
//+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
//--- The purpose here is to make it easier to do 28 pair functions by just creating arrays
//--- and looping with the 0-27 index being alphabetical order of the 28 pairs of interest
//
string Func_Currency_Pair_Index_To_String(int index)
  {
   string pair_terminal_symbol[] // for terminal symbol i.e. EURUSD
      = {"AUDCAD",   // 0
         "AUDCHF",   // 1
         "AUDJPY",   // 2
         "AUDNZD",   // 3
         "AUDUSD",   // 4
         "CADCHF",   // 5
         "CADJPY",   // 6
         "CHFJPY",   // 7
         "EURAUD",   // 8
         "EURCAD",   // 9
         "EURCHF",   // 10
         "EURGBP",   // 11
         "EURJPY",   // 12
         "EURNZD",   // 13
         "EURUSD",   // 14
         "GBPAUD",   // 15
         "GBPCAD",   // 16
         "GBPCHF",   // 17
         "GBPJPY",   // 18
         "GBPNZD",   // 19
         "GBPUSD",   // 20
         "NZDCAD",   // 21
         "NZDCHF",   // 22
         "NZDJPY",   // 23
         "NZDUSD",   // 24
         "USDCAD",   // 25
         "USDCHF",   // 26
         "USDJPY"    // 27
        };
   return pair_terminal_symbol[index];
  }
//+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
//

Results:

2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  ----------------------- SYMBOL_VOLUME_MIN --------------------------
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDCAD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDNZD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDUSD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  CADCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  CADJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  CHFJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURAUD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURCAD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURGBP - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURNZD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURUSD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPAUD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPCAD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPNZD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPUSD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDCAD - 0.1
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDCHF - 0.1     
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDJPY - 0.1
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDUSD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  USDCAD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  USDCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  USDJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  ----------------------- SYMBOL_VOLUME_MAX --------------------------
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDCAD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDCHF - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDJPY - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDNZD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDUSD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  CADCHF - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  CADJPY - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  CHFJPY - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURAUD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURCAD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURCHF - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURGBP - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURJPY - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURNZD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURUSD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPAUD - 35.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPCAD - 35.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPCHF - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPJPY - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPNZD - 35.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPUSD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDCAD - 100.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDCHF - 100.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDJPY - 100.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDUSD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  USDCAD - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  USDCHF - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  USDJPY - 500.0
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  ----------------------- SYMBOL_VOLUME_STEP --------------------------
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDCAD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDNZD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  AUDUSD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  CADCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  CADJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  CHFJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURAUD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURCAD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURGBP - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURNZD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  EURUSD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPAUD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPCAD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPNZD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  GBPUSD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDCAD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDJPY - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  NZDUSD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  USDCAD - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  USDCHF - 0.01
2023.07.04 09:44:28.429 symbol_volume_step (AUDNZD,D1)  USDJPY - 0.01
 
Max0r847: these 3 symbols had a minimum volume of 10 microlots instead of 1 microlot, or 0.1 instead of 0.01. For the life of me, I cannot figure out why this would be. Shouldn't they all be 0.01?

It is that way because your broker set them to that.

Don't confuse minimum vs. step. Min=0.1, step=0.01, means allowed values are 0.10, 0.11, 0.12, etc.

 
William Roeder #:

It is that way because your broker set them to that.

Don't confuse minimum vs. step. Min=0.1, step=0.01, means allowed values are 0.10, 0.11, 0.12, etc.

MetaQuotes is a broker? Color me shocked.

 
Max0r847 #:

MetaQuotes is a broker? Color me shocked.

No it's not a broker, it's a software company which provide demo account to test the platform and your code.

Your code should be able to adjust to the symbol's settings.

 
Alain Verleyen #:

No it's not a broker, it's a software company which provide demo account to test the platform and your code.

Your code should be able to adjust to the symbol's settings.

 Oh well. Can't disagree, and I suppose nobody cares about bizarre inconsistencies on a test server. I suppose in a way they're doing us all a favor by throwing in these curveballs just to make sure we're paying attention. Better to bleed in training than on the battlefield, am I right?

 
Max0r847 #:

You are on the official forum of MetaQuotes Ltd. ( https://www.mql5.com ).

MetaQuotes Ltd. is a software development company and does not provide any financial, investment, brokerage, trading or datafeed services, nor is it involved in any commission payments in connection with any trading operations.

This is a technical forum about the MetaTrader platform, and the services you can see on the web, to help with MQL language programming problems, about the platform itself, strategies, etc.

Please read carefully the footnote of this website "Not a broker, no real trading accounts".

The demo accounts offered by MetaQuotes are mainly for developers, beta testing, and of course, so that initially after installation you can quickly test the platform. In no case this type of account should be used for statistics, strategies, EA optimisation, etc. As it does not replicate real market conditions in terms of spreads, swaps, commissions, etc.

 

I understood all that stuff from the get-go. I was just wondering if there was any intentional reason for the inconsistency. I think it was put in place to encourage programmers to be ready for such things.

Also as a US resident it's VERY hard to get access to proper MT5 demo accounts for big brokerages with realistic non-US spreads, unless you're willing to pay prop firm entry fees and then end up getting kicked off the servers multiple times because of inactivity or because you weren't trading a system but just dinking around with your programming development using their servers as a development environment. So you "fail" the challenges since you weren't trying to beat them to begin with ;)

The only US brokerage with MT5 has netting accounts only, which I'm pretty sure the prop firms don't use, at least not the one I want to use, and their spreads are horribly high and not the norm in the rest of the world where forex retail trading is actually not dog poop.

Reason: