/// <summary> /// attempts to get year worth of daily data from google, if fails tries yahoo. /// </summary> /// <param name="symbol"></param> /// <returns></returns> public static BarList DayFromAny(string symbol) { BarList bl = BarListImpl.DayFromGoogle(symbol); if (bl.Count == 0) { bl = BarListImpl.DayFromYahoo(symbol); } return(bl); }
/// <summary> /// downloads yearly charts for a list of symbols /// (source: google finance) /// </summary> /// <param name="symbols"></param> /// <returns></returns> public static BarList[] FetchCharts(string[] symbols) { List <BarList> l = new List <BarList>(); foreach (string sym in symbols) { BarList bl = BarListImpl.DayFromGoogle(sym); if (bl.isValid) { l.Add(bl); } } return(l.ToArray()); }