MetaTrader 4 Build 529 beta released with new compiler - page 34

 

When restarting the terminal, the EAs left on the chart (before) don't start by themselves, nor by pressing/pressing the "Experts" button, nor even by resetting the parameters.

// Only killing and re-starting brings it to life.

 
artmedia70:

However, it is no longer possible to change the values of external variables that were originally assigned to them during the execution of the program?

This is from MQL5: https://www.mql5.com/ru/docs/basis/variables/inputvariables

The input parameters are constant.

 
artmedia70:

But it's no longer possible to change the values of extern variables that were originally assigned to them during the execution of the program?

It's not very convenient. I'll have to make another one...

In theory, it wasn't recommended to assign values to externs before either. Well, we have sinned, of course.

This way (the new way) is more correct, of course. Let's get used to it ;)

 
komposter:

In theory, it was not recommended to assign values to externs before either. Although we have sinned, of course.

This way (the new way) is more correct, of course. Let's get used to it ;)

Well, if it's right, then... already made another variable.

It will be bad and inconvenient, if there are a lot of external variables and each one must be changed as the play progresses - one variable must be added for each external one, which must be changed during calculations.

Anyway...

 
artmedia70:

If it's right, then... I have already made another variable.

It would be bad and inconvenient if there are a lot of external variables and each one must be changed as the play progresses - one variable must be added for each external one, which must be changed during calculations.

But never mind...

We need to look for pluses too... For example, the name of a variable should be replaced with an alias of its description )

Change the external one with name Var into extVar, add its alias after // (if it's not already there) and below it declare Var and insert Var = extVar into the inite.

Still better than Ctrl+H (is it still glitchy, by the way?).

 

If the input parameters of the indicator are changed, the new parameters will only take effect after removing the indicator from the chart and restarting it. This is a problem...

Changing the timeframe does not work.

 
komposter:

You have to look for pluses too... For example, the variable name is substituted with an alias description)

Change external with name Var to extVar, add its alias after // (if it's not already there) and declare Var below and insert Var = extVar into inite.

Still better than Ctrl+H (is it still glitchy, by the way?).

Well, that's pretty much what I did. I'm a little confused about the aliasing. The commented strings after an external variable appear in the description of that variable in the input parameters - that's great. But what does "Alias" of a variable mean?

As for Ctrl+H being glitchy, I didn't notice it in previous versions either. If I needed to find and replace it, I found and replaced it. What was glitchy about it before?

 
artmedia70:

If the input parameters of the indicator are changed, the new parameters will only take effect after removing the indicator from the chart and restarting it. This is a problem...

Changing the timeframe does not work.


It's the same for everyone, for me everything changes when I change the timeframe, but in the code the statics are reset during reinitialisation, maybe it's not ok for you ?
 
ALXIMIKS:

It's different for everyone, with me everything changes when I switch the tf, but the code is to reset the statics on reinitialisation, maybe your code is not ok through this ?
I have no static variables in my code, only external
 
artmedia70:

If you change the input parameters of the indicator, the new parameters will only take effect after removing the indicator from the chart and restarting it. This is a problem...

Changing the timeframe does not work.

This came from MT5. Sounds very right to me.
Reason: