Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 780

 
Algus:

Yes, a group of sound signals, otherwise you get a lot of sound files (see #7763). And the frequency is either too high or too low. The main analysis takes place at the opening of bars. There are no duplicates, of course.

And in general it's not the melodies but the messages. Tones are not informative, birds were in the beginning, when you could count signals on the fingers):

Well then write the signal cipher in the indicator buffer also from 6 digits, where the information about the TF pair and signal type will be coded - then you will not get confused - take the value from buffers to array, and start decoding in order, and you can also arrange the array, so that the signals go in order by one symbol, then the signal duration is reduced - first time pair and then TF-Signal, and all this in the loop. It is not that complicated. The only thing to do is to check a new candle for every pair, otherwise the signal may be unsynchronized and skipped. In general, it is better to collect the signal from one instrument, process it, play it, collect it from another one. Or else make a boolean array, where you mark that the signal has already been received from the instrument, and update it after each playback of information from TF. Then you won't have to wait for all indicators to do the calculation due to the appearance of a new bar.

 
anatoliy.r:
Here I am ....... It turns out to be so easy! Thanks!!!)

You're welcome :)

 
Algus:

Not clear. The multi-indicator (mi) only switches windows, so there is no problem with that in the terminal as it is. If it counts, then by CPU load 1mi=14 not mi. Besides, to dump all the graphics from 14 TF into one window ... how is it? Plus each chat has its own indicator that also counts and draws? Loading 1 Mi+14 not Mi=28 not Mi. Wouldn't it be easier to organise the sound properly?

I certainly don't look at 14 charts at once, but I hear it right away):

Why keep 14 charts open with 14 indicators? (and still have to figure out how to link them)

One indicator in one window, which will draw/monitor everything, and switch to the required TF/symbol with a click, is enough. (You do switch between windows, don't you?).

 
Taras Slobodyanik:

Why keep 14 charts with 14 indicators open? (and still have to figure out how to link them)

One indicator in one window, which will draw/monitor everything, and switch to the required TF/symbol with a click, is enough. (You do switch between windows, don't you?).

Theoretically it is possible. But something I must be misunderstanding):

It can't draw everything in one window, it can't monitor it. Switch to another TF/symbol with a click - is it programmatically? Probably, MQL allows, I have not tried it. What then? It opens a new chart, the MQL indicator is loaded and draws the patterns. I think so, maybe I am mistaken? If not, how is it better and faster than 14 open windows? So, all this is already implemented in the terminal and there is no difference in which panel you click. I've got 360kg of mono version of my MI, it's still a pain in the ass. In fact you are suggesting to transfer the terminal operation to the indicator. I think it's easier, more efficient and faster to figure out waveOut API or learn another programming language.

 

as I understand it, the task is not to make 14 indicators or 1 multi-indicator faster, but to make 14 indicators interact with each other

for me, it would be easier to combine everything into one indicator

 
Taras Slobodyanik:

as I understand it, the task is not to make 14 indicators or 1 multi-indicator faster, but to make 14 indicators interact with each other

for me, it would be easier to combine everything into one indicator

Thanks for the interest):
 

Such a question. I have put a tick history, now when testing even at 32 speed on M15 the speed is about 1 bar per second, which is very slow. Is there anything else you can do to increase the speed of the run?

Without visualisation it also takes a very long time

 
Aleksey Vyazmikin:

Well then write the signal cipher in the indicator buffer also from 6 digits, where the information about the TF pair and signal type will be coded - then you will not get confused - take the value from buffers to array, and start decoding in order, and you can also arrange the array, so that the signals go in order by one symbol, then the signal duration is reduced - first time pair and then TF-Signal, and all this in the loop. It is not that complicated. The only thing to do is to check a new candle for every pair, otherwise the signal may be unsynchronized and skipped. In general, it is better to collect the signal from one instrument, process it, play it, collect it from another one. Or else make a boolean array, where you mark that the signal has already been received from the instrument, and update it after each playback of information from TF, so it will be better. Then you won't have to wait for all indicators to do the calculation due to appearance of a new bar.

If possible, please specify):

In which indicator buffer should I write - all 14, one of 14 or sound manager indicator buffer? And why do I need to write it to the indicator buffer and then to the array, if I can write it directly to the array?

I don't understand what you mean about the new candle either. Did you expect some sort of synchronization?

What method and where do you see the signals from the symbol being collected? In the working indicators or by the manager?

By the way, there are signals that are arbitrary in time.

In general, I repent, I do not understand the algorithm:)

 

Hello. I'm writing a function - I can't pass an array as a parameter along with any other parameters. Examples:

void f(int &a[]){} //не вызывает проблем у компилятора 
void f(int x=0,
       int &a[]){} //выдаёт ошибку: 'a' - missing default value for parameter
//ок, выставляю default value:
void f(int x=0,
       int &a[]=0){} //ошибка: '=' - illegal operation use

The imagination runs out further.
A function is supposed to be poking around in an array - and for that, I assume it has to pass this array. Or it is not so?
Thank you in advance.

 
Mikhail Sobolev:

Hello. I'm writing a function - I can't pass an array as a parameter along with any other parameters. Examples:

The imagination runs out further.
A function is supposed to be poking around in an array - and for that, I assume it has to pass this array. Or it is not so?
Thank you in advance.


void f(int &a[],int x=0){}
Reason: