Problem with EA validation on the Market - page 8

 
Sergey Gritsay:

Hello all! Who was able to bypass the check with a balance of $ 1, I have in my code is check if not enough money trade operations do not perform. Accordingly I get the following validation log

Where is it written that the Expert Advisor should open trades with a $1 balance? With 500:1, the margin requirement for the minimum lot 0.01 on major pairs is at least $2; with a 1000:1 leverage, it must be at least $1; and the stop-out will occur almost immediately because of the spread. I think it is absurd to run an EA with such a balance, even in the tester.
 
Vitalie Postolache:
Where is it written that with a $1 balance an EA is obliged to open trades? With 500:1 leverage, the margin requirement for the minimum lot 0.01 on major pairs is at least $2; with 1000:1 leverage, it must be at least $1; and the stop-out will be almost instantaneous because of the spread. I think it is absurd to run an EA with such a balance, even in the tester.

it turns out to be this condition, I remove it and the validation is successful

   if(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))
     {
      rezult="Check in the terminal settings permit automated trading!";
      return(false);
     }

....

 
Sergey Gritsay:

it turns out to be this condition, I remove it and the validation is successful

   if(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))
     {
      rezult="Check in the terminal settings permit automated trading!";
      return(false);
     }
It seems to be the right condition, but it's not right without it either...
 
Vitalie Postolache:
It seems to be a necessary condition, but it's not right without it either...
We can also do it, but we have to check if we are working in a tester.
 

What guys, does anyone have any information on how to solve the problem with this.

 
Konstantin Seredkin:

What guys, does anyone have any information on how to solve the problem with this.


start removing checks in the code for trading one at a time, that's how I found my problem was in this condition

   if(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))
     {
      rezult="Check in the terminal settings permit automated trading!";
      return(false);
     }


...

The other day I posted a version of EA for mt5 with such a condition, the test passed the first time.
 
I figured it out, according to the market robot should be tested both with pressed and pressed the button to allow trading by Expert Advisors, I just prescribed in the code that if we test it in the tester this check is not carried out and the robot immediately passed the test market.
 
Konstantin Seredkin:
I did, according to the market robot should be tested with both clicked and unswitched button to allow trading by Expert Advisors, I just prescribed this check in the code so that in case of testing in the tester this robot was not checked and the robot passed the test in the market.

Good afternoon, could you tell me what exactly you put in the code for this? Thank you in advance.

 
Marat Sultanov:

Thank you for your reply.

Now I know I'm not the only one who doesn't understand it :)

You're not the only one. I have exactly the same questions about the testing algorithm. In addition, there may be robots that do not work in principle without installing a number of indicators on the chart. When tested on the market this robot will definitely be rejected.
 
Sergey Vradiy:
You're not the only one. I have exactly the same questions about the testing algorithm. In addition, there may be robots that do not work in principle without installing a number of indicators on the chart. When tested on the market this robot will definitely be rejected.

All of the custom indicators must be included into the body of the Expert Advisor as a resource using #resource - the Expert Advisor in the Market should not require the additional installation of additional indicators, but must be delivered fully assembled.

Reason: