예제 #1
0
        public static GenericTracker <Screener> fetchscreen(string url, DebugDelegate deb)
        {
            // get raw list
            string[][] raw = fetchrawlist(url, deb);
            debug("beginning screen indexing of " + raw.GetLength(0) + " screens.");
            GenericTracker <Screener> ss = new GenericTracker <Screener>(raw.GetLength(0), "SCREENS", new Screener());
            int l = 0;

            foreach (string[] r in raw)
            {
                l++;
                Screener s = getscreen_qdl(r);
                if (s.isValid)
                {
                    ss.addindex(s.symbol, s);
                }
                else
                {
/*
 *                  if (r!=null)
 *                      debug("ignoring invalid screen line#"+l.ToString("N0")+" with data: " + Util.join(r));
 *                  else
 *                      debug("ignoring invalid screen line#" + l.ToString("N0") + " with no data.");
 */
                }
            }
            debug("completed index of " + ss.Count + " screens.");
            return(ss);
        }
예제 #2
0
        public static GenericTracker <Screener> fetchscreen(string url, DebugDelegate deb)
        {
            // get raw list
            string[][] raw = fetchrawlist(url, deb);
            debug("beginning screen indexing of " + raw.GetLength(0) + " screens.");
            GenericTracker <Screener> ss = new GenericTracker <Screener>(raw.GetLength(0), "SCREENS");

            foreach (string[] r in raw)
            {
                Screener s = getscreen(r);
                ss.addindex(s.symbol, s);
            }
            debug("completed index of " + ss.Count + " screens.");
            return(ss);
        }
예제 #3
0
 public Screener(Screener copy)
 {
     _sym      = string.Empty;
     industry  = copy.industry;
     company   = copy.company;
     marketcap = copy.marketcap;
     sector    = copy.sector;
     country   = copy.country;
     peratio   = copy.peratio;
     price     = copy.price;
     pctchange = copy.pctchange;
     volume    = copy.volume;
     id        = copy.id;
     source    = copy.source;
     symbol    = copy.symbol;
 }
예제 #4
0
        static Screener getscreen(string[] rec)
        {
            Screener s = new Screener();

            s.id        = Convert.ToInt32(rec[NUM]);
            s.symbol    = rec[TICKER];
            s.company   = rec[COMPANY];
            s.sector    = rec[SECTOR];
            s.industry  = rec[INDUSTRY];
            s.country   = rec[COUNTRY];
            s.marketcap = Convert.ToDecimal(rec[MARKETCAP]);
            s.peratio   = Convert.ToDecimal(rec[PE]);
            s.price     = Convert.ToDecimal(rec[PRICE]);
            s.pctchange = Convert.ToDecimal(rec[CHANGE].Replace("%", string.Empty));
            s.volume    = Convert.ToInt64(rec[VOLUME]);
            return(s);
        }
예제 #5
0
        public Screener(Screener copy)
        {
            _sym = string.Empty;
            industry = copy.industry;
            company = copy.company;
            marketcap = copy.marketcap;
            sector = copy.sector;
            country = copy.country;
            peratio = copy.peratio;
            price = copy.price;
            pctchange = copy.pctchange;
            volume = copy.volume;
            id = copy.id;
            source = copy.source;
            symbol = copy.symbol;
            

        }
예제 #6
0
        static Screener getscreen_fv(string[] rec)
        {
            Screener s = new Screener();

            s.id        = Convert.ToInt32(rec[FV_NUM]);
            s.symbol    = rec[FV_TICKER];
            s.company   = rec[FV_COMPANY];
            s.sector    = rec[FV_SECTOR];
            s.industry  = rec[FV_INDUSTRY];
            s.country   = rec[FV_COUNTRY];
            s.marketcap = Convert.ToDecimal(rec[FV_MARKETCAP]);
            s.peratio   = Convert.ToDecimal(rec[FV_PE]);
            s.price     = Convert.ToDecimal(rec[FV_PRICE]);
            s.pctchange = Convert.ToDecimal(rec[FV_CHANGE].Replace("%", string.Empty));
            s.volume    = Convert.ToInt64(rec[FV_VOLUME]);
            s.source    = FINVIZ_SOURCE;
            return(s);
        }
예제 #7
0
        static Screener getscreen_qdl(string[] rec)
        {
            Screener s = new Screener();

            if ((rec.Length <= QL_ID) || (rec.Length > 1) && rec[1].ToLower().Contains("no longer trades"))
            {
                return(s);
            }
            s.id        = Convert.ToInt32(rec[QL_ID]);
            s.symbol    = rec[QL_TICKER];
            s.company   = rec[QL_COMPANY];
            s.sector    = string.Empty;
            s.industry  = rec[FV_INDUSTRY];
            s.country   = "US";
            s.marketcap = 0;
            s.peratio   = decimal.MinValue;
            s.price     = decimal.MinValue;
            s.pctchange = 0;
            s.volume    = -1;
            s.source    = QUANDL_SOURCE;
            return(s);
        }
예제 #8
0
 static Screener getscreen(string[] rec)
 {
     Screener s = new Screener();
     s.id = Convert.ToInt32(rec[NUM]);
     s.symbol = rec[TICKER];
     s.company = rec[COMPANY];
     s.sector = rec[SECTOR];
     s.industry = rec[INDUSTRY];
     s.country = rec[COUNTRY];
     s.marketcap = Convert.ToDecimal(rec[MARKETCAP]);
     s.peratio = Convert.ToDecimal(rec[PE]);
     s.price = Convert.ToDecimal(rec[PRICE]);
     s.pctchange = Convert.ToDecimal(rec[CHANGE].Replace("%",string.Empty));
     s.volume = Convert.ToInt64(rec[VOLUME]);
     return s;
 }
예제 #9
0
 static Screener getscreen_qdl(string[] rec)
 {
     Screener s = new Screener();
     if ((rec.Length <= QL_ID) || (rec.Length > 1) && rec[1].ToLower().Contains("no longer trades"))
         return s;
     s.id = Convert.ToInt32(rec[QL_ID]);
     s.symbol = rec[QL_TICKER];
     s.company = rec[QL_COMPANY];
     s.sector = string.Empty;
     s.industry = rec[FV_INDUSTRY];
     s.country = "US";
     s.marketcap = 0;
     s.peratio = decimal.MinValue;
     s.price = decimal.MinValue;
     s.pctchange = 0;
     s.volume = -1;
     s.source = QUANDL_SOURCE;
     return s;
 }
예제 #10
0
 static Screener getscreen_fv(string[] rec)
 {
     Screener s = new Screener();
     s.id = Convert.ToInt32(rec[FV_NUM]);
     s.symbol = rec[FV_TICKER];
     s.company = rec[FV_COMPANY];
     s.sector = rec[FV_SECTOR];
     s.industry = rec[FV_INDUSTRY];
     s.country = rec[FV_COUNTRY];
     s.marketcap = Convert.ToDecimal(rec[FV_MARKETCAP]);
     s.peratio = Convert.ToDecimal(rec[FV_PE]);
     s.price = Convert.ToDecimal(rec[FV_PRICE]);
     s.pctchange = Convert.ToDecimal(rec[FV_CHANGE].Replace("%",string.Empty));
     s.volume = Convert.ToInt64(rec[FV_VOLUME]);
     s.source = FINVIZ_SOURCE;
     return s;
 }