Errors, bugs, questions - page 579

 

olyakish:

>And you have two trades there, one that made a profit and one that closed at zero, but the equity was still fluctuating.

actually this is one trade consisting of sell in (open position to sell) and buy out(close position to sell)

Exactly this is a double deal In - opens a position, and Out - closes it (as far as I remember there is also InOut - a counter deal to an existing position).

The rule is that there is one position, and there can be as many orders and trades in it as you like.

 
papaklass:

What is not clear is the following:

We have two monovalued EAs, each working in its own thread and with its own single instrument, with its own consecutive set of ticks. These two consecutive sets of ticks are independent of each other. For example, GBPUSD ticks come in. Do they affect EURUSD? EURUSD has its own independent tick stream of quotes. Am I right or am I wrong about something? If I'm right, why cannot these two independent streams be distributed in different cores? That is what is not clear to me.

If we are talking about two Expert Advisors running different charts, they are fully benefiting from the multi-core capability because they work in different threads.

If we are talking about parallel testing, you can launch two client terminals from different folders and run two tests simultaneously. The agents will run on different cores.

 
Interesting:

It is just two trades In - opens a position, and Out - closes it (as far as I remember there is also InOut - a counter trade to an existing position).

The rule is - there is one position, and there can be as many orders and deals in it as you like.



Ok, I agree, I was not quite right.

In my case, there is one normal (minimal) cycle: open a position , close a position.

Then create a bid-order-deal-ask position, then a bid-order-buy deal (sell close).

Substantive question - please comment on the equity/balance chart in the tester.

 
papaklass:

Forgive my bluntness. I understand the highlighted test when it concerns (text) a single stream (financial instrument). I.e. we have one monovalue Expert Advisor that works with one symbol. The ticks are consistently processed in it and there is no sense to process them in parallel. I see.

What is not clear is the following:

We have two monovalued EAs, each working in its own thread and with its own tool, with its own consecutive set of ticks. These two consecutive sets of ticks are independent of each other. For example, GBPUSD ticks come in. Do they affect EURUSD? EURUSD has its own independent tick stream of quotes. Am I right or am I wrong about something? If I'm right, why cannot these two independent streams be distributed in different cores? That is what is not clear to me.

stringo:

If we are talking about two EAs working on different charts, they fully benefit from multicore because they work in different threads.

If we are talking about parallel testing, you can launch two client terminals from different folders and run two tests simultaneously. The agents will run on different cores.

1. the EAs located on different charts (ideally on different symbols) really take full advantage of multi-threading/multi-core. You can also run several terminals in the old way (for example, if you trade several accounts).

2. When I spoke about multithreading, I meant working within a single Expert Advisor. It does not matter how and by which means the simultaneous processing can be organized.

It makes no sense to organize such processing within this framework, or it will cause lots of problems both for developer and end users(as was mentioned by Renat and Stringo).

But there is a solution, at least a theoretical one, though I don't know if it will be possible to implement it and how much sense it all makes.

Such "multithreading" will be possible after performing at least two steps (the developers will know better):

a) parametric handlers for certain events (possibly adding new ones or changing existing ones);

b) change of the architecture of the entire terminal so that within an Expert Advisor (only for Expert Advisors) some handlers can be simultaneously executed.

And as I understand it, without any parametric handlers, there is no sense to talk about it.

3. From the point of view of developers, the introduction of parametric processing of ticks is an open question. But despite all the problems connected with its introduction they may decide for such a step (having postponed its realization for the distant future). Realization of all subsequent it is from a fantasy world and here of course remains only to dream.

Only after adding the parameter to OnTick will it be possible to split and simultaneously handle ticks per character, until then the implementation makes no sense.

PS

Conclusion one - First OnTick with parameters ( the name of a symbol will suffice), and then the continuation of the conversation about what it all is for.

Документация по MQL5: Предопределенные переменные / _Symbol
Документация по MQL5: Предопределенные переменные / _Symbol
  • www.mql5.com
