Errors, bugs, questions - page 1494

 
zaskok3:

An explanation on the lack of OnMarketwatch would also be appreciated.

You'd be better off not demanding an explanation of why this event is not in MT.

You should write to Service Desk with a detailed explanation of how you think it should work and why 99% of traders need it.

 
Maxim Khrolenko:
In my opinion, you can use OnTimer() here, to call an event every X milliseconds.
This solution has long come up with a more precise variant - put indicators on the required symbols and send the user event to the Expert Advisor.
 
zaskok3:
New tick arrival event in Marketwatch. Similar to OnTick, but only it reacts to new ticks not of one symbol, but all that are signed in Marketwatch.

With present quotation flow even their own ticks can arrive in batches, while processing another OnTick.

For some reason, many people think that when some event occurs, the handler of this event is instantly activated, even if another event is processed by the same Expert Advisor (i.e. in parallel). This is not the case.

All events are lined up in one general queue for the same Expert Advisor. The Expert Advisor will process them one by one. In this case, everything depends on the programmer - how effectively he/she implements the processing of a certain event. But even if the programmer is a super programmer and has a super car, still the queue will swell when there are a lot of events (and the more so when there are ticks from foreign characters).

What are the arguments for wanting ticks from other people's characters? "I don't want to spin the timer to keep track of the right characters, because I might be too late for the distribution". And since someone else's symbol tick event (especially if multiple symbols are being monitored) can be delayed in the queue by its own processing of another event, there's a much higher probability of being late for the giveaway.

Believe me, we have actually discussed events about other people's ticks. That's why we came to the conclusion "it's much better to use a timer".

 
zaskok3:

In MQL4++ I can't do without extern when I need to change input parameters programmatically.

There is absolutely nothing stopping you from working with regular variables. For interactive indicators you don't need in fact external const parameters, which are controlled not by your interactivity.

You're just lazy and demanding irrational redundancy, which you won't use because there is a working alternative.

 
Joo Zepper:
What advice would you give to owners of several monitors? How can you organise efficient work with the terminal?

All tabs and service windows (toolbox, tester, market overview, navigator, data window, toolbars) should be placed on a separate monitor.

Leave only charts in the terminal window. Stretch the terminal window on several monitors that have the same size and resolution

 
o_O:

You'd be better off not demanding an explanation of why this event is not in MT.

You should write to Service Desk with a detailed explanation of how you think it should work and why 99% of traders need it.

o_O:

There is nothing that prevents you from working with normal variables. For interactive indicators essentially there is no need in external parameters that are not controlled by your interactivity.

You're just being lazy and demanding an irrational redundancy that you yourself won't use since there's already a workable alternative.

I do not understand such an aggressive perception of calm reasoning. Something seemed wrong to you... There is none, all is well, calm down. You're not R...

Maxim Khrolenko:
I think you can use OnTimer() here, call the event every X milliseconds.
o_O:
This solution has been suggested for a long time - to place indicators on required symbols and send the custom event to the Expert Advisor.

I know, that's why I wrote straight away:

zaskok3:

For some reason they offer crutch solutions via a timer or an even bigger perversion - OnChartEvent.

Slawa, I don't quite understand your logic:

Slawa:

What are the arguments for wanting ticks from other people's characters? "I don't want to spin the timer to keep track of the right characters because I might be late for the giveaway". And since someone else's symbol tick event (especially if multiple symbols are being monitored) can be delayed in queue by its own processing of another event, there's a much higher probability of being late to the giveaway.

Believe me, we did discuss events about other people's tics. That's why we came to the conclusion: "it's much better to use a timer".

Then what's the purpose of having OnTick, if a timer is sufficient for its own ticks too? My logic may not work correctly. But my reasoning is as follows: since there is OnTick, there must also be OnMarketWatch. Since OnMarketWatch can be implemented through OnTimer, the same thing can be done with OnTick. So, the existence of OnTick has the same reasoning as the existence of OnMarketWatch. But one exists and the other doesn't.

The OnTick queue is reset to zero for the ticks that were there when the current OnTick was executed (in EAs it is so). What queue overflow we are talking about is not clear. It is not reasonable to idle the timer on weekends. And EAs don't trigger OnTick on every tick. This is the reason why it is impossible to collect ticks without skipping them in the EA. The queue is cleared, and that is normal. There are no overflows.

 

zaskok3:

Slawa, I don't quite understand your logic:

Then what is the purpose of having OnTick, if a timer is sufficient for its own ticks as well? My logic, perhaps, does not work correctly. But my reasoning is as follows: if there is OnTick, there must also be OnMarketWatch. Since OnMarketWatch can be implemented through OnTimer, the same thing can be done with OnTick. So, the existence of OnTick has the same reasoning as the existence of OnMarketWatch. But one exists and the other does not.

The OnTick queue is reset to zero for ticks that were at the time the current OnTick was executed (in EAs this is the case). What queue overflow is about is not clear. It is not reasonable to idle the timer on weekends. And EAs don't trigger OnTick on every tick. This is the reason why it is impossible to collect ticks without skipping them in the EA. The queue is cleared, and that is normal. There are no overflows.

OnTick moved seamlessly from the quadruple start function

OnTick covers 99% of the needs and allows you to write simple programs.

It's not about overflowing the queue. It's about bulking it up - events are not lost.

There are no separate queues for individual events (OnTick queue). There is one common queue for all events of the same Expert Advisor.

But the queue is replenished with events quite intelligently - if there is a raw NewTick event in the queue, other NewTick events are not added to it. If there is a raw Timer event in the queue, other Timer events are not added to the queue. Etc.

About the reasonableness-unreasonableness of the timer. In fact, the timer doesn't take as much resources as you think. By the way, the client terminal has several timers working simultaneously for its own needs. They work all the time and processor load is 0

 
Slawa:

OnTick covers 99% of your needs and allows you to write simple programs.

In 99%, if you rename OnTick to OnTimer in the source code by making the timer initialization another (one line), the result will not change - it will work as before and the program will still be as simple.

OnTick seamlessly transitioned from the quadruple start function

That's right. Most people are more used to it. That's the main reason.

Thank you for devoting so much attention to clarification. I have a request to add the source code of artificial OnMarketWatch implementation via timer. In my implementation I have to remember the previous ticks of all symbols and compare with the current values at each timer step. In case of difference, generate event to call OnMarketWatch. And exactly this action seems unreasonable. In other words, we can't run OnTimer idly at outputs. We have to keep on comparing. Perhaps there is a better solution. That's why I'm asking you to show me your variant. How would you do it.


I still consider bicycles with OnChartEvent a perversion. As it requires opening as many charts as characters in Market Watch.

 
My friends, there is probably a really paradoxical situation.
In theory, if I understand correctly, if a signal subscriber increases leverage on his account from 1:200 to 1:500, it should result in at least twofold increase of opening volumes.
The same situation applies to the deposit load; if it is increased, the volumes should increase.
One of my subscribers writes that he/she increased the leverage from 1:200 to 1:500 and the load from 50% to 90%. But after that the volume of open positions did not change in any direction. And the balance of his account should have more than allowed it.
Maybe I don't understand the copying system correctly?
 
Artem Prischepa:
...
Stop asking questions on behalf of imaginary (or fictitious) subscribers. If a subscriber has a question, let him ask it himself. Otherwise I will consider it as advertising the signal.
Reason: