AlgoWizard - Assigning a constant (i.e., 1) to a dvar creates an external variable

In AlgoWizard, assigning a constant (i.e., 1) to a dvar creates an external double variable with the constant's value.
The order of the constant values in the MQ4 code can change, yielding very unexpected results.
Editing/moving rules and adding/changing blocks with constants causes the order of assignment of variables to change, 
but MT4 thinks they are the same variables and leaves the previous input values, even when closing and reloading MT4 - THIS IS VERY BAD as it changes the constant values in the EA.
You must manually re-enter constant values into the external variables in the MT4 Expert Properties - Inputs window - in the same order as the MQ4 source code - to correct the issue.


This is an example of how 4 constants used in a strategy appear in the MQ4 code:

double AssignVrbVleEntMlt = 1;
double AssignVrbVleEntMlt2 = 0;
double AssignVrbVleEntMlt3 = 100;
double AssignVrbVleEntMlt4 = 2;


Additionally, once created, these external dvar constants are not removed from the MQ4 code even if they are no longer used in the strategy rules.



Attachments
No attachments
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

h
#1

HEJ

26.02.2021 07:06

Task created

Dw
#2

Diwi

21.02.2022 18:54
Voted for this task.
TB
#3

Tomas Brynda

28.03.2022 15:33

Status changed from New to Refused

Hi,

this is unfortunately a default behaviour of MetaTrader. 

You can click Reset button in expert properties in order to use the exact values set inside strategy MQL script.


For the variables to be removed from the code, you must delete them in Variables settings.


Best regards,

Tomas 


Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please