Changing default parameter value only works after reopening strategy
Author: coppola
Creation Date: 9/2/2014 10:41 PM
profile picture

coppola

#1
hi,

I think i detected a bug with the default parameters:
when defining parameters (without using PV), changing of the default does only work when closing and reopening the strategy.
changing the default (for examply directly in the code), saving the strategy and running it does not work. its still executed with the old default value.

maybe this is related to http://www.wealth-lab.com/Forum/Posts/Setting-Default-Parameters-34239
profile picture

Eugene

#2
1.

This is not possible to reproduce. Changing the default value of a parameter and re-running the Strategy by clicking "Run the Strategy" (or "Compile"+"Go") does work as it always did, executing with the new default value. Otherwise you should provide a detailed step by step procedure.

2.

Probably you've clicked "Save Parameters" before and now the parameters have "stuck" -- as described in the following Wiki FAQ?

FAQ | Strategies and WealthScript > Why am I unable to "Reset" and "Save parameters"

If this is the scenario you're experiencing, then this "bug" is by design. For more details, please refer to the User Guide: Reference > Data Panel > Strategy Parameters. It may be hard to follow but once you "Save" that becomes the new default.
profile picture

coppola

#3
my described scenario looks to me still like a bug...
also when you do the following, it looks strange:
optimize a strategy, assign default values to code (not pv!), save the code, run it.
now still the strategy is running with the old defaults.
when you close the strategy and repopen it again, it works ...
this is wrong.

when the defaults are set in the code (by the user directy in the code or by setting the defaultvalues from the optimization), the intention is clear.
so the strategy should run on these defaults.
everything elses is at least hard to follow ...
profile picture

Eugene

#4
QUOTE:
my described scenario looks to me still like a bug...

Sorry, where can I find your "described scenario"? If you're experiencing an issue, please provide a detailed step by step procedure in order for us to be able to reproduce it.

QUOTE:
also when you do the following, it looks strange:
optimize a strategy, assign default values to code (not pv!), save the code, run it.
now still the strategy is running with the old defaults.
when you close the strategy and repopen it again, it works ...
this is wrong.

Workaround: After saving default parameters, click "Compile", drag to change any parameter slider, then click "Reset". Now it works without reopening the Strategy.
profile picture

coppola

#5
QUOTE:
Sorry, where can I find your "described scenario"? If you're experiencing an issue, please provide a detailed step by step procedure in order to be able to reproduce it.

i did:
QUOTE:
when defining parameters (without using PV), changing of the default does only work when closing and reopening the strategy.
changing the default (for examply directly in the code), saving the strategy and running it does not work. its still executed with the old default value.

but i do it in more detail again:
1)define a strategy with parameters.
2)print out the value of one parameter from the code (printdebug)
3)check the printout
4)now change the parameter default in the code
5)run it again
result: printout does not change!
6)close the strategy
7)rerun it
result: now the printout is ok.

QUOTE:
Probably you've clicked "Save Parameters" before and now the parameters have "stuck" -- as described in the following Wiki FAQ?

no, i did not.


so it looks like a bug.
this is not a major concern when (!) you know this problem and know a workaround.
but in my opinion it should be fixed nevertheless.
profile picture

Eugene

#6
Like I said, this is unreproducible. With one exception: if you used F5 or "Go" to run the code, what you described will happen because the strategy has not been recompiled yet. If you used "Compile"+"Go" or "Execute the Strategy" or save/reopen, it would not. This is by design.
profile picture

coppola

#7
neither compile + go nor compile + run works for me. only save and reopen.

please check it with this test code:

CODE:
Please log in to see this code.


thanks
profile picture

Eugene

#8
After modifying code, click "Compile", drag to change any parameter slider, then click "Reset". Now it works without reopening the Strategy.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).