Errors, bugs, questions - page 1493

 
zaskok3:
In MQL4++ I can't do without extern when I need to change input parameters programmatically. For example, when converting a standard indicator into an interactive one I have to replace input with extern. The compiler treats input variables as const and complains at attempt to change them. With extern there are no such problems.
They do for me. I've also read in the manual long ago that extern may be changed programmatically. Glitch upon glitch, it changes now and then not, it seems they are reset on initing. I gave up and made copies of extern to global. I read and copy only once at program start and use global only inside the program. Immediately everything worked like clockwork.
 
zaskok3:
It's a pity that the architecture is so rigid that there is no possibility of even simple flexibility. So, the interactivity in MQL5 will require a crutch. The question is where the advantage is then, if the language limits the possibilities...

You don't understand. We have saved a lot of memory with our architecture.

Ask those around you what's more important: the difficulty of copy-pasting 5 lines of code or the memory gain? We, for example, haven't given the slightest thought to

 
Slawa:

...

What is your advice to owners of multiple monitors? How can you organise an efficient operation of the terminal?
 
Slawa:

You don't understand. We've saved a lot of memory with our architectural design.

That's right, I don't understand. There is very little information from you about the internal architecture. Honestly, I cannot understand how adding the const modifier to input variables allows you to create a much better architecture with huge memory saving. At the same time it would seem a crutch in the form of a memory allocation override still creates this saving. You can inarchitecturally create the dubbing automatically and treat input as const as it is now. Trying very hard to imagine what kind of architecture it is that allows you to "save a lot of memory" in such a simple case. Looks like you're making a comparison with MT4 architecture, which in many ways was redundant and far from resource efficient (as with recalculating timeframes). But we are talking about the reasonableness of the architecture in general, not in comparison with a product N-tenths of a century ago.


And as far as the architecture is concerned. I don't understand why there's no OnMarketwatch, like in almost all other trading platforms. For some reason there are crutch solutions using timer or even more perverse OnChartEvent. This task is in demand and seems obvious to all traders who create ATSs. And it is done on purpose to make the internal architecture very effective?


This is not a criticism for the sake of criticism. I want to understand, and not be an amateur "I do not know, they know best".

 
zaskok3:

Honestly, I can't understand how adding a const modifier to input variables creates a much better architecture with huge memory savings.


Well clearly said two posts above

Global storage of indicators in the MT5 history base. For them the input parameters are key. When you change the input parameters, the indicator with old parameters will be destroyed and the same indicator with modified parameters will be created again.

What's not clear? Input parameters are key parameters for storing indicator instances. If you change the key value from within, there is a contradiction with the index - the index says one thing, but in fact it says something else. Well you can't change external parameters internally

I'm not accusing you of misunderstanding - it's a perfectly natural wish: "make it good for me - I don't care about others".

 

Slawa:

it is a perfectly natural wish: "make me feel good. it's me who doesn't care about others".

Unfortunately, in today's society this desire is natural. However, don't put it all in the same way.

Thank you for the repeated clarification:

The input parameters are the key to store indicator instances. If you change the key value internally, there is a contradiction with the index - the index says one thing, but in fact it says something else.

It is now clear which architecture is chosen and why it requires immutability of input variables. I would not change an already implemented architecture for the sake of one dissatisfied forum fart, either. The fart will somehow manage to work itself out... I want to know how the internal indicator kitchen is organized in MT4.


By the way, input are const in EAs and scripts precisely because of the architectural feature of storing indicators?


I would also appreciate clarification of the absence of OnMarketwatch, which is in demand by somewhat more people than the previous point.

 
zaskok3:

An explanation on the lack of OnMarketwatch, which is in demand by slightly more people than the previous point, would also be gratefully received.

What is OnMarketWatch?
 
Slawa:
What is OnMarketWatch?
The event of a new tick arriving in Marketwatch. Similar to OnTick, but only reacts to new ticks not of a single symbol, but of all those signed in the Market Watch.
 
Slawa:

...

What is your advice to owners of multiple monitors? How can you organise an efficient operation of the terminal?

 
zaskok3:
The event of a new tick arriving in Marketwatch. Similar to OnTick, but reacts not to new ticks of one symbol, but to all ticks that are signed in the "Market Watch".
In my opinion, you can use OnTimer() to call this event every X milliseconds.