Validation error when releasing the trading robot to the market. - page 2

 

P. S. Personally, it was this function that helped me beat the validator:

//+------------------------------------------------------------------+
//| проверяет - можно ли выставить еще один ордер                    |
//+------------------------------------------------------------------+
bool IsNewOrderAllowed()
  {
//--- получим количество разрешенных на счете отложенных ордеров
   int max_allowed_orders=(int)AccountInfoInteger(ACCOUNT_LIMIT_ORDERS);

//--- если ограничения нет - вернем true, можно отослать ордер
   if(max_allowed_orders==0) return(true);

//--- если дошли до этого места, значит ограничение есть, узнаем, сколько уже ордеров действует
   int orders=OrdersTotal();

//--- вернем результат сравнения
   return(orders<max_allowed_orders);
  }

	          
 
Well I seem to be doing fine, it's been tested successfully. =)
 
the validator now works.
 
"Test on EURUSD,H1
strategy tester report 133 total trades
test on NZDUSD,H1
there are no trading operations
test on GBPUSDcheck,M30
tester takes too long time

strategy tester report not found"

... Same error, but occurs at the end of validation. I already ran validation 4 times - same result. Each validation takes 1 hour!!! I don't know where to go next(

 
Sergey Fedotov:
"Test on EURUSD,H1
strategy tester report 133 total trades
test on NZDUSD,H1
there are no trading operations
test on GBPUSDcheck,M30
tester takes too long time

strategy tester report not found"

... Same error, but occurs at the end of validation. I already ran validation 4 times - same result. Each validation takes 1 hour!!! I don't know where to go next(

The code here needs to be simplified a bit, most likely, it probably does a lot of calculations in a single tick.
 
Mikhail Pigolkin:
The code must be simplified a bit, probably, it performs too many calculations per one tick.

The code is simple: only Symbol() and OrderSymbol() are used (no embedded pair names), check for a new candle, take values of built-in standard indicators and open an order - everything is easy as can be...

Обработчик события "новый бар"
Обработчик события "новый бар"
  • www.mql5.com
Для создателей индикаторов и экспертов всегда был актуален вопрос написания экономичного кода с точки зрения времени выполнения. Можно подойти к решению этой задачи с разных сторон. Из этой обширной темы в данной статье будет затронут, казалось бы уже решенный вопрос: проверка появления нового бара. Это достаточно популярный способ ограничения...
 
...it all worked, I didn't change anything in the code, thank you...
 
Sergey Fedotov:
...it all worked, I didn't change anything in the code, thank you...
The validator has no bugs - just features that work well for our brains)
 

Same mistake again...

test on EURUSD,H1 strategy tester report 38 total trades test on NZDUSD,H1 there are no trading operations test on GBPUSDcheck,M30 tester takes too long strategy tester report not found

 
Sergey Fedotov:

Same mistake again...

test on EURUSD,H1 strategy tester report 38 total trades test on NZDUSD,H1 there are no trading operations test on GBPUSDcheck,M30 tester takes too long strategy tester report not found

Look for errors in the logic of your code. If you sometimes pass the test - it's just luck (it's just that the tester validator has chosen a trading interval that is better for you this time).

Reason: