Errors, bugs, questions - page 1563

 
Anton Zverev:

It would be much more convenient if for each symbol, the terminal would keep a tick counter (since the moment of connection). And each Expert Advisor, when called, would get the number of the tick, on which it was called.

This would allow estimating the missed ticks.

Right now, every EA is required to be triggered on a chart. BookEvent is the first swallow, saying that no charts are required to run EAs.

There's no need for new entities. The evaluation of missed ticks can be done using the already existing counter. It is called tick_volume
 
Slawa:

In normal operation, an EA will only be called on each tick of the second symbol if that EA is attached to the chart of that very second symbol.

And there is no need to bother with any chart-events. Everything has already been done before you, you just need to look around.

1. For example, make a 1-second timer.

2. You arrange a loop from zero to 100 in OnTimer with Sleep(10) and control it to not run longer than 1 second.

3. Analyze any instrument you like using SymbolInfoTick queries.

This design will work in the tester, too

Of course, this construct won't work well in the tester either - it will skip ticks. I'm surprised that you (the developer) suggest using a crutch in your own product!

Slawa:
You don't need any new entities. The evaluation of missed ticks can be done by already existing counter. It is called tick_volume

Try to call copitix for some bar, with a request for an appropriate number of tick-volume-bars. And see how this parameter compares to what copytix outputs.

The difference is huge even on M1! Not to mention the rest TFs.

 

One Expert Advisor works with only one chart. If OnTick is written correctly and without brakes, the Expert Advisor will not miss a single tick

This is a given.

If you need simultaneous processing of several symbols, then run Expert Advisors on charts of the required instruments. One tool - one Expert Advisor.

But you can only test one Expert Advisor. This is also a given.

And as for skipping ticks in the loop in OnTimer, it needs reproducible proof. Do you have them?

 
Slawa:

One Expert Advisor works with only one chart. If OnTick is written correctly and without brakes, the Expert Advisor will not miss a single tick

This is a given.

If you need simultaneous processing of several symbols, then run Expert Advisors on charts of the required instruments. One tool - one Expert Advisor.

But you can only test one Expert Advisor. This is also a given.

These statements make me cringe. If you want to trade several symbols at once, run as many Expert Advisors? That's pretty cool! Perhaps, I have confused something, thinking that the tester is multisymbol.

And concerning tick skipping in the loop in OnTimer you need reproducible proofs. Do you have them?

I don't have proofs (haven't prepared) of the correctness of the statement which is obvious to me. But I will try to prepare them. You surprise me more and more.
 

Trade as many symbols as you want from a single EA in the tester, but don't try to make up tall tales and then wonder about them.

You want a complete synchronised tick stream of all symbols at a single OnTick point, which doesn't work in the terminal or in the tester. At OnTick comes the tick stream of the current working symbol. The tester has similar behaviour to the terminal.

To access the tick stream of other symbols you are offered workarounds. Although inconvenient, there is no other way out.

 

I found an interesting functionMQL5InfoInteger() in library file Trade.mqh. I know MQLInfoInteger() but I do not know this one. F1 does not react to it, but its actions seem to be similar to those of MQLInfoInteger().

Is this function needed in the library?

 
Yes, no asterisk appears on the update in favourites. Particularly for this branch.
 
Anton Zverev:

That kind of statement makes me cringe. We want to trade several symbols at once - run as many EAs? Cool! I must have got something wrong thinking that the tester is multisymbolic.

I have no proofs (I haven't prepared them) of the truth of my obvious statement. But I will try to prepare them. You surprise me more and more.

The tester is a multisymbol one. You may trade whichever instruments you want, as long as they are available on the server.

But because you can only test one Expert Advisor on one symbol, you must evaluate the receipt of ticks for "other" symbols by yourself. That's why we proposed a loop in OnTimer.

The chart-event from the appropriate indicator is also a solution, and it is more direct, than cycle, and not crutchy at all. But it's not clear, what does IndicatorRelease have to do with it?

 
Slawa:

Chart-entry from the corresponding indicator is also a solution, more direct than a loop and not a crutch at all.It's just not clear, what does IndicatorRelease have to do with it?

iCustom+IndicatorRelease. Perhaps it's not a crutch solution to multiply complex entities on a trivial place. There's no arguing about tastes. The question is how much such a crutch on numerous agents will go to waste resources.

Well almost everything is cool in 5. Speed is top-notch. And here, sorry, some total hairiness where you don't expect it.

 
Renat Fatkhullin:

To access the tick-stream of other characters you are offered workarounds. Albeit inconvenient, but there is no other way out.

Vasiliy mentioned that on FORTS (not in the tester) the mechanism works through subscription and BookEvent. Thus, it avoids tying the EA to any chart at all.