Adding StockScouter rating to Strategy
Author: hmg2020
Creation Date: 9/3/2009 6:33 PM
profile picture

hmg2020

#1
Has anyone tried to incorporate a similar program as that used by stockscout found in this link?
http://www.codeproject.com/KB/aspnet/stockscout.aspx

It would be great to add similar C# code in wealthlab that can do the same as stockscout but for each individual symbol.

If you have an idea how to accomplish something similar please share.

Thanks
profile picture

Cone

#2
If the link for the source weren't broken, you could pretty much copy and paste it in to a WL5 Strategy. Though it would make sense to make some minor changes like using the DataSetSymbols instead of getting them from a file, and outputting the results to the debug window instead of the console.
profile picture

Eugene

#3
The code looks like an overkill for a simple task like this. Let's include it in Community.Components:
CODE:
Please log in to see this code.


http://www2.wealth-lab.com/WL5WIKI/CommunityComponentsMain.ashx
profile picture

ss161

#4
what would also be interesting is to find a source of historical StockScouter ratings to backtest whether or not the rating has any predictive ability.
profile picture

Eugene

#5
Thought of this too, but I'm afraid there isn't such a source. As a workaround, those who are interested in this yet-another-super-duper ratio can start collecting the values and dumping them to a file/database ;)
profile picture

Cone

#6
I knew Eugene could solve this one in a few seconds :)

And, with just a little more work, we can do it for all the DataSetSymbols and display the sorted results -

CODE:
Please log in to see this code.
profile picture

hmg2020

#7
You guys are really good.
In the last scrip is there a way to add to another dataset those symbols that got a 10, say DATSET10 and those that got a 9 be added to DATAset9?
profile picture

Cone

#8
(Hint: don't refresh after posting.)

You can create a combined DataSet with Dave Aronow's WatchList provider.
profile picture

Eugene

#9
There's almost always a way, but this one can work only as Robert said above. You're asking to modify/create a DataSet from Strategy code, and this isn't directly possible. Even when using undocumented API calls - I tried.

(A Strategy can probably modify or create the XML file directly, as a text/XML file, but there's no known way to refresh/make it visible for WL5 other than to restart the application.)

Robert, could you tell us please if the WatchList* methods are planned for 5.6?
profile picture

hmg2020

#10
Sorry for the refresh.
I was looking for an IF then statement in C#...
Are you saying it is not possible with C# to move symbols around within datasets?
profile picture

Cone

#11
No WatchList* in 5.6.

CODE:
Please log in to see this code.
Anything's possible. But now I have little idea what you want to do or even why.
profile picture

hmg2020

#12
I have created a DATAset that includes symbols rated 10 as I run the script above.
The rating changes daily so I wanted to keep the DATAset updated with those new symbols rated 10.
profile picture

hmg2020

#13
If the above script is modified to include only the symbols of those with 10 rating then i can just cut and paste. This will work for me and make it easier to keep the dataset updated.
profile picture

Eugene

#14
CODE:
Please log in to see this code.
profile picture

hmg2020

#15
Thanks, I got it, that will work...
That goes before
CODE:
Please log in to see this code.
profile picture

hmg2020

#16
This code has been giving me errors lately!!!... Error scouting: SCI ...how can it be fixed?
profile picture

Eugene

#17
Microsoft has changed HTML page layout so the GetStockScouter routine from Community Components is broken. Fortunately the workaround is going to be simple.

Look for the fix in the next release of Community Components, 2012.01. You will have to install the extension if you haven't done it before, it's possible to do so now and update early next year when the Extension Manager prompts you to.
profile picture

Eugene

#18
Hector,

Heads-up! GetStockScouter method has been fixed (and improved) so any code relying on it will work after upgrading Community Components to 2012.01.
profile picture

Eugene

#19
ATTENTION! StockScouter has been discontinued by MSN since late 2014. It will no longer work. We are probably going to leave the function in C.Components for now so that any dependent strategy code won't crash. However, GetStockScouter will return -1 for any symbol.