Errors, bugs, questions - page 1157

 
marketeer:
Clarifying the question - the progress should work in the indicator. Your code, when transferred to the indicator, stops displaying the comment at runtime.
If you loop the indicator, you can "suspend" the entire terminal. But the Expert Advisor allows you to make fun of the threads as you wish.
 
marketeer:
To clarify the question - progress should work in the indicator. Your code, when transferred to the indicator, stops displaying the comment at runtime.

From the MQL4 help:

Running programs

A brief summary of MQL4 programs is shown in the table below:

Program

Execution

Note

Script

In its own thread, as many scripts as there are execution threads for them

A looped script cannot interrupt the work of other programs

Expert

In its own thread, as many experts - as many execution threads for them

A looped expert cannot disrupt work of other programs

Indicator

One execution thread for all indicators on one symbol. As many symbols with indicators - as many execution threads for them

An infinite loop in one indicator will stop all other indicators on this symbol

 
barabashkakvn:
If the indicator is looped, the entire terminal can be "hung". But the Expert Advisor allows making fun of the flows as you want.

Well, the fact that an indicator can hang the terminal is a shortcoming of the terminal itself. And the analytical calculations, not related to trading, should be in the indicator - especially as it requires visualisation of buffers, i.e. it is not a task for the script either.

There's nothing looped in the indicator - in the sense that there's no infinite loop. There is a controlled calculation but it takes time.

 
marketeer:

...

Nothing is looped in the turkey - in the sense that there is no infinite loop. There is a controlled calculation, but it takes time.

In which indicator function call do you perform the calculation?
If you really need to do such calculations it makes sense to "batch calculate".

 
Порционное вычисление в индикаторе
Порционное вычисление в индикаторе
  • www.mql5.com
Индикатор производит вычисление одного значения для бара достаточно длительное время (запрос к БД, вычисление на стороне БД, возврат значения функции). - - Категория: технические индикаторы и анализ рынка форекс
 
barabashkakvn:
In which indicator function call do you perform the calculation?
If you really need to perform such calculations it makes sense to "batch calculate".

The hard code is in the calculation part, not in the inite if that is the question. "Batch calculation" is a separate hassle to save and restore intermediate states, and slows down the process itself. It's not an option.
 
joo:
So how, after all, do you use the console compiler if it is removed by the terminal?

Why is it in the terminal? The terminal has all its own.

Just keep the compiler elsewhere.

 
Renat:

Why is it in the terminal? The terminal has all its own.

Just keep the compiler elsewhere.

Yes, it's understandable that the way out is to keep the compiler in a different folder than the terminal one. But the fresh *.ex5 files won't be created in the terminal folder either, which means that they must be constantly moved to the right place... Although, could there be a command key to specify the path of the compiled files?
 
joo:
Yes, it's understandable that the way out is to keep the compiler in a different folder than the terminal one. But the fresh *.ex5 files won't be created in the terminal folder either, which means that they must be constantly moved to the right place... Although, could there be a command key to specify the path of the compiled files?

Yes, you can specify a default directory in the /i key:

E:\>mql64.exe
MQL4/MQL5 Compiler x64 build 937 (15 May 2014)
Copyright 2001-2014, MetaQuotes Software Corp.

Usage: mql64.exe [<flags>] filename.mq5
                /mql5     - compile mql5 source
                /mql4     - compile mql4 source
                /s        - syntax check only
                /i:<path> - set working directory
 
EX5 will be created at the location of the original mq5 file.
Reason: