Please read the market rules and implement the checks described in the article ...
V. Product Testing
- 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".
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.
Please read the market rules and implement the checks described in the article ...
V. Product Testing
- 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".
What value am I supposed to put in the string &description here?
bool CheckVolumeValue(double volume,string &description) { //--- minimal allowed volume for trade operations double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN); if(volume<min_volume) { description=StringFormat("Volume is less than the minimal allowed SYMBOL_VOLUME_MIN=%.2f",min_volume); return(false); } //--- maximal allowed volume of trade operations double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX); if(volume>max_volume) { description=StringFormat("Volume is greater than the maximal allowed SYMBOL_VOLUME_MAX=%.2f",max_volume); return(false); } //--- get minimal step of volume changing double volume_step=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_STEP); int ratio=(int)MathRound(volume/volume_step); if(MathAbs(ratio*volume_step-volume)>0.0000001) { description=StringFormat("Volume is not a multiple of the minimal step SYMBOL_VOLUME_STEP=%.2f, the closest correct volume is %.2f", volume_step,ratio*volume_step); return(false); } description="Correct volume value"; return(true); }
That parameter is an output parameter, not an input parameter. A value is returned.
EDIT: Remember to also check the SYMBOL_VOLUME_LIMIT property.
After I implemented the checks and tried to validate the EA, I keep getting this error
test on EURUSD,H1 (netting) not synchronized with trade server
After I implemented the checks and tried to validate the EA, I keep getting this error
test on EURUSD,H1 (netting) not synchronized with trade server
If you have studied SymbolInfo.mqh correctly, then your problem "test on EURUSD,H1 (netting) not synchronized with trade server" will be resolved. ^_^
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I can't pass the MQL5 validation test for my EA.
It keeps giving me this error.
test on EURUSD,H1 (netting)
2020.05.26 12:02:03 failed instant sell 5 EURUSD at 1.09610 sl: 1.19611 tp: 0.99611 [Volume limit reached]
Even though I checked the max and minimum volume for trade and also checked lotstep, here is my order execution function: