[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 386

 
Integer:

He won't understand))) I have solved this problem in about this style. It's nice to have someone who understands the essence of the task. Only I still have a queue, in which order the tasks started to be carried out, and in which order they are carried out further in a circle.

Well then, instead of the exp exp exps themselves are defined with an index, then the queue will be by the time of the first run.
 
Zhunko:

The MACD shows the speed in pips over time. If by speed of change you mean acceleration, you should take the derivative of the MACD.

Interesting results are obtained. I am currently writing an expert on this topic.


Nonsense! So you have to take the derivative to know acceleration rather than velocity, and you have to take the macd to know velocity, but why not the derivative of something?
 
FAQ:

Well then, instead of handles, the expansions themselves are defined with an index, then the queue will be by time of the first run.


Yes. Handles are not used.
 
Zhunko:

The MACD shows the speed in pips over time. If by speed of change you mean acceleration, you should take the derivative of the MACD.

Quite interesting results come out. I am now writing an expert on this topic.


Is this the right way to do it?

for(int i=0; i<limit; i++) velocity[i]=(Close[i]-Close[i+1])/Point;
for(i=0; i<limit; i++) acceleration[i]=velocity[i]-velocity[i+1];

I am not very good at it, so if it is not correct, please excuse me. It shows velocity in pips per minute and acceleration in pips per minute. Or am I wrong?

Oh, I forgot to explain. Since Δt=1, I didn't divide by one, I thought it was clear.

 

This one...

I think Arles has sorted out the answer to the question, as I'm not immediately able to grasp the gist of the solution yet. But that's because I'm a beginner and I need more time to learn the theory first and then try the practice. But I'll try to master it.

Zhunko:

Sergey, what questions have you not solved? If this:

Chiripaha:

I.e., answering Arles' question, if one Expert Advisor has registered orders and "took a nap" for a while, at this moment, the other EA has not crossed the boundaries of allocated funds (let's assume 80% of deposit - both EAs will have this size) and will place an order (enter the trade in the market). And when the 1st one resumes the work (and the money management terminal has already been calculated the day before), it will also be able to open a deal exceeding the limits set by the Expert Advisor?

If this system (hypothetically) is multiplied by several EAs, then may there be one where the Risk-Management will be in a critical system?

Do I understand this multithreading correctly? - If so, it is certainly a mess from a financial point of view. But, as the probability of this happening is low in small accounts, this is only hypothetical. And on larger accounts, they will probably write something themselves. But, still, it turns out that this is true?

And I have a question - is this an official position or is it just speculation and experiments like mine?

Then there's the code on page 378. Here it is again:

Where the delay is "simulated work" insert a reference to the deposit or another resource.

You can turn this sync block into a function and put it in a library. There will be a synchronous function of access to the deposit from any Expert Advisor.


Right, by unsolved question I meant exactly this list of questions.

The fact that you have found a solution - is very good and I understand your position and accept it. But! - As I wrote right in the next post after the post with questions - you have proposed the following solution, when you can create a program, in which these questions will be resolved by the author (programmer) of the program. And this is good. But this is the next step. The fact that you have dissected this step in detail in the discussion is also very good for understanding and even more so for inexperienced beginners like me. And the fact that you have now offered practical examples of how to solve it. - Wonderful. I.e. you have thus offered a solution to this problem (indirectly confirming its existence and the need for a solution). BUT!

After all, when Arles was asking, he didn't mean corrected robots that can be corrected in such a way, but he meant that when he or thousands of other traders set EAs where these issues are not reduced, but designed for a simple application on one currency pair, they do not take into account that there will be a lot of other EAs (or even this same robot) on other charts. In this case it can lead to chaos (with a huge flow of information, say, during news releases, when there are a huge amount of deals all over the world) in the task solution sequence. Since parallelism and multithreading are the antipode of consistency, and consequently, this very consistency will be broken (without special solution). But! Again... An ad hoc solution is nothing but a return to consistency. Since the queue, the term already mentioned here, is nothing but a sequence.

