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

 
Tango_X:

Hello! Please help me to output all the values, I can only output the last ones. And the second question, how to output these values with a shift to the right(set any shift). Thank you!

int q[100];
Сдвиг влево
вызов 
for(int w=-1;++w<100;)
q[w]=q[w+1]
Сдвиг вправо
for(int w=100;--w>-1;)
q[w]=q[w-1]

Perhaps there is a way out of the box. This is an example with a one-dimensional array. The shift here is set to one, but you can specify anyw+5 for example (but in this case it will definitely be out of bounds, well, count it and see). Write it down in Excel and see what equals what.

 
Seric29:

What do you mean the protocol is closed. There are order opening functions in mql4, it's essentially just plain code. The same is true for graphical objects. I heard that mql4 is a commercial product and that's why there is no source code or embedded functions (e.g. Arrayresize/Range etc.). For example, I'm not comfortable using mql4 to write a program, it's too dead language, very limited. What about the language Win API 32, it can not do anything about my questions? I guess everything is closed for Win API 32 as well.

The terminal and the server communicate with each other using a certain protocol that will not be given to us by anyone.

This means that orders may only be opened from MQL.

The entire logic should be placed in DLL and the orders should be opened from MQL. This is what I do.

 
Koldun Zloy:

The terminal and the server communicate with each other using a certain protocol, which no one will give us.

This means that orders may only be opened from MQL.

Move all logic to DLL and open orders from MQL. This is how I do it.

This is a bad idea done on purpose. The terminal and the server communicate with each other using a certain protocol that no one will let us use. I am sorry for the expression, but I am speechless. It would be better to write the implementation of the program in mql4, and the controlling calculating functions in c++. Because if everything except the dependencies (order objects) is written in C++, it would be too expensive. It is custom-made. I was advised to write to the company but I think the answer will be as you will be asking for it. Yes it is a commercial product.

 
Koldun Zloy:

The terminal and the server communicate with each other using a certain protocol, which no one will give us.

This means that orders may only be opened from MQL.

Move all logic to DLL and open orders from MQL. This is how I do it.

If you do not look, the order is not sent to the server but to the terminal, it means it communicates with the terminal and the terminal sends orders to the server. If you write the terminal, it will collapse completely, but you still have to somehow interact with the terminal, that's what I mean.

 
Seric29:

Don't look, you don't send the order to the server, but to the terminal, which means you are communicating with the terminal, and the terminal sends it to the server. If you also write the terminal, it will collapse, but you still need to communicate with the terminal somehow, that's the point.

Please do not write in this topic deliberately false answers for newcomers if you do not know the correct answer. And there is no need to discuss some kind of cattle and other things that are not related to this resource.

 
Seric29:

Don't look, you don't send the order to the server, but to the terminal, which means you are communicating with the terminal, and the terminal sends it to the server. If you also write the terminal, it will collapse, but you still need to communicate with the terminal somehow, that's the point.

Your Expert Advisor works in the terminal. It calls functions from the DLL, sends data to it and gets an answer whether it needs to open or close an order.

 
Hello, do I need help? How do I migrate accounts from mql4 to mql5?
 
Artyom Trishkin:

Please don't write in this thread deliberately false answers to newcomers if you don't know the right answer yourself. And there is no need to discuss some cattle and other things that are not related to this resource.

The man asked how to shift an array I showed you a brief example of shifting by 1tsu, but I can't show you the whole function. It's also bad that he gave a very brief example.

I know I shouldn't call them names, of course, but my nerve is certainly shaken by the fact that normal software cannot be used. I think I have something but cannot use it and have to suffer.

 
Koldun Zloy:

Your EA runs in the terminal. By calling functions from DLL, it sends data to it and gets an answer: should you open or close an order.

Well, yes, it is in the terminal but it is not clear what happens here: first, the order is handled by the terminal and then it goes to the server or at once lines are drawn to the server if you enabled it by user.

But drawing of lines is not connected with the server, so it can be implemented using own functions.

 
Seric29:

Well, yes, in the terminal, but it is not clear what happens when the order is first processed by the terminal and then goes to the server, or at the same time lines are drawn to the server if the user is enabled, if immediately to the server, then seriously, but if first to the terminal and from there the 2nd function of the terminal to the server, then the order can be opened from Dll/.

But drawing of lines is not connected with the server, so it can be implemented using own functions.

You cannot do it from the DLL. Forget about it. You just cannot do it!

Reason: