no trading operations

 

I want to upload an expert to the market, but it gives a warning as follows, how will this problem be solved, thanks.


test on EURUSD,H1 there are no trading operations test on NZDUSD,H1 there are no trading operations test on GBPUSDcheck,M30 there are no trading operations test on XAUUSDcheck,Daily there are no trading operations

 

There is the thread about it: https://www.mql5.com/en/forum/350461
.. and check this page of the thread: https://www.mql5.com/en/forum/350461/page3

Please Help
Please Help
  • 2020.09.04
  • www.mql5.com
Please Help What is the solution to this problem ?? Please help and thank you...
 
Backtest ok, but still fails when loading, how to fix this.
 
I want the site administration to fix this problem.
 
They can't fix your problem. Your code is broken; fix it.
 
Expert works in backtest and demo and real account but cannot pass the test here, the problem is not in the test here
 
Engin Bindas:
Expert works in backtest and demo and real account but cannot pass the test here, the problem is not in the test here

It is not about the following: your codes are correct or not (it is not only related to the bugs in the codes/EAs).
It is related for some part of the codes to be inserted inside the code ... for example - checking for money before open the trade (by CheckMoneyForTrade for example), and some other things (it is difficult for me to explain it because I am not a coder).

Example -

Forum on trading, automated trading systems and testing trading strategies

there are no trading operations

Adan Tor Calvet, 2018.06.18 13:11

Hei Dudes, that problem is because you have to :

 1- Check if volume for operation is correct: 


 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);

  }

 2- Check, if theres enough money to open a position. Example, if ur account balance goes down, it will be a time when "not enough money to open position" error will prompt, so thats why u get that error.


 bool CheckMoneyForTrade(string symb, double lots,int type)

  {

   double free_margin=AccountFreeMarginCheck(symb,type, lots);

   //-- if there is not enough money

   if(free_margin<0)

     {

      string oper=(type==OP_BUY)? "Buy":"Sell";

      Print("Not enough money for ", oper," ",lots, " ", symb, " Error code=",GetLastError());

      return(false);

     }

   //--- checking successful

   return(true);

  }

In my EA i do not use pending orders, soif u use pending orders u may have other problems because of that.

Anyway, the answer is here:  https://www.mql5.com/en/articles/2555


 
Engin Bindas:
Expert works in backtest and demo and real account but cannot pass the test here, the problem is not in the test here

It is not about "EA works or not".

Forum on trading, automated trading systems and testing trading strategies

Please Help

Vladimir Karputov, 2020.09.06 10:36

No one has access to the verifiable code. Everything is automated - the verification task is simple: a decent code should get into the Market.

I strongly recommend that you study the article (the link is given in the test results).

Because the decent codes only should get into the Market.

 
Thanks,I am investigating the issue, there are no bugs in backtest, demo and real, this is interesting.
 
Engin Bindas:
Thanks,I am investigating the issue, there are no bugs in backtest, demo and real, this is interesting.
Look at the threads/links on the posts above: some users had same issue and they fixed it by inserting some codes in their EA (I can not help you more because I am not a coder sorry).