Hello! I'm trying to upload the robot to the marketplace but I get this message : tester takes too long time - what does it mean?

 
Hello! I'm trying to upload the robot to the marketplace but I get this message : tester takes too long time - what does it mean?
 

It means you are takes a huge time per tick or never returning from OnTick at all, so the tester can't verify your EA. Fix your broken EA.

  1. EAs : Don't do per tick what you can do per bar, or on open.
    If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts, and you recalculate.)
    If you are waiting for an order to close, only look when OrdersTotal (or MT5 equivalent) has changed.
              How to get backtesting faster ? - MT4 - MQL4 programming forum (2017)

  2. Indicators: Code it properly so it only recomputes bar zero (after the initial run).
              How to do your lookbacks correctly. (2016)
              3 Methods of Indicators Acceleration by the Example of the Linear Regression - MQL5 Articles. (2011)

 
At first I would run the profiling on hist.  data in the editor.
 

Forum on trading, automated trading systems and testing trading strategies

tester takes too long time

Sergey Golubev, 2022.01.11 07:59

There are errors in your products.
because the validation system is checking everything which was checked in your code (min/max lot size, and more).

There is forum thread about it: Strategy Tester Report not found

..and there is an article:


And some discussion is on this thread:

Automatic checking of products in the Market (questions and suggestions) - page 5

to make it shorter -

Automatic checking of products in the Market (questions and suggestions) - Azerbaijan, CEO of the Eurozone Automated Validation Committee: "No point or justification in lumping all products
Automatic checking of products in the Market (questions and suggestions) - Azerbaijan, CEO of the Eurozone Automated Validation Committee: "No point or justification in lumping all products
  • 2019.05.09
  • www.mql5.com
There is no point or justification in lumping all products together. If autovalidation cannot be done without cutting the product, then the only way out is to offer a new version of the product directly to customers
 
William Roeder #:

It means you are takes a huge time per tick or never returning from OnTick at all, so the tester can't verify your EA. Fix your broken EA.

  1. EAs : Don't do per tick what you can do per bar, or on open.
    If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts, and you recalculate.)
    If you are waiting for an order to close, only look when OrdersTotal (or MT5 equivalent) has changed.
              How to get backtesting faster ? - MT4 - MQL4 programming forum (2017)

  2. Indicators: Code it properly so it only recomputes bar zero (after the initial run).
              How to do your lookbacks correctly. (2016)
              3 Methods of Indicators Acceleration by the Example of the Linear Regression - MQL5 Articles. (2011)

Hi William,

I was hoping if you would kindly expand a little on  "..takes a huge time per tick or never returning from OnTick at all".

For instance, my EA can complete a 3 year (every tick mode) back-test in 3 hours, and performed in demo and live trading, under what circumstances or conditions in validation test that might prevent it from returning from OnTick?

Your advice could mean a huge leap in developing and mending a broken EA.

Many thanks.     

 
Thong Chee Sing #:

Hi William,

I was hoping if you would kindly expand a little on  "..takes a huge time per tick or never returning from OnTick at all".

For instance, my EA can complete a 3 year (every tick mode) back-test in 3 hours, and performed in demo and live trading, under what circumstances or conditions in validation test that could prevent it from returning from OnTick?

Your advice could mean a huge leap in developing and mending a broken EA.

Many thanks.     

It's very slow if it's for 1 symbol. Even for multiple symbols, it's still slow.

 
Alain Verleyen #:

It's very slow if it's for 1 symbol. Even for multiple symbols, it's still slow.

Thanks for your input.

I turned off a couple of trade-trigger filters, as out-of-the-box default setting.

I am now out of the "tester-takes-too-long" issue.

------------------------------------------------------------------

The new challenge is "no trading operation", for that...

I deliberately tested with $1USD account. 

Tested with knowingly invalid SL/TP levels.  

Tested with knowingly ridiculous lotsizes.

Tested min lot 0.1 instrument with 0.01 lot.

In the EA version that I personally use for trading, it would have issued warning messages and terminated (with 'ExpertRemove') in response to those wrong inputs, so I can react and correct them.

For this Validation Test, I commented out "ExpertRemove" from the logic block, thinking that the Validation Tester could not correct the inputs.

Should I keep the 'ExpertRemove' in the codes?  

Your thoughts will be much appreciated.

Thank you

&

Merry Christmas!


 
@Thong Chee Sing #: The new challenge is "no trading operation", for that...

Did you read and apply the checks outlined in the Market rules ...

V. Product Testing

  1. Products offered through the Market service are subject to automatic pre-testing. The necessary requirements are described in the articles "The checks a trading robot must pass before publication in the Market" and "Tips for an effective product presentation on the Market".

Articles

The checks a trading robot must pass before publication in the Market

MetaQuotes, 2016.08.01 09:30

Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
 
Fernando Carreiro #:

Did you read and apply the checks outlined in the Market rules ...

V. Product Testing

  1. Products offered through the Market service are subject to automatic pre-testing. The necessary requirements are described in the articles "The checks a trading robot must pass before publication in the Market" and "Tips for an effective product presentation on the Market".

Thanks Fernando for responding.

Yes. Read it many times indeed.

I have the functions that successfully detected.

  1. Insufficient funds to perform trade operation Detected
  2. Invalid volumes in trade operations Detected
  3. Limiting Number of Pending Orders Not Applicable
  4. Limiting Number of Lots by a Specific Symbol     Detected
  5. Setting the TakeProfit and StopLoss levels within the SYMBOL_TRADE_STOPS_LEVEL minimum level   Detected
  6. Attempt to modify order or position within the SYMBOL_TRADE_FREEZE_LEVEL freeze level
  7. Errors that occur when working with symbols which have insufficient quote history Addressed for M1~D1 
  8. Array out of Range  Backtest shows no error
  9. Zero Divide       Backtest show no error
  10. Sending a request to modify the levels without actually changing them  Addressed
  11. Attempt to import compiled files (even EX4/EX5) and DLL   Not Applicable
  12. Calling custom indicators with iCustom()    Indicator logic integrated
  13. Passing an invalid parameter to the function (runtime error)  No issues

In the EA version that I personally use for trading, the EA would have issued warning messages and terminated (with 'ExpertRemove') in response to those wrong inputs such as 1. 2. 4. 5, 7, so I can react and correct them.

Should I keep the 'ExpertRemove' in the EA for validation test?

 
Thong Chee Sing #: Should I keep the 'ExpertRemove' in the EA for validation test?

No, do NOT use that function on the final product.

Thong Chee Sing #: The new challenge is "no trading operation", for that...

Your EA is probably filtering the trades, or the default inputs are preventing the EA from trading under various different conditions and contract specifications.

Make sure your default input values has the least amount of filtering enabled and that your EA adjust to different contract specifications.

 
Fernando Carreiro #:

No, do NOT use that function on the final product.

Your EA is probably filtering the trades, or the default inputs are preventing the EA from trading under various different conditions and contract specifications.

Make sure your default input values has the least amount of filtering enabled and that your EA adjust to different contract specifications.

Thanks again for confirming that ExpertRemove() is not to be used.

I will comb through the codes again and see what else I might have missed out.

Out of curiosity, how would the Validator react, says for example, when EA detected that there is "insufficient-funds-to-perform-trade-operation" issue? 

EA will only keep "printing" error message on every tick. Without rectification, no order will get to be sent.