How to delete preferred values
Author: bgood
Creation Date: 12/2/2009 6:15 PM
profile picture

bgood

#1
How do I delete the preferred values associated with a strategy?
profile picture

Eugene

#2
Disable the PV button to reset the values to their defaults, right-click the 'Strategy Parameters' area and save the default values.
profile picture

bgood

#3
A little more information is in order. I have been developing a strategy and wanted to test it against a few hundred stocks to see how it worked. I used the optimizer to adjust the parameters and then set the values. Now loading and saving the strategy is slow (maybe 10 seconds). When I couldn't find a way to clear the values I tried to be creative. After WL has stopped, I have edited the strategy xml file and deleted the parameters in the strategy. When I restart WL, the parameters are all restored to the xml file. Clearly the information is kept in a second place.

When I followed the procedure above and save the strategy, it appears that the values have changed for a single stock. However, after I restart WL, the values are restored to the prior optimization values. It appears that the "second storage area" has overwritten the saved values again. Is there any way to clear all perferred values in all storage areas?
profile picture

Eugene

#4
The "second storage area" is a day-dream ;) Everything regarding Strategy is kept in its XML file, namely in the PreferredValues tag (plus the UsePreferredValues switch). Not sure what does "has stopped" mean, but you need to close WL5 to edit it.
profile picture

bgood

#5
Hi Eugene. The values do come back. Let me describe the procedure exactly.

1. Reboot my pc (so no residual dll's are running.
2. Using my editor, I delete all but 1 preferred values specified in the xml file.
3. I save the changed file and close my editor.
4. I start WL and after a few seconds, my strategy starts with the preferred values still showing up.
5. I close WL without saving the file and the file still has the changes to the preferred values like I placed in it.
5. I start WL again and bring up the strategy.
6. I click the save button to save the strategy.
7. I exit WL.
8. I use my editor again and the preferred values have been restored again.

My day-dream of a second storage area appears very real :-{ This procedure is very repeatable, and I tried it again prior to this post because I hate to waste people's time.
profile picture

Eugene

#6
Hi Bryce,

How do I delete the preferred values associated with a strategy?
"2. Using my editor, I delete all but 1 preferred values specified in the xml file."

Aside from that we never know for sure that the exact XML is being edited, why are you leaving some preferred values if the original intent is to delete them?
profile picture

bgood

#7
My thinking was that I wanted to minimize the changes to the xml file. I know that I will set the parameters for a few stocks, and the rest I would like to have the strategy default. I could easily delete the 1 line that specifies all of the preferred values, iff you thought that would work.

BTW, I just got to work and turned on my laptop. Again the values are back to their prior settings even though I used the technique you described above, and saved the strategy :-(
profile picture

bgood

#8
OK, I thought it would be easy enought to just delete the preferences line, and I did. I restarted WL, and the strategy remembered the prior settings. I exited WL, and the xml file was still missing the preferred values, so far so good. I restarted WL, watched the preferred values track, then clicked save. I exited WL, and all preferred values were back in the file. Sigh!
profile picture

bgood

#9
Hi Eugene, so I am unsure what to do next. I would have expected that the xml file contained the total information associated with the strategy and was shocked that it didn't. From your earlier post, it sounds like you also expected the xml file to contain everything. Is the xml file kept in more than 1 location? If I copy the code into a new strategy and delete the old strategy will the "secondary" storage be released? Is there a defect report that needs to be entered? I would appreciate your inputs.

Bryce
profile picture

Eugene

#10
I don't expect anything, I just know there's no mystical second storage area. There always exists a simple explanation like editing the wrong file, editing it incorrectly, editing in the wrong user's profile or something like this. This is what I think about "the parameters restored to the xml file".
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).