And hence the question - Is it necessary to create a multithreading to then put it back in the queue? - But that's another topic. I too have gone further in considering the original problem. You are different from you in one thing - you are already trying to offer variants of solution, while I can get to the formulation of a question only, as it is the limitation of a beginner.

And I will copy the scheme, which you suggested for solution, and I will try to take it apart and master it in details. But I am not sure that I will be able to do it quickly. But so far, frankly speaking, I try to simplify the algorithms for solution as much as possible. And to use complex solutions only there where there is no other solution to the problem (including non-software approach - after all, the problem can be solved beyond the computer program).

====================================

That is, in other words. - If there is no block of the solution you suggest, then, when using a lot of such EAs, the situation described in the question you asked about Risk-Management may occur?

Chiripaha:

... If one EA has counted orders and for a time 'took a nap', at this moment another EA has not crossed the boundaries of allocated funds (for example, 80% of deposit - in both EAs this size will be) and puts an order (enters a deal at the market). And when the 1st one resumes the work (and the money management terminal has already been calculated the day before), it will also be able to open a deal exceeding the limits set by the Expert Advisor?

If this system (hypothetically) is multiplied by several Expert Advisors, then may there be one where the Risk-Management will be in a critical system?

Let me explain a little bit more. I'm not sure if it's a critical situation. So I'm considering it hepothetically for now. Since the speed of solving problems is high and the solutions in the computer will probably "fly through" the wide bitrate channel of the computer. - But maybe I'm wrong about that, because according to Arles - he gets just 2 orders per round. So there is a problem.

 
gyfto:

Oh, I forgot to clarify. Since Δt=1, I didn't divide by one, I thought it was clear.
Will this delta always be one? Or can it be variable? If it's not a constant parameter, it's better to put it (the parameter) in the formula.
 
Integer:

This is an atomic access unit and no synchronisation. There is no point in calling only the deposit in this way. Calling any of the deposit parameter functions will be atomic by itself, without any tweaks. If you do it atomically, all the work of the Expert Advisor. That's how you solve problems - you think you've done something, but in fact it's an illusion.

Thought you'd finally get the point of what I've said overnight... :-( Sadly, it didn't.

There are two ways of programming this task. A tricky one, like yours, and a simple one, like mine. If you personally need to queue experts with your threads, it is easier to do everything in one expert (thread) and not to synchronize them.

The task at hand is to synchronize access to a resource. My code is enough. At the same time, the Expert Advisors work independently and in parallel.

Integer:

Nonsense! So you have to take the derivative to know acceleration instead of speed, and you have to take the mcd to know speed, but why not the derivative of something?
I don't understand the question.
 
Zhunko:

Thought you'd finally get the point of what I said overnight... :-( Sadly, it didn't.

There are two ways of programming this task. An elaborate one, like yours, and a simple one, like mine. If you personally need to queue experts with your threads, it is easier to do everything in one expert (thread) and not to synchronize them.

The task at hand is to synchronize access to a resource. My code is enough. At the same time, the Expert Advisors work independently and in parallel.

I do not understand the question.


Junko, you're d-i-B*&%#o^i=d. How can you be so stupid? You don't even have the brains to understand the problem. It's no use even talking to you. You don't get it at all. But the position you take ... like you know and understand everything, but you do not know and do not understand anything, coding at the level of a nubo-lamer kindergartener. And your understanding of everything is at the same level. But your ego...

Junko, they even explain it to you and you don't get it even in this case, it's like brain paralysis.

 
Zhunko:

I don't understand the question.


That says it all!
 
Chiripaha:
Will this delta always be one? Or can it be variable? If it is not a constant parameter, it is better to put it (the parameter) in the formula.


Yes, it will always be one, because
Time[i] - Time[i+1] = const = 1
It's another matter, if we work with tick instead of M1 TF, then yes - from bin to bin Δt will be variable.
Zhunko:

I don't understand the question.

I think I understand. MACD is a delta of two averages, so the rate will be average, not true. After all One can so take this task as an attempt to introduce the SI system into tehanalysis, to systematise it and make it more comprehensible.
Reason: