Errors, bugs, questions - page 2484

 
Сергей Таболин:

Dear developers, I have encountered a problem. It needs your attention.

The point is that TesterStop() andExpertRemove() do not stop the test immediately. Here is an illustration of the error. Sorry for some intemperance in that post.

I thought it would be more correct to introduce the MQL_TESTER_STOP constant - a sign of testing termination by TesterStop() or ExpertRemove().

In this case we would be able to select further actions:

Stopping the Expert Advisor immediately means a loss of memory. Immediate stop of the Expert Advisor may leave unreleased memory blocks. Therefore, immediate stop of the Expert Advisor is used only when the client terminal or the tester agent is terminated and only if the Expert Advisor does not process the stop flag and continues execution.

TesterStop gives the command to terminate testing. It means that after the current handler OnInit, OnTick, OnTimer, OnChartEvent is finished, no more events of the tester will be handled, as the processing cycle is finished. And OnTester and OnDeinit will be called

 
Slava:

Stopping the EA immediately means memory corruption. Immediate stopping of the Expert Advisor may leave unreleased memory blocks. Therefore, immediate stop of the Expert Advisor is used only at termination of the client terminal or the tester agent and only if the Expert Advisor does not process the stop flag and continues execution.

TesterStop gives the command to terminate testing. It means that after the current handler OnInit, OnTick, OnTimer, OnChartEvent is finished, no more events of the tester will be handled, as the processing cycle is finished. And OnTester and OnDeinit will be called.

Thanks, I already figured that out. But it doesn't solve the problem. It can be solved either byMQL_TESTER_STOP constant or bychanging the return from void to bool.

An unexpected solution has been suggested byAlexey Viktorov. If return is used after TesterStop(), everything seems to be normalized. How and why it happens I personally cannot figure it out. Nevertheless...

Hence, either add this point to the documentation or changevoid to bool.

P.S. I encountered this problem in build 2085. There was no problem before that. Does it say something to me? )))

 

Hello,

Why in the tester sometimes used indicators are not drawn?

I restart the terminal - they start to display...

Then they stop again - although the code has not changed...

 

I would also like to ask a second question:

why graphical objects don't update in the tester despite a forced ChartRedraw(0); ?

In fact the tester updates them afterwards but with huge delays and jerks...

Thanks.

EDIT: sorry, false alarm, this issue is cleared (the problem was in my glitchy code)

But the question about the indicators still stands.

 
P.S. version 2085 of 13 June
 

@Slava tell me, in the 2007 build TesterStop() passed control only in OnDeinit ? There was no passing of control to OnTester?

That's why my code worked well and the test result in that case was 0.

 
Сергей Таболин:

@Slava tell me, in the 2007 build TesterStop() passed control only in OnDeinit ? There was no passing of control to OnTester?

That's why my code worked well and the test result in such a case was 0.

Create your global flag, set it before calling TesterStop, and analyze it in OnTester.

 
Andrey Khatimlianskii:

Start your global flag, raise it before calling TesterStop, and analyse it in OnTester.

Got it )))) It turned out to be not so simple. In principle, the problem is solved, I just want to hear confirmation that TesterStop worked somewhat differently before.

 
2085
Linux, Wine-4.0.1

The link leading to the tool description gets stuck.

If there is no link in the description, the effect does not appear.


Files:
link.gif  5125 kb
 
Vladimir Karputov:

You may have a 32x operating system. Or you may be running out of RAM.

computer. lenovo G50-45 (LAPTOR-46OAGFM3)
AMD A4-6210 APU with AMD Radeon
R3 Graphics 1.80 GHz
2.00GB RAM
system type 64bit, x64 processor
Reason: