@l-andorrà it has to do with the max volume allowed per symbol. On my broker I do not get any errors as there is no volume limit as long as there is enough free margin in account balance. But apparently in the test mql5 runs as part of the validation process there is a max volume allowed per symbol.
So I need to find a way to first retrieve what the max volume is on the broker mql5 does the validation test on. I am able to do that by creating a variable called max_volume and then use the below line of code in a custom mql5 code block
max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_LIMIT);
Then i need to make a condition before my "buy/sell pending order" block that only allows pending orders to be placed if the volume of the pending order is below max_symbol
This line of code should hold the answer, but I cant really figure out how to convert that into a condition block in fxdreema. I need to
if(max_volume==0) volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);