Errors, bugs, questions - page 2617

 
Stanislav Korotky:

Please check the following bug for yourself. The application has a special minimalist indicator whose only task is to read the status of the "capslock" key. It is displayed in the log and in the comment.

The sequence of actions is as follows.

  1. Compile indicator, place it on the chart and make sure that 0 ("capslock" is not enabled) is printed.
  2. Switch to ME, enable CapsLock and recompile. Return to the terminal. Check the logs to make sure that the old indicator was unloaded and new one was loaded. However, "CapsLock" status is still returned as 0.
  3. If we remove the indicator from the chart and upload it again, the capslock is recognized normally - it displays 1.

What's the miracle? When restarting by compilation some environment variables are not cleaned or what else?

Polling of key states is a specific operation.

Actual key state is given only for the active window. This is done on purpose so that inactive window will not get interference when handling OnChartEvent

 

Custom symbol, exit found in logbook What does this mean?

2019.12.11 00:07:13.252 History 'DA6_CUSTOM' invalid container 2014.01.02 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.254 History 'DA6_CUSTOM' invalid container 2014.01.03 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.254 History 'DA6_CUSTOM' invalid container 2014.01.05 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13254 History 'DA6_CUSTOM' invalid container 2014.01.06 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.255 History 'DA6_CUSTOM' invalid container 2014.01.07 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.255 History 'DA6_CUSTOM' invalid container 2014.01.08 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.255 History 'DA6_CUSTOM' invalid container 2014.01.09 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.256 History 'DA6_CUSTOM' invalid container 2014.01.10 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.256 History 'DA6_CUSTOM' invalid container 2014.01.12 symbol settings - digits: 4, tick size: 0


 
Slava:

Key status polling is a specific operation.

The actual key state is only given for the active window. This is done intentionally so that when OnChartEvent is processed, the inactive window does not get interference

Are there any plans to add Windows Events to OnChartEvent? There are times - that some data came from outside, and through the dll you can immediately generate an event for the chart to pick up the data, instead of interrogating the data by timer. You could have OnChartEvent waiting for a Windows Event by its name.

Previously in MT4 we dabbled with emulating a new tick via PostMessage to trigger an EA on a chart.

 
Slava:

Questioning the status of the keys is a specific operation.

The actual key state is only given for the active window. This is done on purpose so that when OnChartEvent is processed, the inactive window does not get interference

Yep, this is one of a sea of cases where incomplete documentation is evident. Details are revealed drop by drop, only after problems occur.

 

Forum on trading, automated trading systems and strategy testing

Libraries: MultiTester

fxsaber, 2019.12.13 10:24

Checked the contents of the KB ZIP archive. Looks like the developers fixed it, now there are fresh versions of the files in the ZIP. Only the file dates there are wrong. And the contents are as they should be.

 
Alain Verleyen:

Custom character, exit found in the logbook What does this mean?

2019.12.11 00:07:13.252 History 'DA6_CUSTOM' invalid container 2014.01.02 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.254 History 'DA6_CUSTOM' invalid container 2014.01.03 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.254 History 'DA6_CUSTOM' invalid container 2014.01.05 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.254 History 'DA6_CUSTOM' invalid container 2014.01.06 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.255 History 'DA6_CUSTOM' invalid container 2014.01.07 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.255 History 'DA6_CUSTOM' invalid container 2014.01.08 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.255 History 'DA6_CUSTOM' invalid container 2014.01.09 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.256 History 'DA6_CUSTOM' invalid container 2014.01.10 symbol settings - digits: 4, tick size: 0
2019.12.11 00:07:13.256 History 'DA6_CUSTOM' invalid container 2014.01.12 symbol settings - digits: 4, tick size: 0


Means that your log reports an error: the characters are still four, but the ticks are still missing.

 
It's probably going to be about containers. Do you need them?
 

Unfortunately, this check is very rare, but sometimes (twice in the last week, about a hundred runs) it does fail. I can't understand the reasons - the data is from the same file/structure (?).

   datetime time[],
            START_H=D'01.02.2018';
   double   close[];

   int t=CopyTime (_Symbol,0,TimeCurrent(),START_H,time);
   int c=CopyClose(_Symbol,0,TimeCurrent(),START_H,close);

   if(t!=c) 
    {Print("Arrays (time & close) are not equal!!!"); return(false);}
 

Please check/confirm/verify the situation that trying to refresh the chart via the recommendedChartSetSymbolPeriod(0, NULL, 0); method hangs the terminal for a few seconds (mine is ~15). Attached is a simplified indicator for reproduction.

The following was required (it worked fine before): there is a vertical line (object) in indicator and after user moves it the indicator rebuilds with new value of Offset parameter taken from the line position.

The indicator itself is primitive: it displays the quote as it is (with default parameters) in a sub-window. It is calculated instantly.

To solve the problem it is enough to put the indicator on the chart and move the vertical yellow line back a few bars.

Messages are shown in the log:

- "Drag" instantly on the fact.

- "Calc" after tens of seconds - it is displayed at each OnCalculate.

During "hang" the terminal loads CPU core 100%. After this hang, the indicator is finally displayed with a new offset. But the whole point was to promptly display the indicator for new settings - as soon as user moves the line.

What is the problem? How to fix it?

Thanks in advance.

Files:
FMA.mq5  4 kb
IndArray.mqh  5 kb
 
Denis Nikolaev:

MT5

Build 2280

The function of counting the number of open positions with the specified symbol and magic number fires repeatedly.

i.e. first call returns correct value, second call returns 0

Example code, please and describe trading environment. Describe it so that it can be reproduced.

Reason: