Why not put the input parameters in the structure? - page 6

 
fxsaber:
And what's the benefit, you still have to write the input parameters in the initialisation. And if they change, then what to do with this structure?
INPUTS( void ) : Num(inNum)
  {
  }
 
fxsaber:

When launching a TS it often happens that you don't know which input parameters are best. So you run an Expert Advisor, which, for example, has a dozen sets of different input parameters. And each set for each copy of the TS. Many people have been doing this a long time ago, when MQL4 was still very far from MQL5.

And they did it through extern string - now it's called an input string.

They parsed the input strings, checked how many input lines there were and, based on this number, created the same number of trade logic with the corresponding input parameters (using ArrayResize). And all this on the ancient MQL4! And there, the MM was distributed for each TS according to the number of TCs and other nuances. Somewhere in the ancient codebases there should be examples.


This is something that works. Of course, the optimization rests, but at least when working you can pass one string instead of a bunch of input variables.

 
Alexey Volchanskiy:
And what is the benefit, you still need to write the input parameters in the initialization. And if they change, then what to do with this structure?

The trick is to use EA class template in mqh. The mqh will compile itself, passing all input variables into it is standardized and creating an array of EA class objects is done without problems.

I hope we are not discussing an empty topic "how to improve MT5", but looking at the current capabilities of the language.

 
Taras Slobodyanik:
the topic is not about optimization)
Why not put the input parameters in a structure?

People just can't understand that the original suggestion was to slightly tune the MQL language and are trying to propose solutions within the existing syntax.

 
fxsaber:

The trick is to use EA class template in mqh. The mqh will compile itself, passing all input variables into it is standardized and creating an array of EA class objects is done without problems.

I hope we are not discussing an empty topic "how to improve MT5" but we are looking at the current possibilities of the language.


This is exactly the MQL tuning we are discussing. I am surprised no one has read the first post where I stated that in black and white )) It's time to close the discussion, everyone is doing his own thing...

 
Alexey Volchanskiy:

MQL tuning is exactly what we're discussing. I'm surprised no one reads the very first post, where I'm stating this in black and white )) It's time to close this discussion, everyone's talking about his own thing...

I would have given it up straight away if it had not been for that phrase.

Didn't think its meaning could be so distorted. Gone.

 
Alexey Volchanskiy:

MQL tuning is exactly what we're discussing. I'm surprised no one reads the very first post, where I'm stating this in black and white )) It's time to close this discussion, everyone is doing his own thing...


What's the big deal in the first post? An appeal to fantasy?

 
Alexey Volchanskiy:

The point is to leave the possibility of standard optimisation. Is it possible with ini?


Alexey, yes, it is possible!

Before optimization, before the first pass with the first OnInit(),OnTesterInit() will be triggered. In its body, we write everything that needs to be done before optimization. In this case, we need to parse our inishka.

 
Dennis Kirichenko:

Alexey, yes, possibly!

Before optimization, before the first pass with the first OnInit(),OnTesterInit() will be triggered. In its body, we write everything that needs to be done before optimization. In this case, we need to parse our inishka.

I am aware of it. You can also learn to scratch the right ear with your left foot. Just with input structures everything would be done automatically.
 
Alexey Volchanskiy:

MQL tuning is exactly what we're discussing. I'm surprised no one reads the very first post, where I'm stating this in black and white )) It's time to close this discussion, everyone's talking about something else.


Maybe it's because the first post doesn't make sense. That's why everyone writes about his/her own things. And you can't ask questions - the answer is either ignorance or hysteria.

Reason: