Automatic check on the marketplace - page 6

 
Evgeniy Scherbina:
XAUUSDcheck does not test. But testing is successful because it tests everything else....
Have you had testing after all? I tried it this morning and that autotest disappeared altogether and the EA went directly to the moderator for testing, bypassing the autotest. As it was before.
 
Good to know.
Solving Atomatic Validation Problems
Solving Atomatic Validation Problems
  • 2017.01.11
  • Stanislav Korotky
  • www.mql5.com
If you're distributing some products for MetaTrader 4/5 via the Market, you probably know that a special "welcome" stage of automatic product validation has been added recently by MetaQuotes on the...
 
fxsaber:
Good to know.
"If you think you waited enough and the problem is still there, write to the service desk, and wait more ;-)".
 

and as it should with

OrderSend error 131

no way

There is no error in the tester on the automatic test

I followed all the instructions and it worked:

OrderSend error 131

Uffffff!!!!
 

I think autovalidation is the first thing a salesman has to go through.

I, too, have had my share of mistakes, and they were due to inattention.

But, autovalidation is the first wall in front of "dudes" who download free code from a codebase and try to sell it by changing the name. :-(

Unfortunately because of this there are thousands of programs in the Market from which it is difficult to find a couple of worthy ones.

I would put a special code in codebase so that Market would not accept it for sale. Because it hurts :-( here you spend years, even 5 years developing, tweaking and improving programs to make customers satisfied.

And someone downloaded the finished product changed the name - dumped it on the market for a dumping price, and that's it.... Customers think, "cheaper means I buy it".....

Like in China,

I sit on aliexpress - at least 5 sticks for GOPRO ordered cheap - the result - a week at sea - the stick rusted.

That's not my hand goes up to buy the original stick for 100 quid, which does not rust. But no, in China have already given 120 quid, and ordered another stick the same ................. Fucking greed......

 
Stefan Stoyanov:

and as it should with

OrderSend error 131

no way

There is no error in the tester on the automatic test

I did all the recommendations and yet :

OrderSend error 131

Uffffff!!!!
You only need to check the minimum value and it's not hard at all
 
Evgeniy Scherbina:
You only need to check the minimum value and it's not hard at all.


I have a lot calculation function that does this.

           double LotsOptimized()
    { int     lotDigit=(int)fabs(log10(SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP)));
            if(!MathIsValidNumber(lotDigit)) lotDigit=0;  
{
double FreeMg =AccountFreeMargin();
double Margin =MarketInfo(Symbol(),MODE_MARGINREQUIRED);
double Step =MarketInfo(Symbol(),MODE_LOTSTEP);
double Minlot =MarketInfo(Symbol(),MODE_MINLOT);
double MaxLot =MarketInfo(Symbol(),MODE_MAXLOT);
double loty =MathFloor(FreeMg*Risk/100/Margin/Step)*Step;
loty = NormalizeDouble(loty,lotDigit);
if(loty<Minlot) loty=Minlot;
if(loty>MaxLot) loty=MaxLot;  
      Lots=loty;
      Lots=NormalizeDouble(Lots,lotDigit);

      return (Lots);}}
  
//================================================================
 

There is also an example on the market


//+------------------------------------------------------------------+
//|  Проверяет объем ордера на корректность                          |
//+------------------------------------------------------------------+
bool CheckVolumeValue(double volume,string &description)
  {
//--- минимально допустимый объем для торговых операций
   double min_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);
   if(volume<min_volume)
     {
      description=StringFormat("Объем меньше минимально допустимого SYMBOL_VOLUME_MIN=%.2f",min_volume);
      return(false);
     }

//--- максимально допустимый объем для торговых операций
   double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);
   if(volume>max_volume)
     {
      description=StringFormat("Объем больше максимально допустимого SYMBOL_VOLUME_MAX=%.2f",max_volume);
      return(false);
     }

//--- получим минимальную градацию объема
   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("Объем не является кратным минимальной градации SYMBOL_VOLUME_STEP=%.2f, ближайший корректный объем %.2f",
                               volume_step,ratio*volume_step);
      return(false);
     }
   description="Корректное значение объема";
   return(true);
  }
 

Before calling OrderSend I check via

if (CheckVolumeValue(Lots,com) ==false )return(0);

In spite of everything, error 131 comes up again

 
Stefan Stoyanov:


I have a lot calculation function it does this

           double LotsOptimized()
    { int     lotDigit=(int)fabs(log10(SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP)));
            if(!MathIsValidNumber(lotDigit)) lotDigit=0;  
{
double FreeMg =AccountFreeMargin();
double Margin =MarketInfo(Symbol(),MODE_MARGINREQUIRED);
double Step =MarketInfo(Symbol(),MODE_LOTSTEP);
double Minlot =MarketInfo(Symbol(),MODE_MINLOT);
double MaxLot =MarketInfo(Symbol(),MODE_MAXLOT);
double loty =MathFloor(FreeMg*Risk/100/Margin/Step)*Step;
loty = NormalizeDouble(loty,lotDigit);
if(loty<Minlot) loty=Minlot;
if(loty>MaxLot) loty=MaxLot;  
      Lots=loty;
      Lots=NormalizeDouble(Lots,lotDigit);

      return (Lots);}}
  
//================================================================

Your lotDigit is a tricky fool that always calculates 0. It's not in the example in the documentation. Apparently you like a lot of brackets?

Also this: FreeMg*Risk/100/Margin/Step... Where did 100 come from? Obviously from the ceiling.

That's a lot of strings. It's really a lot, what are you calculating?