[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 376

 
Integer:

Yes. But only if the first order is a market order. If it's pending, nothing happens.
Yes, exactly. - That's an important clarification. I missed it.
 
Chiripaha:

That's the point (for the correctness of the parameters of the experiment). That's why I'm asking the questions, because I'm unsure of myself and therefore trying to identify - maybe I've done something wrong if these results diverge. This is more to the point of testing - at times like this, a seemingly well-written program fails and you realise you have to look somewhere.

I got these "experiments" by accident. I wrote programs for parallel work too - I gave up this method now because it did not increase efficiency (it may be realized in other projects). The result was such a thing, that until the first program would not be processed - no data would be obtained - the second one would not start (or, more precisely, would fail). This sequence depended on the window I'd put (i.e. in what order) EA blocks. - Hence, we conclude that the sequence of windows is important, i.e. Expert Advisors are processed sequentially, not in parallel. And this sequence depends on window numbering in the list of the terminal.

This is the essence of the experience.

But, again, maybe this is an incorrect interpretation of my results. That's why I'm persistently trying to solve this question now, and not only with the "slip".

I meant the on-line operation of EAs. And you're talking about testing. Is it about the tester? How can several EAs work in the tester at the same time?
 
TarasBY:
I was referring to the on-line operation of the EAs. And you are talking about testing. Is it about the tester? How can several EAs work in the tester at the same time?

No - I stated it incorrectly (out of sequence). - By testing, I meant not a tester, but testers of programs at the stage of debugging and identification of their features. In this case, due to lack of documented information, I was identifying peculiarities of mt4. (have to resort to this from time to time).

Of course, I'm also talking about EAs working online now.

 
Chiripaha:

No - that was incorrectly (with loss of coherence). - By testing I didn't mean testers - but testers of programs at the stage of debugging and revealing peculiarities of their work. In this case, due to lack of documented information, I was identifying peculiarities of mt4. (have to resort to this from time to time).

Of course, I'm talking about EAs working online now too.

If the developer declares the possibility for the terminal to give several trade orders to the server simultaneously, how can we do this by working sequentially?
 

Thank you all for your replies. I will try to change the code so that the EA does not quit until OrdersTotal shows an open order. Then the 2nd one will definitely see that there is an order. I hope so.

By the way, in my experience, the EAs run sequentially and even create a queue somehow, judging by the prints.

 
Arles:

Thank you all for your replies. I will try to change the code so that the EA does not quit until OrdersTotal shows an open order. Then the 2nd one will definitely see that there is an order. I hope so.

By the way, in my experience, the EAs run sequentially and even create a queue somehow, judging by the prints.

Print() cannot serve as a basis for such conclusions. Have you seen the source code of this function? To be sure, at what point does the printer print the time? The output to the file is exactly sequential, and the printer may write the time exactly at the moment of output to the file, but not at the moment when the event it describes occurs.
 
TarasBY:
If the developer declares the possibility for the terminal to give several trade orders to the server at the same time, how can I do this by working sequentially?

It's hard for me to say anything on this. I have little idea how to communicate directly with these developers to understand what they are claiming.

But as someone who is used to relying not on what they say, but on what I get from the experiment, what I see is what I sing. - What I can't see, I ask questions and clarify my position.

The thing is that this position (of successive work) is, in my opinion, quite natural and correct. That is why I never specified this question before. It is correct because otherwise there may be errors in the financial accounting of positions. But, however, this can be cut off at server level - it will check whether something is correct or not. But even in this case, when working with Expert Advisors and the terminal, there would be too many unnecessary and erroneous commands that would clog the trade stream with unnecessary "rubbish". And so on.

 
Chiripaha:

It's hard for me to say anything on this. I have little idea how to communicate directly with these developers to understand what they are claiming.

But as someone who is used to relying not on what they say, but on what I get from the experiment, what I see is what I sing. - What I cannot see, I ask questions, clarify my position.

The point is that such a position (with consistent work) is, in my opinion, quite natural and correct. That's why I didn't even elaborate on this issue somehow before. It is correct because otherwise there may be errors in the financial accounting of positions. But, however, this can be cut off at server level - it will check whether something is correct or not. But even in this case, when working with Expert Advisors and the terminal, there would be too many unnecessary and erroneous commands that would clog the trade stream with unnecessary "rubbish". And so on.

Read - with consistent processing, there would be no need to make such a "vegetable garden". (And do not forget - any article is moderated by developers.)

P.S. I also used to rely on my own experience and logic, rather than someone else's words. :)

 
TarasBY:

Read it - with consistent processing, there would be no need to make such a "vegetable garden". (And don't forget - Any article is moderated by the developers.)

P.S. I, too, am accustomed to rely on my own experience and logic, rather than on the words of others. :)

Just keep in mind that I'm not making an assertion. On the contrary, I'm asking - is it true or not? : )) And cite as an argument what I get in practice.

And the "slip" question still remains unconfirmed for me. I.e. open. : ))

I'm guessing about moderation. - But then again - guessing does not mean stating. If so, I sincerely hope to get an official comment on Sleep. Because on the forum there are a lot of arguments like my assumptions and official ones are hard to find (except reference book, of course - but exactly in it there is scarce and incomprehensible information on the subject. Otherwise, there wouldn't be so much talk here). And at the same time, let them clarify about sequence and parallelism. - It would be useful for me to understand it too.

 
Chiripaha:

It's hard for me to say anything on this. I have little idea how to communicate directly with these developers to understand what they are claiming.

But as someone who is used to relying not on what they say, but on what I get from the experiment, what I see is what I sing. - What I cannot see, I ask questions, clarify my position.

The thing is that this position (with consistent work) is, in my opinion, quite natural and correct. That is why I have never specified this question before. It is correct because otherwise there may be errors in the financial accounting of positions. But, however, this can be cut off at server level - it will check whether something is correct or not. But even in this case, when working with Expert Advisors and the terminal, there would be too many unnecessary and erroneous commands that would clog the trade stream with unnecessary "rubbish". And so on.

All scripts and Expert Advisors work in their own threads. Trade orders are collected from them in a separate queue. Then they are distributed among the free trade flows. The number of free trade flows can be equal to 8.

Print() outputs what is available for output at the moment of output. The presence of multiple threads can be determined through the log. The output is displayed at the very beginning of the start() function and at the very end. Put a delay between them. Run several Expert Advisors on different tools. Look at the log. You will see that between the output of one Expert Advisor there are outputs of other Expert Advisors.

void start()
 {
  Print(Symbol(), " Start");
  Sleep(3000);
  Print(Symbol(), " End");
 }