/// <summary>
        /// Load CSV data from file
        /// </summary>
        /// <param name="FileName"></param>
        private void LoadCSVFile(string Symbol)
        {
            DataManagerBase dmb = new YahooCSVDataManager(Environment.CurrentDirectory, "CSV");

            Designer.DataManager = dmb;
            Designer.Symbol      = Symbol;
        }
Exemple #2
0
        /// <summary>
        /// Load CSV data from file
        /// </summary>
        /// <param name="FileName"></param>
        private void LoadCSVFile(string FileName)
        {
            DataManagerBase dmb = new YahooCSVDataManager(Path.GetDirectoryName(FileName), Path.GetExtension(FileName));

            ChartControl.DataManager = dmb;
            ChartControl.Symbol      = Path.GetFileNameWithoutExtension(FileName);
            ChartControl.EndTime     = DateTime.MinValue;
        }
Exemple #3
0
        public override CommonDataProvider GetData(string symbols, Easychart.Finance.DataCycle dataCycle, DateTime startTime, DateTime endTime)
        {
            string URL = "http://table.finance.yahoo.com/table.csv?s={0}&d={4}&e={5}&f={6}&g=d&a={1}&b={2}&c={3}&ignore=.csv";
            string s   = string.Format(URL, symbols, startTime.Month - 1, startTime.Day, startTime.Year, endTime.Month - 1, endTime.Day, endTime.Year);

            byte[]             bs  = DownloadBinary(symbols, s);
            CommonDataProvider cdp = new YahooCSVDataManager().LoadYahooCSV(bs);

            return(cdp);
        }
Exemple #4
0
        /// <summary>
        /// Load CSV data from file
        /// </summary>
        /// <param name="FileName"></param>
        private void LoadCSVFile(string FileName)
        {
            DataManagerBase dmb = new YahooCSVDataManager(Path.GetDirectoryName(FileName), Path.GetExtension(FileName));

            ChartControl.DataManager     = dmb;
            ChartControl.Symbol          = Path.GetFileNameWithoutExtension(FileName);
            ChartControl.DefaultFormulas = "Main;RawData(CLOSE)";
            //MessageBox.Show(ChartControl.DefaultFormulas);
            ChartControl.EndTime = DateTime.MinValue;
        }
Exemple #5
0
        /// <summary>
        /// Load More CSV data from file
        /// </summary>
        /// <param name="FileName"></param>
        private void LoadMoreCSVFile(string FileName)
        {
            DataManagerBase dmb = new YahooCSVDataManager(Path.GetDirectoryName(FileName), Path.GetExtension(FileName));

            ChartControl.DataManager = dmb;
            ChartControl.Symbol      = Path.GetFileNameWithoutExtension(FileName);
            //string s = ChartControl.DefaultFormulas;
            //ChartControl.DefaultFormulas= "Main;Compare(INTL);Compare(MSFT)";RawData(CLOSE)
            ChartControl.DefaultFormulas = "Main;Compare(CCI)#Compare(CCI_FORECAST)";
            ChartControl.EndTime         = DateTime.MinValue;
        }
Exemple #6
0
        public override DataPacket[] GetEodData(string Exchanges, string[] symbols, DateTime time)
        {
            string URL = "http://table.finance.yahoo.com/table.csv?s={0}&d={4}&e={5}&f={6}&g=d&a={1}&b={2}&c={3}&ignore=.csv";

            DataPacket[] dps   = new DataPacket[symbols.Length];
            DateTime     start = time.AddDays(-1);

            for (int i = 0; i < symbols.Length; i++)
            {
                string             symbol = symbols[i];
                string             s      = string.Format(URL, symbol, start.Month - 1, start.Day, start.Year, time.Month - 1, time.Day, time.Year);
                byte[]             bs     = DownloadBinary(symbol, s);
                CommonDataProvider cdp    = new YahooCSVDataManager().LoadYahooCSV(bs);
                dps[i] = cdp.GetLastPackage();
                if (OnProgress != null)
                {
                    OnProgress(this, new DataProgressArgs(symbol, i, symbols.Length));
                }
            }
            return(dps);
        }