Предопределенные переменные / _Symbol - Документация по MQL5
 
papaklass:
I.e. within one tester, even if the EA is multi-currency, the ticks are consistent (regardless of instrument), one thread, one core. Right?

1. tics in the existing architecture are only handled by the main tool (the graph tool). Consequently, the scheme must be consistent.

Multicurrency in this case indicates only that the Expert Advisor can request data from other symbols and/or other TFs, while being able to perform trades on the selected symbols.

Single testing (and any work of the Expert Advisor) is performed sequentially, in one thread. I.e. only one command (line of code) at a time.

When we conduct optimization of an Expert Advisor, different agents (i.e. kernels) receive their own copy of the Expert Advisor with its own parameters and inputs.

Each agent performs the test sequentially, but sequentially within itself (other agents are not even aware of its work). In this case, the agent knows only about his task, claud about all tasks that he received from a particular tester and gave to agents, and the end user/tester knows about all tasks and receives results for all passes.

 
papaklass:
I.e., even if an EA is multi-currency, the ticks are sequential (independent of the tool), one thread, one core. Right?

Yes. It's just like in life. In real life, all tics are consistent. In one quantum of time, in principle, there cannot be more than one tick.

Two threads work in the tester - one for communicating with the terminal, the other one processes ticks and tests the Expert Advisor.

But the architecture of the client terminal is such that the ticks are received by the client terminal in one thread and distributed to different threads for each tool separately. Besides, each Expert Advisor works in its own thread. If there are several cores, all these threads are distributed between them.

A multi-currency Expert Advisor in the tester and in the terminal always occupies one thread, but it does not mean that other threads are idle at that moment

 

Good afternoon, I am concerned about the MT5 order system. I'm not against netting in general, but I think it's raw in 5. I've been trying to figure out how to make a nice MT5 pivot in order to stay in the market if the reversal has not occurred, but either I am not smart or the task is impossible. I have noticed that MQ does not want to discuss it. Do I need to describe it in details? Also, how do you answer this question:

The current order system:

а. Good and we will not change it.

б. Needs improvement

IMHO: The only way to organise trading at the moment is for the PC to always control the process. But this is a burden and nerves. Why do I need all these worries - whether there is a connection or not. I am going to invest meaningful money in the market, so it is important to me.

 
Vict:

Good afternoon, I am concerned about the MT5 order system. I'm not against netting in general, but I think it's raw in 5. I've been trying to figure out how to make a nice MT5 pivot in order to stay in the market if there is no reversal, but I'm either too dumb or the task is unfeasible.


Please send me a message in private, we will discuss.
 
Vict:

...For the last few days I've been trying to figure out how to make a nice MT5 pivot, so that I would be in the market if no pivot happened, but either I'm dumb or the task is impossible.

What do you mean by "stay in the market if reversal doesn't occur"? How do you reverse a position that you have problems with?
 

I'm looking at the market as a wave-keeper. I find the first wave and enter on the rebound, aiming for a three. I am not bound to any specific order, so the first waves may occur both upward and downward at the same time. Therefore, if I have a position down or up, and a signal comes to the other side, I need to reverse, but it does not cancel the past trend! If the price exceeds the last bounce we have to retrace our previous position. It must be confusing, below is the picture.

Explanation of the picture:

* The high signal comes up, we open a buy position.

* A low signal comes in, there is no point in taking a buy position now. My action in 4 is to lock in the profit stopLoss on levels 1, takeProfit after the older rebound. As the result, if market goes down, I'll take a part of my profit, if it goes back up I'll wait for the target level of three.

*What do I do in MT5? For example, I reversed a position to profit. How do I reopen my previous buy if the market rebounds? Would I entrust my EA to do it (not reliable, I want to place these commands on the server)? Should I place a BuyStop pending at levels 1? But what should I do if the price moves below the upper rebound, how should I remove it?

Files:
x71ec4t1j4.png  15 kb
Reason: