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

 
Andrey Khatimlianskii:

Yes, indeed, forgot about "@global_initializations".

It turns out that drawing bars and indicator buffers itself takes so long?

And if you compile to release and run the visualiser in the same interval, scrolling straight to the end ("skip to..."), how long does it take?

Well, how long?

 
Prostocar:
Hello Hello, I have lost my Market in the terminal I cannot install Expert Advisors and indicators from the Market reinstallation of the terminal has not helped as well as previously purchased products on the Market are not updated who knows how to solve the problem

You still have not answered my question:

You can check it in the terminal, in the Tools window, in the Log tab.


The second question: what server are you connecting to? Try to connect to MetaQuotes-Demo.

 
MetaQuotes Software Corp.:

Logs from the autovalidator showed that the test on M1 cannot pass the monthly interval in an hour .

While on H1 the same indicator passes the test in a couple of minutes.

Look for the reason in your code.

The reason is more likely to be in the autovalidator. I managed to find out that the problem is somehow related to processing the tick history.

When the first event OnCalculate is processed, the indicator tries to load the history of ticks for the last day, by running the function CopyTicksRange. If each bar receives at least some ticks, the received history is drawn and then it processes ticks online. If some history bars haven't received any ticks, the OnCalculate handler returns 0 and starts a 5-second timer. At the next events OnCalculate the indicator continues to try to load the history of ticks. In the OnTimer handler, the timer stops and if all OnCalculate calls failed to load the history for 5 seconds, the refresh request is made usingChartSetSymbolPeriod(0, NULL, 0)call.

Note that everything is executed asynchronously and there are no hangs by logic. In the worst case, if we assume that the database of ticks is not available for some reason, we will get a series of refreshes with a period of 5 seconds. But the indicator in this case is not calculated at all, as there is no data. Influence of refresh has been investigated, it's absent - see comment below.

This code works fine for me online on different servers, different characters/timeframes and in the tester.

The same code seems to hang somewhere in the autovalidator. By gut feeling method (which shouldn't happen in case of normal feedback, logs etc) I've found out the following.

If you comment out the comment for the tick history, the indicator autovalidates normally.

Since there are many history requesting factors, I cannot say exactly what and in what combination "hangs" the autovalidator:

  • CopyTicksRange in absence of history ticks (but even if they are absent, the indicator does not calculate and immediately returns control to the environment, the online ticks continue to "tick" freely, I emulated such situation - no hangs);
  • timer;
  • ChartSetSymbolPeriod (as a stress test I ran the indicator with this refresh in extreme mode (on every tick) and it doesn't result in any slowdown or noticeable CPU load, this request is also asynchronous);
  • I added a failed refresh counter to stop them after a given number of attempts (5), but this has no effect on success.

If refresh is requested from OnTimer handler - autovalidation fails. If refresh is transferred to OnCalculate - autovalidation succeeds. Thus, there is an indirect evidence that it is calling ChartSetSymbolPeriod from OnTimer that gives a negative effect. I purposely ran such a combination in the tester - no problems. Obviously, the autovalidator is different from the publicly available tester.

Since the identified conditions of passing the validation are not very clear (strange at least) and require making the code artificially more complex by gut feeling, they are unacceptable for a release product.

 
Good afternoon, I am asking for help, when autovalidation shows an error about absence of indicator, the indicator is set via resource, on other terminals compiled file works without problems both in the test and on the real account. What may be the problem?
Files:
2yr38jvml4.png  32 kb
 
RODION SLOTIN:
Hello, I am asking for help, during autovalidation an error about absence of indicator, the indicator is set via resource, on other terminals compiled file works without problems both in test and in real time. What may be the problem?

Try not to use double extensions and dashes. This is just a quick guess.

 
RODION SLOTIN:


Can you tell me where exactly?

#resource "\\Indicators\\\\guru.ex4"

double SigUp= iCustom(Symbol(),0,"\\Experts\\/SnowyOwl.v1-1.eng.ex4::Indicators\\\guru.ex4",Sensitivity,PopUp_Alert,5,0);


You should write it this way (example):

#resource "\\Indicators\\trend_channel.ex4"

iCustom(Symbol(),0,"::Indicators\\trend_channel.ex4",kstd,bars,shift,0,bars);

and you have some nonsense written here.

 
The Libraries folder is also listed in the log for some reason. Why is it so? Eugene correctly described the reference to a resource. It should work locally (if all default folders, MQL4/Experts, MQL4/Indicators). When you fix the local launch, it will most likely work in autovalidator.
 

Hello.

I am trying to upload my product to the Market. The automatic validation gives the following error:

test on EURUSD,H1 (netting) 2019.05.01 00:00:30 array out of range in 'Anchored VWAP with no Volume.mq5' (387,30) However this cannot be. I'm laying out the VWAP where the mouse moves the start point. The script compiles without errors and everything works fine. Perhaps automatic validation cannot interact with scripts where I need to select start point?

What else may be the reason? The indicator has a choice between reading with or without volumes. By default it is "without", but perhaps the validator runs through all possible parameters and stumbles on calculation with volumes on currency pairs. What to do?

 
Anton Polkovnikov:

Hello.

I am trying to upload my product to the Market. The automatic validation gives the following error:

test on EURUSD,H1 (netting) 2019.05.01 00:00:30 array out of range in 'Anchored VWAP with no Volume.mq5' (387,30) However this cannot be. I'm laying out the VWAP where the mouse moves the start point. The script compiles without errors and everything works fine. Perhaps automatic validation cannot interact with scripts where I need to select start point?

What else may be the reason? The indicator has a choice between counting with or without volumes. By default it is "without", but perhaps the validator runs through all possible parameters and stumbles on calculation with volumes on currency pairs. What to do?

Attempting to import compiled files (even EX4/EX5) and DLLs

Programs distributed through the Market should be guaranteed to be safe for users. Therefore, any attempt to use DLLs or functions from compiled EX4/EX5 files is considered an error. Such products will not be published on the Market.

If your program needs to use additional indicators that are not supplied, useResources.


Applying to custom indicators via iCustom()

If your program needs access to custom indicator data, you should place all necessary indicators inResources. Products from the Market must be ready to work in any unprepared environment, so they must contain everything you need in your EX4/EX5 file. Recommended articles on the subject:


https://www.mql5.com/ru/articles/2555#dll_and_libraries_prohibited

 
Anton Polkovnikov:

test on EURUSD,H1 (netting) 2019.05.01 00:00:30 array out of range in 'Anchored VWAP with no Volume.mq5' (387,30) However this cannot be.

The out of range array in line 387 is character 30. It is written. We must check the array.