Input values reset after recompile of advisor

 
Hello,

I encountered a Problem using input variables in an advisor.

In the advisor, variables defines as extern are shown in the inputs tab of the advisor. The input field is defined with a standard value which could be entered but it's not a must.

When I set the value in the inputs tab it is recognized by the advisor. But when i then have to compile the advisor again because of some mistake, the value is silently reset to the default value.

This hurts.

I use the entered value for identifying the trades done with the advisor, because I want to be able to run it on multiple charts with different pairs. If the value is reset to it's default, this would led to unpredictable results.

Any suggestions to avoid this? Please don't tell me to write an ini-file on my own.

Thank you in advance.

with regards, cori
 
lol cori, i had the same complaint. the answer was that this was a 'feature' and not a bug!!

in order to keep the same variables, u have to exit MT4, compile the script and then restart MT4.

In this way, the variables will not be reset.. untill u forget to exit!

I do not know what happens if u change the order / name or add variables....

reagrds,
 
You know you can also 'Save' the Advisor settings as well ?
Whilst not the ideal answer to your woes, it does assist in maintaining a set of often used settings.

Obviously if you have this running on many pairs, this will be just as annoying :)

Cheers
Martin
Reason: