Troubled by the error there are no trading operations - page 7

 

Reasonable, Artyom. There really are no error printers in this rudimentary code. I will definitely add it and check it again. But in that, the main EA has messages for every error.

And on the second question, when the validator setsthe minimum lot 0.2 in the informational environment and tries to open a trade with a starting deposit of $1. It is clear that no checks or prints will pass this test. It is guaranteed to end with error 134 if nothing is checked as in the above code. Or "no trade" if you check everything and don't send the opening order to the server.

What is the way out of this vicious circle?

Why there are no trades on NZDUSD ALWAYS? I've checked both EAs. I sent it to my friend to check it on his account for the sake of purity of the experiment. He had no trades either. It did not matter whether the test was successful or not. There are no restrictions on trading on this pair, as you can see from the code.

It's not just me and my EA. No trades on NZDUSD from anyone who has posted validator report in this and neighbouring threads.
 
Andrey Kaunov:

Reasonable, Artyom. There really are no error printers in this rudimentary code. I will definitely add it and check it again. But in that, the main EA has messages for every error.

And on the second question, when the validator setsthe minimum lot 0.2 in the informational environment and tries to open a trade with a starting deposit of $1. It is clear that no checks or prints will pass this test. It is guaranteed to end with error 134 if nothing is checked as in the above code. Or "no trade" if you check everything and don't send the opening order to the server.

What is the way out of this vicious circle?

Why there are no trad es on NZDUSD ALWAYS? I have checked both EAs. I sent it to my colleague to check it on his account for the sake of purity of the experiment. He had no trades either. It did not matter whether the test was successful or not. There are no restrictions on trading on this pair, as you can see from the code.

It's not just me and my EA. No trades on NZDUSD from anyone who has posted the validator report in this and neighbouring threads.

You said it yourself:

check everything and don't send an order to the server.

You have to do it yourself instead of waiting for the inevitable error from the server. And be sure to report to the log about the inability to send the order to the server for such and such reason.

 
Artyom Trishkin:

...

You have to do this yourself, not wait for the inevitable error from the server. And be sure to report to the logbook that the order cannot be sent to the server for such and such a reason.

That's how I don't pass the check, Artyom. And after an hour of checking I get a report that can already be framed:

What about the second question, about NZDUSD? Maybe that's it? I always have deals on EURUSD, but the NZDUSD validator seems to stumble. Sometimes it slips further, then it passes the test:

But in most cases it freezes and generates a validation error. Check this NZDUSD, it seems to me that it is the problem.

 
Andrey Kaunov:

So then I don't pass the test, Artyom. And after an hour of checking, I get a report that I can already frame:

that's more than enough to fix everything ashore.

the validator error reports used to be much more modest

run the strategy tester on NZDUSD H1 and see what you get in the log

same with GBPUSD M30

 

Renat, this is what in that rudimentary code might not work. In my tester, it works on any pair. Here I've upgraded it a bit. Check it yourself, maybe I'm missing something...

#property version   "1.00"
#property strict

int test_ticket[2]={0,0};
double   gl_lots,
         gl_ask,
         gl_bid;
string   gl_comm;         
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit() {
//---

//---
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason) {
//---

}
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick() {
   gl_lots=SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN);
   gl_ask=NormalizeDouble(Ask,_Digits);
   gl_bid=NormalizeDouble(Bid,_Digits);
   gl_comm="test";
//---
   if(AccountFreeMarginCheck(_Symbol,OP_BUY,gl_lots)<=0 || GetLastError()==134) {
      printf("Not enough money for the minimum lot: %.4f",gl_lots); 
      ExpertRemove();
   }
   if(test_ticket[1]<8 && test_ticket[0]==0) {
      test_ticket[0]=OrderSend((StringCompare(_Symbol,"NZDUSD")==0?"NZDUSD":_Symbol),OP_BUY,gl_lots,gl_ask,30,0.0,0.0,gl_comm,33333,0,clrNONE);
      if(test_ticket[0]>0) test_ticket[1]++;
   }   
   if(test_ticket[0]>0)
      if(OrderSelect(test_ticket[0],SELECT_BY_TICKET)) {
         if(OrderCloseTime()==0 && OrderOpenTime()+300<TimeCurrent())
            if(OrderClose(test_ticket[0],OrderLots(),gl_bid,30,clrNONE)) {
               printf("Test order closed, ticket #%d",test_ticket[0]);
               test_ticket[0]=0;
            }   
      }
}
//+------------------------------------------------------------------+

I still have no trades on NZDUSD, despite all my fears:

But now the validator won't show error 134 and won't show that I've tested it with 0.2 lots at $1 initial deposit

 
Andrey Kaunov:

Renat, this is what in that rudimentary code might not work. In my tester, it works on any pair. So I upgraded it a bit:

And still there are no trades on NZDUSD, for crying out loud:

Run it in a normal tester, there may be errors in the log
 

What's the point, Renat. There you go.



 
Andrey Kaunov:

Renat, this is what in that rudimentary code might not work. In my tester, it works on any pair. Here I've upgraded it a bit. Check it yourself, maybe I'm missing something...

I still have no trades on NZDUSD, despite all my fears:

But now the validator will not show error 134 and will not show that I have tested it with 0.2 lots at the initial deposit of $1.

Expert Advisor cannot be unloaded.

 
Artyom Trishkin:

The expert cannot be unloaded.

Artyom, it was exactly the same without unloading. It's not about the Expert, it's about NZDUSD. Pay attention to the essence, not the specifics!!!

Unloading so as not to get the error of exceeding the size of the log file.
 
Andrey Kaunov:

Artyom, it was exactly the same without the upload. It's not about the EA, it's about NZDUSD. Pay attention to the essence, not the specifics!!!

The validator goes through the parameters. When the first combination is met with no trades, it unloads the Expert Advisor. That's it. Further testing is useless.

The essence of the matter is that you do not allow the validator to work with the Expert Advisor.

The tests are passed even if there are no trades on some of the symbols. The main thing is that if a trade operation cannot be performed, the Expert Advisor will issue a log entry about it and continue working.
You see, you are making a programme for people, not a validator. Why do you need a program in your market that does not handle errors, but simply deletes them from the chart? Would you buy such a miracle yourself?

Reason: