Exemplo n.º 1
0
        public MarketBarHistoryFileReport QueryBarHistoryFile(DateTime from, DateTime to, string symbol, string periodicity, FxPriceType priceType)
        {
            if (to != from)
            {
                throw new Exception("Range bar history queries are unsupported");
            }

            var type = StorageConvert.ToPriceType(priceType);

            return(this.Attempt(this.DoQueryBarHistoryFile, from, symbol, periodicity, type));
        }
Exemplo n.º 2
0
        public TickTraderHistoryInfo GetBarsHistoryInfo(string symbol, Periodicity periodicity, FxPriceType priceType)
        {
            var apiPriceType   = StorageConvert.ToPriceType(priceType);
            var apiPeriodicity = StorageConvert.ToBarPeriod(periodicity);

            var info = this.dataFeed.Server.GetBarsHistoryFiles(symbol, ZeroDateTime, apiPriceType, apiPeriodicity.ToString());

            var result = new TickTraderHistoryInfo
            {
                AvailableFrom = info.FromAll,
                AvailableTo   = info.ToAll
            };

            return(result);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Reads data chunk for a specified symbol.
        /// </summary>
        /// <param name="symbol">Can not be null.</param>
        /// <param name="periodicity">Can not be null.</param>
        /// <param name="priceType"></param>
        /// <returns>Can not be null</returns>
        byte[] GetBarMetadataFile(string symbol, string periodicity, FxPriceType priceType)
        {
            var type = StorageConvert.ToPriceType(priceType);

            return(this.Attempt(this.DoGetBarMetadataFile, symbol, type, periodicity));
        }