Profile Picture

Watch Lists

Posted By kaizen 3 Years Ago
Message
Posted Wednesday February 05 2014
I use ( and wrote) the code at http://www.rightedgesystems.com/forums/Topic7039-12-1.aspx 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?

Thanks,
Daniel
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.

Thanks,
Daniel

Attachments
WatchListDumper.cs (384 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?

regards

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.

Duane

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)

OR

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?

Thanks

Roedies

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.

Duane
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.

Roedies 



Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems