Syntax
public int GetStockScouter( string symbol )
Parameter Description
| symbol |
The symbol (ticker) of a U.S. stock |
Description
Returns the so called "StockScouter Rating" for
U.S. stocks, according to the MSN's MoneyCentral web site. For more details, see:
Example
The following code example by Robert Sucher requests a StockScouter rank for all symbols of a DataSet and display the sorted results:
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Net;
using WealthLab;
using Community.Components;
namespace WealthLab.Strategies
{
public class SymbolRank
{
public string sym;
public int ssRank;
}
public class StockScouterDemo : WealthScript
{
protected override void Execute()
{
Utility u = new Utility( this );
List<SymbolRank> L = new List<SymbolRank>();
foreach(string sym in DataSetSymbols)
{
PrintStatusBar("Processing: " + sym);
try {
SymbolRank sr = new SymbolRank();
sr.sym = sym;
sr.ssRank = u.GetStockScouter( sym );
L.Add(sr);
}
catch {
PrintDebug("Error scouting: " + sym);
}
}
// sort and display the list
L.Sort(delegate(SymbolRank sr1, SymbolRank sr2) {return sr2.ssRank.CompareTo(sr1.ssRank); });
foreach(SymbolRank sr in L)
PrintDebug(sr.sym + "\t" + sr.ssRank);
PrintStatusBar("Complete!");
}
}
}