BUG: can't load inputs from .set file after recompilation!

 
Loading inputs from a saved .set file after recompilation does not work - it shows the inputs as loaded but they are not! This is obvious by observing the work of the EA (my EA anyway - because I can see from the way it operates that it does not use the values from the load file) and can also be verified after the EA is stopped - the inputs are the "default ones". And that actually is another mistery - what exactly are those "default" inputs? They are not the same as the values which are hard-coded in the expert ("extern double...") but something else - they come from somewhere and somehow persist because when you recompile they re-appear again. But it is not clear where these values come from and how to get rid of them.
I think the correct behaviour is whenever I recompile the values in the Inputs Tab to be set to the ones which are hardcoded in the expert source file, because these arethe real "default" values. In any case - MT4 should never show the values as being loaded by the load command when in fact they are not.
 
Yea, this is how it works.

I created a special code once that would save all parms on deinit if uninitializereason was recompile. then on init i would restore them from that file and then delete the file to avoid old file somehow being loaded later. This of course assumes you didn't changes parms themselves. This works because init runs right after the deinit on recompile.
I think that's why they try to load old parms on recompile since they can't assume you kept all the same parms.
 
I think that's why they try to load old parms on recompile since they can't assume you kept all the same parms.

Yes! - if they did that it would be fine! But they don't. If you look in my inital post - this is what I said the correct behaviour should be in my opinion:
"I think the correct behaviour is whenever I recompile the values in the Inputs Tab to be set to the ones which are hardcoded in the expert source file, because these are the real "default" values"

However in reality the params are changed to some other values, not the ones you specify in your source code. Thinking back about what Rosh told me a couple of days ago - that they keep input parameters like the test's From-To dates in the FXT file - it is possible that the parameters which are reloaded on every recompilation are coming from the fxt file... Which sucks...

Ineresting idea about storing and reloading on deinitialization! I'll try that. Thanks.
 
Every compiler language has it's bugs, quircks, and specifics. As long as the language itself is robust enough to work around those its good enough for me. As soon as you confirm a certain behavior try to find a workaround which I believe is quite doable in MQL and that's why I have no problems with it.
Reason: