Delete list of symbols from Watchlist programatically
Author: Christos
Creation Date: 12/13/2012 8:31 AM
profile picture

Christos

#1
I have a big dataset and I would like to create a subset (watchlist) of it by removing a particular list of symbols.

This would be an easy task to do via the watchlist editor but I have to delete more than 200 symbols so it would take too long if I go one by one.

Is there any way to do that faster using strategy editor?
profile picture

Eugene

#2
Since you will first have to code it by yourself and then restart Wealth-Lab after running any script that modifies a DataSet (for the changes to be picked up by the program), I don't think it would save you time - rather the opposite.
profile picture

Christos

#3
QUOTE:
will first have to code it by yourself


:) - I was expecting some help
profile picture

Eugene

#4
:) Sorry, since coding this would be a single-user solution in its purest form, it's not covered by our support policy.

The best option is to use the Watchlist Editor. No known easy (code-based) solution exists on the forums.
profile picture

Cone

#5
Most providers have a "DSString" (or a "symbols" field in the case of Y!) in the DataSet xml file that looks like this:

QUOTE:
AA,AXP,BA,BAC,CAT,CSCO,CVX,DD,DIS,GE,HD,HPQ,IBM,INTC,JNJ,JPM,KO,MCD,MMM,MRK,MSFT,PFE,PG,T,TRV,UNH,UTX,VZ,WMT,XOM,


So another way you could go about it is to export the symbols that you want to keep with commna separation, copy and paste them into the appropriate place in the DataSet's xml file, and restart Wealth-Lab. Should only take a minute or two.

----
Thinking more about the workflow here... you'll probably need a master DataSet with all your symbols to filter. Then you can regularly make the symbols edit in a separate DataSet from the same provider.
profile picture

Eugene

#6
On second look, I'm not as sure that Christos is talking about programmatically editing an Aronow Watchlist as I was yesterday! Maybe he's simply confusing Watchlists with DataSets? What do we know about the task for sure? There are no details again.

There are many examples of editing DataSets programmatically that could be found on the forums, but that doesn't apply to:

1. Aronow Watchlists (uses its own XML structure, this is what I meant by "single-user solution")

2. ASCII data (that our topic starter seems to be actively using)
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).