Errors, bugs, questions - page 1524

 
Slawa:

What to document? "Brothers, relax and take it easy, deinitialise as you like. The developers allowed it.

But when you close the terminal, the terminal will trigger strict conditions, which have already been explicitly mentioned in the documentation. And the next time you open the terminal, you may not have opened charts, because they have not managed to save in the allotted time.

What does this have to do with it?

Try to flood the log in endless loop and see how fast it grows and how 64 MB will cut duplicate records and truncate the beginning of the log. You're overreacting with your assertion about the lack of protection. We'd have had all the drives on the hosting sites clogged long ago.

Document as is or do as documented... OK, that's your business.

Tried it, took a chance on the health of the computer, fill rate ~1.5 GB/min. But terminal doesn't hang, comparing to 4.)

 
-Aleks-:

Ugh, so the bug isn't back - you can close the terminal and be sure all the charts are saved.

Said that when closing the terminal, the program is forced to terminate after 3 seconds now. This is how it works now and will continue to work. They don't want to return the forced shutdown when the program is removed from the chart without terminating the terminal.
 
Slawa:

It was originally about a looped indicator. Which is categorically not recommended. Even as an illustration

We are not talking about the looped indicator, but about any indicator without IsStopped checking inside its cycles. Because the cycles of building complex indicators can be long. Of course, this issue is not so actual for me because of the infinite loop, I just can't show the source code, and it's useless because it's too cumbersome.
 

Any indicator uses at least one cycle.

A loop without IsStopped check makes this loop potentially infinite. Because there can be millions of price data in the array, and each iteration may be written non-optimally.

A programmer who deliberately creates an infinite loop must not appeal to any lack of information in the documentation; moreover, the documentation explicitly states

В одном потоке с индикаторами также последовательно выполняются остальные действия по данному символу - обработка тиков и синхронизация истории. Это означает, что если в индикаторе выполняется бесконечное действие, все остальные события по его символу никогда не выполнятся.

The conscious programmer understands immediately that in this case, it is he/she is responsible for the efficiency of the indicator, not the documentation. Moreover, there have been a lot of discussions and articles on this topic

 
Slawa:

The conscientious programmer immediately understands that in this case he/she is responsible for the efficiency of the indicator, not the documentation. Moreover, there have been many discussions and articles on this topic

I confess that I didn't have the IsStopped check, and that's why I had problems with interruptions in the construction of complex indicators through my fault alone. But, on the other hand, I got used to the fact that the work of the program and its documentation must coincide.
 
Ilya Malev:
Said that when you close the terminal, the programme is forced to terminate after 3 seconds already. This is how it works now and will continue to work. They don't want to bring back the forced shutdown when removing the program from the chart without terminating the terminal.
Um, I made my point about quadruple - it seems to terminate and close everything correctly now, while it used to lose charts with EAs.
 
Ilya Malev:
This is all correct, I repent that I didn't have IsStopped checking and therefore had problems with interruption of building complex indicators solely due to my fault. But, on the other hand, I got used to the fact that the work of the program and its documentation should coincide.

The documentation cannot take into account all the nuances. Especially when we are talking about seconds, GHz, megabytes - the values that are measurable but strongly depend on their environment

We try to fill in the blanks in the documentation (though we secretly hope for a presumption of conscientiousness)

 
-Aleks-:
Um, I made a comment about quadruple - it seems to complete and close everything correctly now, but it used to lose charts with EAs.

The foursome paralleled the closing processes of each chart. Therefore they were able to increase the timeout for each one.

In the past, charts were memorized one by one, and each was given the same timeout. The more charts and the more inhibited EAs on them, the longer the closing process was.

 
Slawa:

The foursome paralleled the closing processes of each chart. Therefore they were able to increase the timeout for each one.

In the past, charts were memorized one by one, and each was given the same timeout. The more charts and on them the longer the closing process was.

Roughly understood.

Slow not slow, a lot depends on the hardware and the tasks that the EA performs, and you must make allowance for the fact that programs are often written not by professional programmers - that's why there is a programming language, I think.

 

MT4. I would like to draw your attention once again to the peculiarities of initialisation of global variables of the program.

Global variables are initialized once when you install the program on a chart or recompile the code.

If you want to change timeframe, symbol or input parameters, then global variables are not reinitialized (for example, they are not cleared), and keep their values, which they obtained during working with previous timeframes, symbols or input parameters.

input int c;
int a,b;
void OnInit() {
 a++; Print(" a=",a," b=",b," c=",c); }

It turns out that if you don't clear all global variables programmatically, then when you change the TF, instrument or input parameters, the code will work with the previous values, i.e., incorrectly.

Is it reasonable? Wouldn't it be better to do it in the strategy tester? There, the global variables are reinitialized at every change of TF, instrument or input parameters.