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.
Status changed from New to Refused
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