Profile Picture

Watch Lists

Posted By kaizen 4 Years Ago
Posted Wednesday February 05 2014
I use ( and wrote) the code at but I need it to update folders that are sub folders.

How do I go through and find sub folders - can be more than one folder deep.

I use

StreamReader streamReader = new StreamReader(filename);
XmlSerializer xmlSerializer = new XmlSerializer(typeof(RightEdge.Objects.WatchListItem));
RightEdge.Objects.WatchListItem wlItem;
wlItem = (RightEdge.Objects.WatchListItem)xmlSerializer.Deserialize(streamReader);

foreach (RightEdge.Objects.WatchListItem item in wlItem.folder.Contents)

I assume sub folders will be in here?


Edited: Wednesday February 05 2014 by kaizen
Posted Monday February 10 2014
Each WatchListItem can be either a symbol or a folder. For a folder, the IsFolder property will be true, and the Folder property will return a WatchListFolder object which will have more information about the folder, including the Contents which is the list of items in the folder.

Does this help?

Posted Wednesday February 12 2014
Yes - Though I could not figure out how to look at folders more than 2 deep.

Any ideas?

Posted Wednesday February 12 2014
Hi Kaizen,

You probably need to use recursion. Attached is a sample which prints out the whole watch list tree. Let me know if that helps.


WatchListDumper.cs (483 views, 1.00 KB)
Posted Sunday February 16 2014
Sorted Thanks

Posted Tuesday February 18 2014
Hi All,

A further question related to watchlist selection.  When I start RE from the commandline. How can I select only some stocks in a watchlist and trade these only?

Ex: folder = XYZ , stocks in this folder = AAA, BBB, CCC . At startup of trading I want to start trading only with AAA.

An optimalisation plugin is mentioned on this forum to be able to select, but that's only for backtesting. My problem is with real trading not backtesting.

I'm aware of the RE Commandline switches and can start with a full folder selected but I can't figure out to set a subselection of the stocks in the folder to only trade these ones. I'm also aware of the watchlist coding available on this forum.

Hope to get some guidelines to move ahead?


Posted Tuesday February 18 2014
With your system, is it possible to filter the symbols that you do/don’t want to trade at the beginning of NewTick and/or NewBar? That is, immediately return if it is not the symbol you want to trade.


Edited: Tuesday February 18 2014 by alpha23
Posted Tuesday February 18 2014
Thanks for the reply.

Your suggestion is the one I currently try to use, but the actual situation is more complicated.

I use IB as Broker and have 100 tickers that stream livedata. I trade mostly options on indexes. On these indexes there are also daily and weekly optionseries. So every day new options are introduced while options that are past their expirationdate do not need to be 'ticked' in the watchlist to receive live data anymore.

2 Approaches for this?

1) If I leave all the options in the folder I should be able to automatically 'tick' ( select the ones that are still tradable) when my trading system starts. Otherwise I can end up with a folder filled with mostly old, non tradable options that eat up my 100 live tickers. (Hence my question on codesnippets to perform this select)


2) If I could "move" old options to another folder (Archive) and keep my trading folder up-to-date with only relevant tradable options I would also be in the clear. I tried to code this starting from the watchlist code available on this forum but with no success. I always end up with losing the bardata somewhere. If somebody has the solution to this I would apreciate some code snippets to get the latter working?



Posted Tuesday February 18 2014
You can write out the symbols that you plan to trade the following day to a text file and then add them to a separate folder. Additionally you can move old symbols to a separate folder manually.

Posted Thursday February 20 2014
Hi, RE Development

I'm trying to programmatically mimic a "cloning" and subsequently move of this cloned symbol to a new destination in the watchlist.

Can RE development publish some code snippets to "clone" a symbol in the watchlist and subsequently move this cloned  symbol to another location. This seems to be the only way to keep bardata linked to the symbol.

While this functionality already exist in the GUI, I presume the code is already available and would be helpfull to develop some housekeeping functionallity.

Thanks for the reply.


Similar Topics

Reading This Topic

2005-2018 © RightEdge Systems